Hi all,
on windows mobile, I want to use the MessageBox Win32 function in one EdgeLib application. My code is below (it is just a test). On stylus down event, I display a message box. On OK I want to quit and on Cancel I want to resume.
My problem is that on Cancel, the EdgeLib window is no longer active. Of course it works if, in OnFrameworkConfig, I add:
But I don't want to have this option false all the time. So do you know a solution to add in the IDCANCEL case to reactivate/maximize the EdgeLib window ?
I already tried SetForegroundWindow (hwnd), SendMessage (...) and PostMessage (...) without success.
Many thanks.
on windows mobile, I want to use the MessageBox Win32 function in one EdgeLib application. My code is below (it is just a test). On stylus down event, I display a message box. On OK I want to quit and on Cancel I want to resume.
- Code:
void ClassMain::OnStylusDown(POINT pnt)
{
HWND hwnd = (HWND) GetWindowHandle ();
int msgboxID = MessageBox(hwnd,
(LPCWSTR)L"Voulez-vous vraiment quitter ?",
(LPCWSTR)L"",
MB_OKCANCEL);
switch (msgboxID)
{
case IDCANCEL:
break;
case IDOK:
Quit();
break;
}
}
My problem is that on Cancel, the EdgeLib window is no longer active. Of course it works if, in OnFrameworkConfig, I add:
- Code:
config->focusminimize = false;
But I don't want to have this option false all the time. So do you know a solution to add in the IDCANCEL case to reactivate/maximize the EdgeLib window ?
I already tried SetForegroundWindow (hwnd), SendMessage (...) and PostMessage (...) without success.
Many thanks.