October 16, 200619 yr When a gauge needs to display an error message, the MessageBox works fine when FSX is in windowed mode, but when it is in full screen mode, the mesageBex appears behind, so it is invisible...Do you have any idea to make it work fine?Thanks,Eric My Web Site
October 17, 200619 yr Author I noticed that is also happens with FS2004. When it is in full screen mode and the gauge displays a messageBox, it appears BEHIND the FS window, so it is invisible...Any help is greatly welcome.Eric My Web Site
October 17, 200619 yr Commercial Member Hi EricWhat happens if you make the messagebox modal? In theory it should then stay on top because a modal box suspends everything else until it is acted on.-Dai
October 17, 200619 yr Author A message box is naturally modal, you don't have anything to do to make it modal. You're absolutely right, as it is a modal window, it suspends everything until it is closed. So this leads to a strange situation: the message box pops up (behind the FS window, so it is invisible), and FS is suspended... If you don't know what is happening, you may think FS is blocked and you have to close it. In fact, if you just press Return, it acts as if you press the OK button of the message box, and FS comes back to life...I'm helpless :-(Eric My Web Site
October 17, 200619 yr You could build a gauge to display your messages. Set all the gauge elements to be hidden if the length of the displayed string is zero. The mouse click function for the gauge could be used to clear the string, thus returning all the gauge elements to a hidden state.Doug
October 17, 200619 yr Commercial Member MB_SystemModal should do the trick. IIRC - and it's been a while since I used it - MB_SystemModal halts everything and makes the messagebox the TopMost window.-Dai
October 18, 200619 yr You have to put FSX into "DialogMode" first, then display your dialog. The SimConnect SDK has a sample program that shows you how to do it.
October 19, 200619 yr Author Hello Guys,OK for FSX, but what about FS2004?MB_SYSTEMMODAL still didn't do the trick. When FS2004 is in full screen mode, the MessageBox hangs all the other applications, but still appears behind FS2004. Sometimes it is in front (perfect), sometimes in the back (invisible)...I think I will develop a specific gauge for message displays...Thanks for your help !!Eric My Web Site
October 19, 200619 yr For FS2004 I just used the standard MessageBox function, passing in the window handle to FS98MAIN. Worked fine for me.
October 20, 200619 yr Author I tried everything, by passing the FS window handle or by passing NULL as the window handle. In both cases, the result is the same: it sometimes work fine, and sometimes not. I really don't know on what it depends, but I can't be 100% sure the message box is displayed IN FRONT of the FS window (full screen).I keep searching...Thanks ;-)Eric My Web Site
October 21, 200619 yr >I tried everything, by passing the FS window handle or by>passing NULL as the window handle. In both cases, the result>is the same: it sometimes work fine, and sometimes not. I>really don't know on what it depends, but I can't be 100% sure>the message box is displayed IN FRONT of the FS window (full>screen).>I keep searching...>>Thanks ;-)>Eric>The problem is DirectX.To display a dialog box in full screen mode in DirectX, you need to flip from the back buffer to the primary buffer.There is an example of a Dialog in full screen mode in the DirectX SDK (part of the platform SDK). But if you want I could send you the DX full screen examples from the SDK.email me at '[email protected]' Myself I was unsuccessfull in getting a popup dialog to work in a FS2004 gauge, and eventually gave up. But I'd be interested in seeing this work out if someone has more determination than I did.RegardsErnie.
October 26, 200619 yr Author Hello Ernie,Did you forget me?I conacted you by e-mail but never got any reply. You can send me the piece of code directly to my mail:[email protected],Eric My Web Site
Create an account or sign in to comment