I'm getting the same thing with a CListView derived class. If you solve this issue - please let me know... Thanks.
GuyM
Posts
-
CListCtrl Bug when resizing - only happens when a newly inserted item causes scroll bar to appear -
Handling Double-Click in the header-control of a CListCtrlHi all, How can I catch/handle a double-click (left mouse button) on the header control of a CListCtrl. TIA
-
CListCtrl Selection of Item ProblemYou can catch the OnSelChangeListCtrl(...) and always keep the index of the previously selected item. Once you get that there is no selected item (when clicking under the last item) just call ListCtrl.SetItemState(PrevSelItem, LVIS_SELECTED, LVIS_SELECTED);
-
CreateProcess problem.Try the following:
CString strExeAndParams = _T("\"C:\\MyExe.exe\" Param1 Param2");
BOOL bOK = CreateProcess(NULL, (TCHAR*)(LPCTSTR)strExeAndParams, ...);Note that the path to the executable is wrapped with \" - because if the path has as space in it (like in "Program Files"), Windows will interpret the first half as the EXE name and the second half as the first command-line parameter. Hope this helps ...
-
What "mapping" is all about?Your assumption is correct. This is what happens when an executable calls a function from a DLL directly. With "GetProcAddress()", the DLL is loaded to memory (and mapped to addresses) when you call "LoadLibrary()". After the DLL is mapped, the call to "GetProcAddress()" will return the address that is mapped to that specific function. Hope this answers your question ... :)
-
tcscpy_s.inlWhat does the constructor of Analysis do with szTemp ? Could it be that the constructor deletes (frees) this pointer ?
-
SDI to MDIPersonaly, I would create a new (MDI) project and copy in the relevant parts from the old project. This is because it is not so straight-forward to convert a project from SDI to MDI. You need to: 1. Change your CMainFrame class so that is derives from CMDIFrameWnd and not CFrameWnd. 2. Create a CChildFrame class that derives from CMDIChildWnd. 3. Assuming you're using Document/View architecture, you'll need to modify your CSingleDocTemplate to CMultiDocTemplate. 4. A few more little stuff that I can't really think of right now ... :doh: Hope this helps ...
-
What "mapping" is all about?What exactly is your question ... ?? :confused:
-
WaitForSingleObject QueryIn the first version the call to CreateEvent(...) should come before CreateThread(...), because the new thread might start and end before the original thread reaches CreateThread() ... Otherwise, both are OK. Hope this helps ...
-
Can't open project workspaceThese files are generated by VC++. They contain information about your project/workspace, for example the *.clw holds Class-Wizard information and *.ncb contain intellisense data for your project. When VC++ loads your project, it collects data from these files (if they do not exist, they are rebuilt). If one of these files gets corrupted (don't ask me why, but it happens :(), then VC++ fails to load your project/workspace. So the solution is to just delete these files and let VC++ rebuild them properly ...
-
Can't open project workspaceTry the following: 1. Close VC++. 2. Delete the *.opt, *.ncb, *.aps and *.clw files (don't worry - they will be recreated later). 3. Reopen the VC++ and select your *.dsw.
-
Hi All !(CString Class)the "Compare" function returns 0 (!!!) if the two strings are EQUAL, like strcmp(...)
-
How to make visible the inserted item in Tree control?Try calling - YourTreeCtrl.Expand(hParent, TVE_EXPAND) where "hParent" is the leaf which is now the parent of the new item
-
One Istance of the applicationThe Semaphore is actually like a system-wide flag - it's handled by the OS. Once you create (and lock) the named semaphore from one instance of your application, Windows will not let you do that in the second instance ...
-
How to read/write data from/to USB port ?Again, assuming your device's USB driver acts like a regular serial-port : http://www.codeproject.com/system/chaiyasit_t.asp[^] Otherwise ... :confused:
-
How to read/write data from/to USB port ?Well, that depends on the driver for your specific device. If your device's USB driver acts like a serial-port then you need the ReadFile() and WriteFile() (just like in a serial port) Otherwise, you'll have to refer to the documentation/spec of your device ...
-
system menu on dialog:omg: Hey, I just checked it, and you know what ? You're absolutely right !!! :omg: Sorry, my bad :doh: You rule !! Guy.
-
Vista ComboBoxThat's not the problem ... The real problem is that now the buttons look like ComboBoxes ... :doh:
-
Opening a TCP/IP connection over ActiveSyncHi Guys, I have an application running on a PDA (WinCE), and I want to send messages on TCP/IP over ActiveSync (USB) to a debug/logging application running on my PC. The PC application can run as a Server or as a Client (both are supported). Is there anything special I need to do in order to open the TCP connection over ActiveSync ? Can anyone help me with this ? Thanks in advance, Guy.
-
system menu on dialogin the system-menu, not the Cancel button ... :) Here's the code:void CYourDlg::OnClose()
{
AfxMessageBox("Don't close!");
}... and don't forget to add the ON_WM_CLOSE() macro in the dialog's message-map.