Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
Z

zhaopi

@zhaopi
About
Posts
23
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • I've written a service and it can't access mapped network drives. Why?
    Z zhaopi

    I have referred to the FAQ but the answer does not solve the problem actually... Below is my code of creating srevice: -------------------------------------------------------------------------------------------------- SC_HANDLE hService = ::CreateService( handle, // handle to SCM database servicename.c_str(), // name of the service to install servicename.c_str(), // name that is displayed on SCM SERVICE_ALL_ACCESS, // can be accessed only by administrators SERVICE_WIN32_OWN_PROCESS, // service runs its own process SERVICE_AUTO_START, // started by SCM when StartService() is called SERVICE_ERROR_IGNORE, // error logged but service started ss, // pathname of the executable NULL, // service does not belong to any group NULL, // service does not use a tag NULL, // requires NtLmsSp and EventLog service to be running ".\\Administrator", // user name to log on "s" // password ); --------------------------------------------------------------------------------------------------

    C / C++ / MFC help database sysadmin question

  • About Dialog bar size
    Z zhaopi

    What should i do to make the big dialog bar displayable with different resolution. The problem i am currently facing is that the dialog bar cannot be fully displayed with low resolution even when maximized. How to make it compatible with different resolution? Thanks in advance...

    C / C++ / MFC help tutorial question

  • Problem with list control
    Z zhaopi

    it works, but i really cannot see what is the difference between your method and mine~ Can explain a little bit~? Thanks

    C / C++ / MFC database help tutorial question

  • Problem with list control
    Z zhaopi

    Thanks for your reply first~ I have checked the sort combobox, unfortunately it is set to none. For the result of insertitem, it is always returning 0 which seems to be fine~ and the setitem function is returning 1 for successful. And how should i use zeromemory function, since it seems to be deleting the LVITEM and all the items are failed to be displayed in the list~

    C / C++ / MFC database help tutorial question

  • Problem with list control
    Z zhaopi

    I am declaring a list and add in contents into it~ But i am always unpredictably facing the display problem~ For example, i am reading information from a database entry by entry, but what is displayed in the list control is totally out of order, and correspondance is wrong. what is worse, some of the colums are blank though i can see the entries are correctly inserted into the list(i have traced this using break point). The code i used is as below: (m_bList is the list control declared) int index; for(index = 0; index < total; index++) { LV_ITEM lvi; lvi.mask = LVIF_TEXT; lvi.iItem = index; lvi.iSubItem = 0; lvi.pszText = (LPSTR)(LPCSTR)sbatchid; lvi.lParam = 1; m_bList.InsertItem(&lvi); lvi.iSubItem = 1; lvi.pszText = (LPSTR)(LPCSTR)page;m_bList.SetItem(&lvi); CString modi = time.Format("%Y/%m/%d/%H:%M"); lvi.iSubItem = 2; lvi.pszText = (LPSTR)(LPCSTR)modi; m_bList.SetItem(&lvi); }

    C / C++ / MFC database help tutorial question

  • Edit Control highlight
    Z zhaopi

    thanks so much~

    C / C++ / MFC help tutorial question

  • Edit Control highlight
    Z zhaopi

    How to highlight multiple chars in different edit control~ What i want to do is to highlight two corresponding characters in two different edit controls? What i know is before setsel(), i have to set focus to the edit control. So if i do the same thing to highlight the second, the highlighted edit control will definitely lose the focus, and the highlight will disappear~ How to resolve this problem!

    C / C++ / MFC help tutorial question

  • Windows Service
    Z zhaopi

    Thanks for all your help, i have checked my code and the problem has been solved.:-D

    C / C++ / MFC help

  • Windows Service
    Z zhaopi

    I am currently integrating a correctly running windows service and a win32 application into a windows service which will listening to certain sockets with specified port. Individually, both of them works fine. When i replace the endlessloop of the windows service with a segment of code which creates a socket instance, the service failed to start. Can anybody explain to me the reason or suggest some rational modification that i should make to solve the problem... Thanks for any help in advance!

    C / C++ / MFC help

  • Font in Edit Control
    Z zhaopi

    Anybody knows how to change font in edit control. i tried to create a font in following way, CFont l_font; l_font.CreateFont(20, 10, 0, 0, FW_NORMAL,FALSE, FALSE, FALSE, 0, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_ROMAN, "Times New Roman"); edit->SetFont(&l_font); But no matter how i set the height "20" value, the characters in the edit control height do not change. What i want is to make the characters big enough to fit the big edit control i created. thanks in advance~

    C / C++ / MFC tutorial

  • how to make the application starts with the system?
    Z zhaopi

    I am trying to implement an mfc dialog based application which will start when the system starts up just like a windows service...

    C / C++ / MFC c++ tutorial question

  • How to access remote database server from windows service
    Z zhaopi

    And the reason why i did not provide the error message here is because it is a runtime error, no information in detail given!

    C / C++ / MFC database sysadmin help tutorial question

  • How to access remote database server from windows service
    Z zhaopi

    Sorry,what does this mean? Does that means i need to impersonate an account to have the permission to access the database before connection?

    C / C++ / MFC database sysadmin help tutorial question

  • How to access remote database server from windows service
    Z zhaopi

    But i have used this account in many normal applications(not service) to access the database already, it works fine. Does that mean it should not be because the account does not have the rights to access the network? I will try to add in a normal account, and feedback here~ thanks so much~

    C / C++ / MFC database sysadmin help tutorial question

  • How to access remote database server from windows service
    Z zhaopi

    I have encountered a problem when i try to access database built on a remote server... but when i tried accessing database on my local computer, this problem did not occur... Anybody know how to solve this problem?

    C / C++ / MFC database sysadmin help tutorial question

  • About building a Windows service
    Z zhaopi

    sorry, forgot to say, what the "doc. getdocumentlist(doclist, 9);" is to retrieve some information from a database table...

    C / C++ / MFC

  • About building a Windows service
    Z zhaopi

    I am about to implement a windows background service. I have succeeded to build the basic functions such as creating, stopping and deleting the service. The service is actually built basing on an infinite while loop (while(1)), if i put some simply operation like file processing in the while loop, it works fine~ when i put this line "doc. getdocumentlist(doclist, 9);" in, the program just stops there and cannot proceed to the codes below( this can be seen from the log file content). Can anybody explain this to me... void cService::EndlessLoop() { Output("EndlessLoop Start\n"); SYSTEMTIME Clock; CString Out; Cdocumentdb doc; // This endlessloop is killed by Windows when the service is stopped or shutdown while (1) { if (hTimer != 0) { LARGE_INTEGER Elapse; Elapse.QuadPart = -10000000; // 5 Seconds in 100 Nanoseconds resolution (negative=relative) BOOL Res = ::SetWaitableTimer(hTimer, &Elapse, 0, 0, 0, TRUE); if (Res) { DWORD Event = WaitForSingleObject(hTimer, 30000); // 30 seconds timeout // Event = (258=WAIT_TIMEOUT) (128=WAIT_ABANDONED) (0=WAIT_OBJECT_0) (0xFFFFFFFF=WAIT_FAILED) } } CArray doclist; **doc. getdocumentlist(doclist, 9);** ::GetLocalTime(&Clock); Out.Format("Timer %02d:%02d:%02d:%03d", Clock.wHour, Clock.wMinute, Clock.wSecond, Clock.wMilliseconds); Output(Out); }; }

    C / C++ / MFC

  • Taskbar Application
    Z zhaopi

    thanks so much, sorry to repeat such an old question to bother...but anyway your link will make it easy for me to get to the right place~ ^-^:-D

    C / C++ / MFC help tutorial learning

  • Taskbar Application
    Z zhaopi

    I want to build a background service application, which means when the user start the application, it will just show an icon in the task bar. And of course user can double click the icon to configure the service setting. So the issue is how to put it into the task bar...

    C / C++ / MFC help tutorial learning

  • How to Create Radio buttons dynamically
    Z zhaopi

    I have found the method already...thanks~

    C / C++ / MFC help tutorial question lounge
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups