I have one MFC Application. there is one CBUTTON. I had write code create CDialog on CBUTTON click. If i am use DOMODAL method for creating cdialog then keyboard tab working fine but if i am use CREATE method then keyboard tab not working.
1 Answers
You probably are not calling the IsDialogMessage
, which is required to ensure that modeless dialog boxes process keyboard input correctly.
This is not necessary with modal dialogs (i.e., those created by calling the DoModal
method) because Windows handles it internally.
This doesn't make much sense as an explanation, though, because you're using MFC, which should ensure that IsDialogMessage
is called in the message loop for modeless dialogs. That's the whole point of using a framework: it keeps you from forgetting details like this. I can't guess why it isn't working like it should for you; you didn't show us any code. Note that the Visual Studio wizards write the correct code for you automatically. It's recommended that you use them when adding new dialogs to your app.
Joseph Newcomer's article on Creating a Modeless Dialog Box with MFC might be helpful reading.