Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,631 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Please Add title bar parameter to error() #283303
08/07/09 00:58
08/07/09 00:58
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline OP
Senior Member
pararealist  Offline OP
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
Hi,

Would it be possible to add the title bar string to the
error() function?
OR
could you overload the error function

Code:
error("title str","message");



if title str is "" then it displays the default error code
in title bar, else it displays title str.

This is because i like to display in which function
the error takes place in the title bar.

Last edited by pararealist; 08/07/09 01:03.

A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.
Re: Please Add title bar parameter to error() [Re: pararealist] #283332
08/07/09 08:56
08/07/09 08:56
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
The error() function is sort of superfluous in lite-C. You can just use the Windows MessageBox function, with any title and buttons that you desire.

Re: Please Add title bar parameter to error() [Re: jcl] #283334
08/07/09 09:04
08/07/09 09:04
Joined: Jul 2008
Posts: 894
T
TechMuc Offline
User
TechMuc  Offline
User
T

Joined: Jul 2008
Posts: 894
simply:

Code:
#define errorT(Message,Title) MessageBox(hWnd,Message,Title,MB_OK|MB_ICONSTOP)

errorT("my Message","my Title");



Re: Please Add title bar parameter to error() [Re: jcl] #283339
08/07/09 09:47
08/07/09 09:47
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
But Ive found that doesnt work terribly reliably if you are in full-screen mode.
(unfortunately, this mis-behaviour is not consistant)


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Please Add title bar parameter to error() [Re: EvilSOB] #283348
08/07/09 10:17
08/07/09 10:17
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
For a MessageBox in fullscreen mode, you need to call the DirectX function SetDialogBoxMode(TRUE) before.

if (fullscreen)
d3dDev->SetDialogBoxMode(TRUE);
else
d3dDev->SetDialogBoxMode(FALSE);

MessageBox(hWnd,Text,Title,MB_OK|MB_ICONSTOP|MB_TASKMODAL|MB_SETFOREGROUND|MB_TOPMOST);



Re: Please Add title bar parameter to error() [Re: jcl] #283598
08/08/09 18:06
08/08/09 18:06
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
This calls for a library function smile

Re: Please Add title bar parameter to error() [Re: FBL] #283685
08/09/09 09:28
08/09/09 09:28
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Hmmm, I'll have to look into this. Thanks again JCL.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

Moderated by  old_bill, Tobias 

Gamestudio download | 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