Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 927 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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 | 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