Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to know if a window is covered by other windows? Pin
David Crow30-Mar-04 7:57
David Crow30-Mar-04 7:57 
GeneralParent notification with a CTreeCtrl popup menu Pin
Exsilius30-Mar-04 3:51
Exsilius30-Mar-04 3:51 
GeneralRe: Parent notification with a CTreeCtrl popup menu Pin
ohadp30-Mar-04 4:17
ohadp30-Mar-04 4:17 
GeneralRe: Parent notification with a CTreeCtrl popup menu Pin
Exsilius30-Mar-04 20:19
Exsilius30-Mar-04 20:19 
GeneralRe: Parent notification with a CTreeCtrl popup menu Pin
ohadp30-Mar-04 20:31
ohadp30-Mar-04 20:31 
GeneralRe: Parent notification with a CTreeCtrl popup menu Pin
Exsilius31-Mar-04 1:41
Exsilius31-Mar-04 1:41 
GeneralRe: Parent notification with a CTreeCtrl popup menu Pin
ohadp31-Mar-04 1:57
ohadp31-Mar-04 1:57 
GeneralRe: Parent notification with a CTreeCtrl popup menu Pin
Exsilius31-Mar-04 3:40
Exsilius31-Mar-04 3:40 
I will try to explain more clearly the situation :

My dialog contain a CTreeCtrl and CButton.
My message map contain :
BEGIN_MESSAGE_MAP(CMyDlg, CParentOfMyDlg)<br />
   ...<br />
   ON_WM_CONTEXT_MENU()<br />
   ON_COMMAND(IDM_MY_COMMAND, OnMyCommand)<br />
   ...<br />
END_MESSAGE_MAP


The OnContextMenu of my dialog is like :
void CMyDlg::OnContextMenu(CWnd * pWnd, CPoint point)<br />
{<br />
   // Normally I call TrackPopupMenu only for myTree,<br />
   // but for the text I also call it for all the pWnd (myButton, ...)<br />
   TrackPopupMenu(...);<br />
}


I have my function OnMyCommand
void CMyDlg::OnMyCommand<br />
{<br />
   ...<br />
}


And the matter is that It works for myButton but not for myTree. I mean that the OnMyCommand is not called when I click on my menu from myTree.


I have a little matter with Spy++ when I use it here... It crashs !
If I trace messages from my dialog, I have no problem with my CButton (I get the WM_COMMAND sent from my menu). But with my CTreeCtrl, Spy++ loop infinitely when I do a right click on the tree ! and I am constrained to reboot my computer ! (as I'm a little bit obstinate, I've tried 5 times... Big Grin | :-D )

But I have tried to overloaded the OnCommand in order to see if I get the message and I don't...
I have also tried to get my message in a CTreeCtrl derived class and it works.


-------------------------------
Le sage cherche la Vérité,
L'imbécile l'a déjà trouvé.

GeneralMoved project - can't find file Pin
BlackDice30-Mar-04 3:10
BlackDice30-Mar-04 3:10 
GeneralRe: Moved project - can't find file Pin
Antony M Kancidrowski30-Mar-04 3:36
Antony M Kancidrowski30-Mar-04 3:36 
GeneralRe: Moved project - can't find file Pin
BlackDice30-Mar-04 3:45
BlackDice30-Mar-04 3:45 
GeneralSelf-Executable File!!! HELP PLEASE Pin
CZECHREPUBLIC30-Mar-04 2:42
sussCZECHREPUBLIC30-Mar-04 2:42 
GeneralRe: Self-Executable File!!! HELP PLEASE Pin
ohadp30-Mar-04 3:23
ohadp30-Mar-04 3:23 
GeneralRe: Self-Executable File!!! HELP PLEASE Pin
Czech Republic\30-Mar-04 6:11
sussCzech Republic\30-Mar-04 6:11 
GeneralRe: Self-Executable File!!! HELP PLEASE Pin
ohadp30-Mar-04 18:49
ohadp30-Mar-04 18:49 
GeneralRe: Self-Executable File!!! HELP PLEASE Pin
Alexander M.,30-Mar-04 8:30
Alexander M.,30-Mar-04 8:30 
GeneralMulti-threaded MFC Webcrawler (VC++) Pin
JonCage30-Mar-04 2:24
JonCage30-Mar-04 2:24 
GeneralRe: Multi-threaded MFC Webcrawler (VC++) Pin
ohadp30-Mar-04 3:21
ohadp30-Mar-04 3:21 
GeneralWriting editors for indian languages Pin
Sivaji30-Mar-04 2:09
Sivaji30-Mar-04 2:09 
GeneralRe: Writing editors for indian languages Pin
Monty230-Mar-04 2:24
Monty230-Mar-04 2:24 
GeneralRe: Writing editors for indian languages Pin
Sivaji30-Mar-04 17:39
Sivaji30-Mar-04 17:39 
GeneralShorcut menu Pin
CZECH REPUBLIC30-Mar-04 1:47
sussCZECH REPUBLIC30-Mar-04 1:47 
GeneralRe: Shorcut menu Pin
22491730-Mar-04 2:02
22491730-Mar-04 2:02 
GeneralRe: Shorcut menu Pin
Prakash Nadar30-Mar-04 2:37
Prakash Nadar30-Mar-04 2:37 
GeneralWriting Excel files... Pin
Matt Gullett30-Mar-04 1:29
Matt Gullett30-Mar-04 1:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.