|
-
October 3rd, 2011, 09:51 PM
#1
WS_TABSTOP not working with Combobox
I am writing an app in c++ using Windows APIs. I created a COMBOBOX edit control and another regular edit control. The COMBOBOX has the WS_TABSTOP style set but when I try to tab from it, I get a beep.
My COMBOBOX is created as so:
m_hRecipients = CreateWindow(L"COMBOBOX",NULL,WS_VISIBLE | WS_CHILD | WS_BORDER | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_TABSTOP, rc.right/2 - 120, 37, 400, 20,m_hWnd,(HMENU) IDC_EDIT_EMAIL_RECIPIENTS,NULL,NULL);
My callback function is looking for the tab but it never gets called:
switch (uMsg)
{
case WM_CHAR:
// Here I need to check if the user pressed tab and if so, to move the focus to the next tab stop
if( wParam == VK_TAB )
{
// THIS NEVER GETS CALLED
return true;
}
return true;
If I use the style EM_SETTABSTOPS instead of WS_TABSTOP, the tab works but then I can't edit the Combobox at all. I'm not sure what I'm doing wrong.
I would apprecaite any help.
Thank you,
Rakefet
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|