Debugging
Hi,
I am using DirectX8.0 ''s sample programe for reference to implement my network program.
But all the sample using Dialog for display...
it seems to me that debugging would be difficult...
Can I run the "server" in cosole mode so that it''s easy to see the flow of msg handling?
Thanks,
yanny
DirectPlay offers an option to write everything to a "Debug console", but I never figured out how to do it exactly. Maybe some of other DP programmers here know how to do it?
www.persistentrealities.com for Inline ASM for VB, VB Fibre, and other nice code samples in C++, PHP, ASP, etc.<br/>Play Yet Another Laser Game!<br/>
Isn''t that debug console simply the debug output you can listen to in MSVC++?
Anyway, there''s nothing to stop you from creating a dialog box with some kind of console element in it, where you can con_printf() to. Or you might even be able to just write a console app (not sure whether you can use DirectX from a console app, though I don''t see why you couldn''t) and use bog standard printf()s for the logging.
cu,
Prefect
Anyway, there''s nothing to stop you from creating a dialog box with some kind of console element in it, where you can con_printf() to. Or you might even be able to just write a console app (not sure whether you can use DirectX from a console app, though I don''t see why you couldn''t) and use bog standard printf()s for the logging.
cu,
Prefect
Widelands - laid back, free software strategy
You can do pretty much anything from a console app.. it''s just annoying if you are using a bunch of UI, because you have the console around too.
When using a console app (ie. main() instead of WinMain()), you can just query for the parameters that are normally passed to WinMain(), like hInstance, nCmdShow, etc.
You should be able to get hInstance by doing:
And nCmdShow from:
You can probably even shed the console window if you want using FreeConsole(), but that might cause problems since the CRT functions would have been initialized to use a console (though by freeing it, they might redirect output to a bit bucket).
-Brannon
When using a console app (ie. main() instead of WinMain()), you can just query for the parameters that are normally passed to WinMain(), like hInstance, nCmdShow, etc.
You should be able to get hInstance by doing:
hInstance = GetModuleHandle(NULL);
And nCmdShow from:
GetStartupInfo(&si);nCmdShow = si.wShowWindow
You can probably even shed the console window if you want using FreeConsole(), but that might cause problems since the CRT functions would have been initialized to use a console (though by freeing it, they might redirect output to a bit bucket).
-Brannon
-Brannon
Prefect: I meant using dbmon.exe (And VB )
But I guess C++ can be much easier with the debug output
But I guess C++ can be much easier with the debug output
www.persistentrealities.com for Inline ASM for VB, VB Fibre, and other nice code samples in C++, PHP, ASP, etc.<br/>Play Yet Another Laser Game!<br/>
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement