Jump to content

MessageBox ontop problem


Recommended Posts

Guest aftab518
Posted

Hi All,

I am working on Qtek8310, the problem I am facing is I call

int nResult = MessageBox(GetActiveWindow(), _T("Do this thing...?"), _T("MyApp"), MB_YESNO|MB_ICONQUESTION|MB_TOPMOST);

from a simple exe which doenst have any window...

now when the messagebox is displayed the MessageBox is always ontop but the problem is when I try to press yes or no with soft keys the application just in background is operated instead of this MessageBox....

I have tried

some times when I press back key the MessageBox title becomes MyApp and then I can press soft keys on my messagebox

I tried using

::keybd_event(VK_TBACK, 0, 0, 0);

::keybd_event(VK_TBACK, 0, KEYEVENTF_KEYUP, 0);

just before displaying message box but this doesnt work

please tell me some work around ?

regards

Aftab Alam

  • 2 weeks later...
Guest windowsmobilepro
Posted

How about adding the option MB_SETFOREGROUND?

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.