cant get WS_TABSTOP to work
btnstarttime.Create("Start Time", WS_VISIBLE | BS_DEFPUSHBUTTON | WS_TABSTOP, CRect(CPoint(5,35),CSize(150,25)), this, IDC_BTN_STARTTIME);
btnendtime.Create("End Time", WS_VISIBLE |WS_TABSTOP, CRect(CPoint(200,35),CSize(150, 25)), this, IDC_BTN_ENDTIME);
when i run the program i cant cycle between fields pressing tab or any arrow keys
how do you get tab'able controlls?
[403 byte] By [
jp1952] at [2007-11-19 19:32:53]

# 1 Re: cant get WS_TABSTOP to work
Tab button is handled by IsDialogMessage function. This is done automatically only for modal dialog. If parent window is modeless dialog or other window, you need to call IsDialogMessage manually: http://msdn2.microsoft.com/en-us/library/eb65x3z3.aspx
BOOL CMyDlg::PreTranslateMessage( msg )
{
if( IsDialogMessage( msg ) )
return TRUE;
else
return CWnd::PreTranslateMessage( msg );
}
Alex F at 2007-11-10 23:43:36 >

# 2 Re: cant get WS_TABSTOP to work
i run PreTranslateMessage and use
if((::GetKeyState(VK_TAB) < 0))
{
CMainFrame::OnSwitch("to run my GetState/SetFocus");
}
return FALSE
}
return CMainFrame::PreTranslateMessage(pMsg);
and it goes bananas back and forth and back and forth round and round...
how do i limit one keystrokes worth of input from PreTranslateMessage?
i tried
Sleep(1000);
to see if it just charges strait to the end of the if/else statements
it doesnt... it comes back around if you do it rite... only 2 controlls...
Any Suggestions?
jp1952 at 2007-11-10 23:44:33 >
