Click here to Skip to main content
15,921,276 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDoEvent() in Visual C++? Pin
Behzad Ebrahimi1-Aug-03 22:36
Behzad Ebrahimi1-Aug-03 22:36 
AnswerRe: DoEvent() in Visual C++? Pin
Alexander M.,2-Aug-03 3:04
Alexander M.,2-Aug-03 3:04 
AnswerRe: DoEvent() in Visual C++? Pin
Michael Dunn2-Aug-03 5:35
sitebuilderMichael Dunn2-Aug-03 5:35 
GeneralGDI+ vs. DDE Pin
Bartosz Bien1-Aug-03 21:42
Bartosz Bien1-Aug-03 21:42 
GeneralCustom tree control Pin
Marissa1821-Aug-03 21:03
Marissa1821-Aug-03 21:03 
GeneralRe: Custom tree control Pin
HPSI2-Aug-03 1:37
HPSI2-Aug-03 1:37 
GeneralRe: Custom tree control Pin
Michael Dunn2-Aug-03 5:39
sitebuilderMichael Dunn2-Aug-03 5:39 
GeneralWeird popup menu display on XP Pin
liop1-Aug-03 19:06
liop1-Aug-03 19:06 
would like to have your point of view about a really weird behaviour with my popup menu on XP (Desktop properties => Menu Fade effect). I only use CMenu to create the popup menu.

I coded a very simple MFC program to display a popup memu when the left mouse button is pressed.
So I back and forth between my App (Left button) and the desktop (right button)and after a while the menu doesn't display fine.
(http://home.comcast.net/~llaissus/MFCMenu.jpg)
(http://home.comcast.net/~llaissus/MFCMenu2.jpg).
I just get the shading for the whole menu sytem on XP.
I have to click again in my app to get a good display. If I didn't do that I have to reboot my PC to fix that. (It seems like when you put break point in WM_DRAWITEM).

Note It works fine with Menu Scroll effect or no menu effect.

I think it's a problem of timing but I don't know why
I did that and it works better


LRESULT CALLBACK NewMenuHook(int code, WPARAM wParam, LPARAM lParam)<br />
{<br />
return CallNextHookEx(HookOldMenuCbtFilter, code,wParam, lParam);<br />
}<br />
<br />
<br />
BOOL CMFCMenuApp::InitInstance()<br />
{<br />
// InitCommonControls() is required on Windows XP if an application<br />
// manifest specifies use of ComCtl32.dll version 6 or later to enable<br />
// visual styles. Otherwise, any window creation will fail.<br />
<br />
HookOldMenuCbtFilter = ::SetWindowsHookEx(WH_CALLWNDPROC, NewMenuHook, NULL, ::GetCurrentThreadId());<br />
<br />
.../...<br />
}


Code .NET:
http://home.comcast.net/~llaissus/MFCMenu.zip
Has anyone any idea ?
Is it a XP bug ?


Regards
GeneralRe: Weird popup menu display on XP Pin
MAAK1-Aug-03 22:52
MAAK1-Aug-03 22:52 
QuestionMFC application in NT services giving problem on LOG OFF???? Pin
Rohit Dhamija1-Aug-03 18:41
Rohit Dhamija1-Aug-03 18:41 
GeneralPopup Menus Pin
Marissa1821-Aug-03 17:52
Marissa1821-Aug-03 17:52 
GeneralRe: Popup Menus Pin
HPSI1-Aug-03 18:22
HPSI1-Aug-03 18:22 
GeneralRe: Popup Menus Pin
Snillet2k7-Mar-04 9:01
Snillet2k7-Mar-04 9:01 
GeneralRe: Popup Menus Pin
Anonymous2-Aug-03 0:22
Anonymous2-Aug-03 0:22 
QuestionHow to use ofstream to output muliple files, please help! Pin
tomsspc1-Aug-03 17:37
tomsspc1-Aug-03 17:37 
AnswerRe: How to use ofstream to output muliple files, please help! Pin
Michael Dunn1-Aug-03 18:25
sitebuilderMichael Dunn1-Aug-03 18:25 
GeneralRe: How to use ofstream to output muliple files, please help! Pin
Anonymous2-Aug-03 12:33
Anonymous2-Aug-03 12:33 
GeneralSendMessage and buffer question Pin
alex.barylski1-Aug-03 15:12
alex.barylski1-Aug-03 15:12 
GeneralRe: SendMessage and buffer question Pin
Chris Richardson1-Aug-03 15:49
Chris Richardson1-Aug-03 15:49 
GeneralRe: SendMessage and buffer question Pin
alex.barylski2-Aug-03 16:22
alex.barylski2-Aug-03 16:22 
GeneralRe: SendMessage and buffer question Pin
Michael Dunn1-Aug-03 17:03
sitebuilderMichael Dunn1-Aug-03 17:03 
GeneralCFileFind Pin
Dor1-Aug-03 15:04
Dor1-Aug-03 15:04 
GeneralRe: CFileFind Pin
HPSI1-Aug-03 18:03
HPSI1-Aug-03 18:03 
GeneralSQL server OLEDB connection with vc++ Pin
haritadala1-Aug-03 14:27
haritadala1-Aug-03 14:27 
GeneralAppWizard. Pin
WREY1-Aug-03 13:05
WREY1-Aug-03 13:05 

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.