Click here to Skip to main content
15,912,977 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MS Word Pin
Trollslayer26-Mar-03 13:14
mentorTrollslayer26-Mar-03 13:14 
QuestionHow to GetWindowDC Pin
ray_li26-Mar-03 10:02
ray_li26-Mar-03 10:02 
AnswerRe: How to GetWindowDC Pin
Dave Bryant26-Mar-03 10:08
Dave Bryant26-Mar-03 10:08 
GeneralRe: How to GetWindowDC Pin
ray_li26-Mar-03 10:45
ray_li26-Mar-03 10:45 
GeneralRe: How to GetWindowDC Pin
Dave Bryant26-Mar-03 10:49
Dave Bryant26-Mar-03 10:49 
GeneralRe: How to GetWindowDC Pin
ray_li27-Mar-03 9:51
ray_li27-Mar-03 9:51 
GeneralRe: How to GetWindowDC Pin
Dave Bryant27-Mar-03 9:56
Dave Bryant27-Mar-03 9:56 
GeneralWM_COMMAND Pin
Brian Tietz26-Mar-03 9:49
Brian Tietz26-Mar-03 9:49 
I'm looking for WM_COMMAND with CBN_DROPDOWN. I added a print as follows:

// Main message loop:
MSG msg;
while (GetMessage(&msg, NULL, 0, 0))
{
debug_printf("message=%08X, wparam=%08X, WM_COMMAND=%08X, WM_NOTIFY=%08X, CBN_DROPDOWN=%08X\n",msg.message,msg.wParam,WM_COMMAND,WM_NOTIFY,CBN_DROPDOWN);
if( !TranslateMDISysAccel( (HWND)m_mdi_frame_interior_window, &msg )
&& !TranslateAccelerator( (HWND)m_mdi_frame_window,
(HACCEL)m_accelerator_table, &msg ) )
{
if( FindTargetWindowAndFilter( msg.hwnd, msg.message, msg.wParam, msg.lParam ) )
continue;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}

I see WM_COMMAND arrive for button clicks but not for open/close transition of combo box menus. A button click printed:

message=000000A0, wparam=00000005, WM_COMMAND=00000111, WM_NOTIFY=0000004E, CBN_DROPDOWN=00000007
message=000000A0, wparam=00000005, WM_COMMAND=00000111, WM_NOTIFY=0000004E, CBN_DROPDOWN=00000007
message=000000A1, wparam=00000005, WM_COMMAND=00000111, WM_NOTIFY=0000004E, CBN_DROPDOWN=00000007
message=00000111, wparam=000000DC, WM_COMMAND=00000111, WM_NOTIFY=0000004E, CBN_DROPDOWN=00000007
message=00000005, wparam=00000000, WM_COMMAND=00000111, WM_NOTIFY=0000004E, CBN_DROPDOWN=00000007
message=00000200, wparam=00000000, WM_COMMAND=00000111, WM_NOTIFY=0000004E, CBN_DROPDOWN=00000007
message=0000000F, wparam=00000000, WM_COMMAND=00000111, WM_NOTIFY=0000004E, CBN_DROPDOWN=00000007


But the combo box open/close only gave:

message=00000201, wparam=00000001, WM_COMMAND=00000111, WM_NOTIFY=0000004E, CBN_DROPDOWN=00000007
message=00000200, wparam=00000001, WM_COMMAND=00000111, WM_NOTIFY=0000004E, CBN_DROPDOWN=00000007
message=00000202, wparam=00000000, WM_COMMAND=00000111, WM_NOTIFY=0000004E, CBN_DROPDOWN=00000007
message=00000200, wparam=00000000, WM_COMMAND=00000111, WM_NOTIFY=0000004E, CBN_DROPDOWN=00000007
message=00000201, wparam=00000001, WM_COMMAND=00000111, WM_NOTIFY=0000004E, CBN_DROPDOWN=00000007
message=00000200, wparam=00000001, WM_COMMAND=00000111, WM_NOTIFY=0000004E, CBN_DROPDOWN=00000007
message=00000202, wparam=00000000, WM_COMMAND=00000111, WM_NOTIFY=0000004E, CBN_DROPDOWN=00000007


It seems that since I'm printing these messages right at the root message loop, regardless of what WinProc they'd be going to, I'd see them. Does one need to do something special to enable those notifications? The documentation for WM_COMMAND and CBN_DROPDOWN don't indicate anything even remotely to that effect.
GeneralRe: WM_COMMAND Pin
Ravi Bhavnani26-Mar-03 10:04
professionalRavi Bhavnani26-Mar-03 10:04 
GeneralRe: WM_COMMAND Pin
Brian Tietz26-Mar-03 10:19
Brian Tietz26-Mar-03 10:19 
GeneralRe: WM_COMMAND Pin
Ravi Bhavnani26-Mar-03 10:32
professionalRavi Bhavnani26-Mar-03 10:32 
GeneralRe: WM_COMMAND Pin
Brian Tietz26-Mar-03 10:40
Brian Tietz26-Mar-03 10:40 
GeneralSetWindowText not setting it Pin
ns26-Mar-03 9:01
ns26-Mar-03 9:01 
GeneralRe: SetWindowText not setting it Pin
Ravi Bhavnani26-Mar-03 9:13
professionalRavi Bhavnani26-Mar-03 9:13 
GeneralRe: SetWindowText not setting it Pin
ns26-Mar-03 9:19
ns26-Mar-03 9:19 
GeneralRe: SetWindowText not setting it Pin
ns26-Mar-03 9:22
ns26-Mar-03 9:22 
GeneralRe: SetWindowText not setting it Pin
Ravi Bhavnani26-Mar-03 9:28
professionalRavi Bhavnani26-Mar-03 9:28 
Generalnope Pin
ns26-Mar-03 9:32
ns26-Mar-03 9:32 
Generalis this a clue? Pin
ns26-Mar-03 9:25
ns26-Mar-03 9:25 
GeneralRe: is this a clue? Pin
Ravi Bhavnani26-Mar-03 9:31
professionalRavi Bhavnani26-Mar-03 9:31 
GeneralRe: is this a clue? Pin
ns26-Mar-03 9:42
ns26-Mar-03 9:42 
GeneralRe: is this a clue? Pin
Tim Smith26-Mar-03 9:53
Tim Smith26-Mar-03 9:53 
GeneralRe: is this a clue? Pin
Ravi Bhavnani26-Mar-03 10:00
professionalRavi Bhavnani26-Mar-03 10:00 
GeneralRe: is this a clue? Pin
ns27-Mar-03 1:51
ns27-Mar-03 1:51 
Generalno go... Pin
ns27-Mar-03 2:25
ns27-Mar-03 2:25 

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.