Hello everyone,
I am developping a win32 application for smartphone that needs to open a modeless dialog to display information.
The dialog is showing up, but the problem is that it seems not to have the focus.
Indeed I can't use its menubar, nor can I edit or go to my textfileds on the dialog.
Please help!

urgent: modeless dialog doesn't get focus
DirtyHowi
I've read that SetFocus( ) was not the appropriate code and that we had to do a PostMessage.
Unfortunatly, this doesn't help....
vessel
barontufsap
Here's the end of the WM_INITDIALOG message treatment in the DLGPROC function:
PostMessage(hDlg,WM_NEXTDLGCTL,(WPARAM)GetDlgItem(hDlg,IDC_RESPONSE_STATE),(LPARAM)TRUE);
PostMessage(hDlg,WM_NEXTDLGCTL,(WPARAM)GetWindow(hDlg,IDC_RESPONSE_STATE),(LPARAM)TRUE);
SetFocus(GetDlgItem(hDlg,IDC_RESPONSE_STATE));
SetFocus(GetWindow(hDlg,IDC_RESPONSE_STATE));
return FALSE;
Antony Kancidrowski
Marius_m
"The dialog box procedure should return TRUE to direct the system to set the keyboard focus to the control given by hwndFocus. Otherwise, it should return FALSE to prevent the system from setting the default keyboard focus. "
return TRUE and you'll be all set.