Click here to Skip to main content
15,903,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to get the full Path from GetDisplayName Pin
Lonely Byte28-Feb-05 22:08
Lonely Byte28-Feb-05 22:08 
AnswerRe: How to get the full Path from GetDisplayName Pin
Ravi Bhavnani1-Mar-05 4:32
professionalRavi Bhavnani1-Mar-05 4:32 
GeneralRe: How to get the full Path from GetDisplayName Pin
Lonely Byte1-Mar-05 19:40
Lonely Byte1-Mar-05 19:40 
QuestionHow to manipulate bitmap in a View? Pin
kokehqyu28-Feb-05 20:38
kokehqyu28-Feb-05 20:38 
AnswerRe: How to manipulate bitmap in a View? Pin
Selvam R28-Feb-05 22:29
professionalSelvam R28-Feb-05 22:29 
GeneralRe: How to manipulate bitmap in a View? Pin
kokehqyu1-Mar-05 13:50
kokehqyu1-Mar-05 13:50 
GeneralInitially visible dialog box Pin
Kapgan28-Feb-05 20:16
Kapgan28-Feb-05 20:16 
GeneralRe: Initially visible dialog box Pin
zhang80060528-Feb-05 20:47
zhang80060528-Feb-05 20:47 
GeneralRe: Initially visible dialog box Pin
Kapgan1-Mar-05 0:24
Kapgan1-Mar-05 0:24 
GeneralRe: Initially visible dialog box Pin
Ed K1-Mar-05 10:58
Ed K1-Mar-05 10:58 
GeneralUDP transfer Pin
Raghav SR28-Feb-05 19:21
Raghav SR28-Feb-05 19:21 
GeneralRe: UDP transfer Pin
Alexander M.,1-Mar-05 5:14
Alexander M.,1-Mar-05 5:14 
GeneralMedia Gateway's in VoIP Pin
Raghav SR28-Feb-05 19:18
Raghav SR28-Feb-05 19:18 
Generalon using SSL components Pin
ppp00128-Feb-05 15:58
ppp00128-Feb-05 15:58 
GeneralRe: on using SSL components Pin
valikac28-Feb-05 18:52
valikac28-Feb-05 18:52 
GeneralRe: on using SSL components Pin
Ed K2-Mar-05 4:53
Ed K2-Mar-05 4:53 
GeneralSkinning menus and undoc'd menu msgs Pin
Ron Waller28-Feb-05 11:58
Ron Waller28-Feb-05 11:58 
I was wondering if any has info on the undocumented menu control messages, similar to the button messages: BM_CLICK, etc.

I found a really simple way to subclass the menu by changing its windows-class wnd proc.

First create an invisible menu window with the class name of "#32768" called from the CMainFrame's OnCreate, using it as a parent:

hwnd = CreateWindow( "#32768", "", WS_CHILD, 0,0,10,10,
pParent->m_hWnd, (HMENU) 0, AfxGetInstanceHandle(), &cs );


Then replace the window-class wnd proc with your own:

s_OldWindowProc = (WNDPROC) SetClassLong( hwnd,
GCL_WNDPROC, (DWORD) WindowProc );


Then destroy the window because you don't need it anymore - all menus in your app have the same class wnd proc.

In your "WindowProc" you send all the messages to the orginal class proc using CallWindowProc().

Here are the messages and what they seem to do:

0x000001E5: -Draw mouseover item and send statusbar msg.
0x000001EF: -Send out the command msg
0x000001E4: -End of popup menu
0x000001ED: -Process lbuttondown, draw pressed item, send statusbar msg
0x000001EB: -Handles when to send the command and terminate the popup

Now I think I have enough to override all the drawing so I can replace it with my own, while maintaining full menu functionality, even though I have to use LockWindowsUpdate() to prevent drawing on 0x01E5 and 0x01ED, while calling the orginal proc.

But it would be great to get the message names and the info they have in the Params, which would make skinning the menus a lot easier. Any help or info on where I can this information would be greatly appreciated.

BTW, thanks to .dan.g. and his orignal article on the subject for a lot of the information: http://www.codeproject.com/menu/skinmenu.asp
GeneralUnix file locking Pin
Madmaximus28-Feb-05 11:29
Madmaximus28-Feb-05 11:29 
GeneralWin98 system sometimes hangs on ExitWindowsEx() Pin
Still learning how to code28-Feb-05 11:08
Still learning how to code28-Feb-05 11:08 
GeneralRe: Win98 system sometimes hangs on ExitWindowsEx() Pin
PJ Arends28-Feb-05 11:20
professionalPJ Arends28-Feb-05 11:20 
GeneralRe: Win98 system sometimes hangs on ExitWindowsEx() Pin
Still learning how to code28-Feb-05 21:00
Still learning how to code28-Feb-05 21:00 
GeneralRe: Win98 system sometimes hangs on ExitWindowsEx() Pin
Still learning how to code1-Mar-05 10:00
Still learning how to code1-Mar-05 10:00 
GeneralRe: Win98 system sometimes hangs on ExitWindowsEx() Pin
PJ Arends1-Mar-05 19:26
professionalPJ Arends1-Mar-05 19:26 
GeneralDebugging Header includes Pin
hyling28-Feb-05 10:38
hyling28-Feb-05 10:38 
GeneralRe: Debugging Header includes Pin
PJ Arends28-Feb-05 10:53
professionalPJ Arends28-Feb-05 10:53 

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.