Click here to Skip to main content
15,894,540 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMenu ??? Pin
dktu7-Jan-03 17:39
dktu7-Jan-03 17:39 
AnswerRe: Menu ??? Pin
l a u r e n7-Jan-03 17:57
l a u r e n7-Jan-03 17:57 
AnswerRe: Menu ??? Pin
Simon.W7-Jan-03 19:49
Simon.W7-Jan-03 19:49 
GeneralNeed help with dlls Pin
VanHlebar7-Jan-03 16:41
VanHlebar7-Jan-03 16:41 
GeneralRe: Need help with dlls Pin
Jim Crafton7-Jan-03 17:58
Jim Crafton7-Jan-03 17:58 
GeneralRe: Need help with dlls Pin
TOMTEFAR7-Jan-03 20:41
TOMTEFAR7-Jan-03 20:41 
GeneralListBox WM_VKEYTOITEM misbehaves! Pin
Brian Tietz7-Jan-03 15:30
Brian Tietz7-Jan-03 15:30 
GeneralRe: ListBox WM_VKEYTOITEM misbehaves! Pin
Brian Tietz7-Jan-03 16:01
Brian Tietz7-Jan-03 16:01 
I did find a workaround, but it isn't very nice...here it is:


SendMessage( (HWND)m_commands_list, LB_SETCURSEL, matching_index, 0);
m_windows_suck_workaround = true;


Then way back out in WinMain, in the Translate/Dispatch loop:


if(msg.message == WM_CHAR && m_windows_suck_workaround)
{
m_windows_suck_workaround = false;
continue;
}
TranslateMessage(&msg);
DispatchMessage(&msg);


It's actually not quite as indicated because of the objects involved (the m_ prefix betrays the fact that it's a member variable in an MDIChildWindow_t subclass but the above code shows the gist of it.

The question still stands, but I'll rephrase it as does anyone know a more appropriate workaround?

Thanks,
Brian
GeneralRe: ListBox WM_VKEYTOITEM misbehaves! Pin
l a u r e n7-Jan-03 18:00
l a u r e n7-Jan-03 18:00 
GeneralCDataGrid Pin
Gilfrog7-Jan-03 12:11
Gilfrog7-Jan-03 12:11 
GeneralWM_TIMER and SetTimer Pin
Sunnygirl7-Jan-03 12:02
Sunnygirl7-Jan-03 12:02 
GeneralRe: WM_TIMER and SetTimer Pin
Mike Nordell7-Jan-03 15:49
Mike Nordell7-Jan-03 15:49 
GeneralArrays of control Pin
TV7-Jan-03 10:21
TV7-Jan-03 10:21 
GeneralRe: Arrays of control Pin
Alvaro Mendez7-Jan-03 11:50
Alvaro Mendez7-Jan-03 11:50 
GeneralRe: Arrays of control Pin
Heywood7-Jan-03 12:50
Heywood7-Jan-03 12:50 
GeneralRe: Arrays of control Pin
Andreas Saurwein8-Jan-03 0:38
Andreas Saurwein8-Jan-03 0:38 
Generalsystem, _wsystem calls within MSVC++ dialog applications Pin
rghin7-Jan-03 8:49
rghin7-Jan-03 8:49 
GeneralRe: system, _wsystem calls within MSVC++ dialog applications Pin
AlexO7-Jan-03 9:15
AlexO7-Jan-03 9:15 
GeneralRe: system, _wsystem calls within MSVC++ dialog applications Pin
valikac7-Jan-03 9:25
valikac7-Jan-03 9:25 
GeneralRe: system, _wsystem calls within MSVC++ dialog applications Pin
Alvaro Mendez7-Jan-03 9:25
Alvaro Mendez7-Jan-03 9:25 
GeneralWindows Hooks Pin
Nnamdi Onyeyiri7-Jan-03 8:07
Nnamdi Onyeyiri7-Jan-03 8:07 
GeneralRe: Windows Hooks Pin
Nish Nishant7-Jan-03 10:05
sitebuilderNish Nishant7-Jan-03 10:05 
GeneralRe: Windows Hooks Pin
Nnamdi Onyeyiri7-Jan-03 10:34
Nnamdi Onyeyiri7-Jan-03 10:34 
GeneralRe: Windows Hooks Pin
Nish Nishant7-Jan-03 11:31
sitebuilderNish Nishant7-Jan-03 11:31 
GeneralCRichEdit crashes Pin
Ricky_TheBard7-Jan-03 8:06
Ricky_TheBard7-Jan-03 8:06 

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.