Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / VC Output window from within void DarkSDK(void)...?

Author
Message
Lampton Worm
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 7th Jan 2006 17:40
Hi,

Is it possible to dump out custom debug info to the Output window in VC when debugging a DGSDK app?

Cheers
Miguel Melo
18
Years of Service
User Offline
Joined: 8th Aug 2005
Location:
Posted: 7th Jan 2006 19:07 Edited at: 7th Jan 2006 19:08
Sure, if you add the following include at the top of your cpp file



You can then dump messages to the output window with



Note that there are other versions of the macro RPT* (RPT1, RPT2 etc) that automatically take further number of parms and expand in the message, much like printf does. Eg:

Lampton Worm
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 8th Jan 2006 13:13 Edited at: 8th Jan 2006 16:03
Spot on, thanks.

[EDIT], not sure if the forum mangled the paste, but in VC7.1 anyway the macro needs an underscore first, i.e. _RPT0

Cheers
Paisleys finest
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: In a house
Posted: 12th Jan 2006 16:53
I wouldn't waste my time with that #include

I would just use the Win32 API OutputDebugString instead, and use DebugView (www.sysinternals.com) to view the output. The good thing is, once the exe is compiled you can still get the debug output - good for tracing errors.

Scott Tunstall
Author of the UNIFIED ZOMBIE MOD (www.unifiedzombiemod.wz.cz)
Current work in progress: Retro Remake of BRUCE LEE, by Datasoft (1984)
Dark Intruder Returns
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Marlborugh. MA
Posted: 12th Jan 2006 19:50
If you want to force a command prompt to show you can use this function


MSDN Link : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/allocconsole.asp

"In order to understand recursion, one must first understand recursion"
Lampton Worm
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 12th Jan 2006 23:07
Thanks Scott - just had a play with that, works great.

Cheers
Miguel Melo
18
Years of Service
User Offline
Joined: 8th Aug 2005
Location:
Posted: 13th Jan 2006 01:04
Quote: "I would just use the Win32 API OutputDebugString instead, and use DebugView (www.sysinternals.com) to view the output. The good thing is, once the exe is compiled you can still get the debug output - good for tracing errors.
"


This sounds great, must give it a try - thx.

Login to post a reply

Server time is: 2024-05-17 10:25:13
Your offset time is: 2024-05-17 10:25:13