Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
4 registered members (AndrewAMD, Quad, soulman3, Ayumi), 675 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
error function #115959
03/08/07 01:50
03/08/07 01:50
Joined: Dec 2003
Posts: 521
LazyDog Offline OP
User
LazyDog  Offline OP
User

Joined: Dec 2003
Posts: 521
hello,

I'm using the error function to display information when in full-screen mode; however, I'm putting too much information out and the window is not big enough. Would you be willing to show your code for the error function so that I can recreate it and allow for a bigger size? I also want to learn how to put a dialog out when in full screen mode so this would be awesome to learn.

thanks,


www.LazyDogSoftware.com
Delphi SDK Homepage

A7 Pro 780
Delphi 5 through 2010
Re: error function [Re: LazyDog] #115960
03/08/07 08:19
03/08/07 08:19
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
The code is quite complicated because it does a lot of other things, but basically it's just a call to the MessageBox function of the Windows API. You could just call MessageBox with a char* pointer to your message.

Re: error function [Re: jcl] #115961
03/09/07 13:16
03/09/07 13:16
Joined: Dec 2003
Posts: 521
LazyDog Offline OP
User
LazyDog  Offline OP
User

Joined: Dec 2003
Posts: 521
I've tried both of these ways:
Code:
  
messagebox(0,PChar(S),'TEST',MB_OK or MB_TOPMOST or MB_SETFOREGROUND);

messagebox(ev.hWndMain,PChar(S),'TEST',MB_OK or MB_TOPMOST or MB_SETFOREGROUND);



neither show in front of the full screen game window. Are you using full screen exclusive mode? If so, do you switch this exclusive mode off before displaying the error function? Is there something I'm missing or is this just impossible to do from outside the engine?


www.LazyDogSoftware.com
Delphi SDK Homepage

A7 Pro 780
Delphi 5 through 2010
Re: error function [Re: LazyDog] #115962
03/09/07 14:14
03/09/07 14:14
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
You need to prepare the Messagebox by ending the scene (m_pd3dDevice->EndScene()) and calling the DirectX Dialogbox function. This is what we do:

Code:

...
if (!m_bWindowed)
m_pd3dDevice->SetDialogBoxMode(TRUE);
else
m_pd3dDevice->SetDialogBoxMode(FALSE);
}
int result = MessageBox(m_hWnd,
lpText,lpCaption,
uType|MB_TASKMODAL|MB_SETFOREGROUND|MB_TOPMOST);
...




Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1