liop
Posts
-
ExtractIcon() takes long time for some files -
Weird popup menu display on XPwould 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) { return CallNextHookEx(HookOldMenuCbtFilter, code,wParam, lParam); } BOOL CMFCMenuApp::InitInstance() { // InitCommonControls() is required on Windows XP if an application // manifest specifies use of ComCtl32.dll version 6 or later to enable // visual styles. Otherwise, any window creation will fail. HookOldMenuCbtFilter = ::SetWindowsHookEx(WH_CALLWNDPROC, NewMenuHook, NULL, ::GetCurrentThreadId()); .../... }
Code .NET: http://home.comcast.net/~llaissus/MFCMenu.zip Has anyone any idea ? Is it a XP bug ? Regards