Share this post

Link to post

Share on other sites

If you don''t want your program to pause whilst you display the console, I beleive you can use a ''Modal'' Dialog box. This is done in a similar way to the DialogBox method, Except it does not pause the program waiting for the function to return.

Look up in WinSDK about ''modal'' dialog boxes

--Josh

''My two cents''

0

Share this post

Link to post

Share on other sites

Actually its the other way around. Modal dialog boxes are the type that dont let anything else happen untill you get rid of them. The opposite are modeless dialog boxes. These will coexist with your application, allowing it to continue running. A google search for "modeless dialog box" turns up several helpful pages if you decide to go this route.

Alternativly, have you considered building a console directly into your engine using directx? Its quite simple to do, there is an article here on Gamedev that talks about them:http://www.gamedev.net/banman/banman.asp?ZoneID=1&Task=Get&X=1032096055638

Alan

0

Share this post

Link to post

Share on other sites

Thanks!!!Thanks for all the input guys. AlanKemp you''re right it''s modeless dialog box, and now my game can coexist with the console! By the way, I have seen the article on how to build the console directly into my engine; it''s very cool, but I mainly will use the console for debugging.By the way, if anyone''s interested all I had to change was this MACRO call, DialogBox(NULL, (LPCTSTR)IDD_CONSOLE, hwnd, (DLGPROC)ConsoleProc);, to CreateDialog (NULL, (LPCTSTR)IDD_CONSOLE, hwnd, (DLGPROC)ConsoleProc); and in the console callback function in the WM_INITDIALOG case I had to show the dialog: ShowWindow (g_consoleHDlg, SW_SHOW);

Share this post

Link to post

Share on other sites

Dunno if this will help you but I''ve written (well, re-written - I''ve forgotten where I got the base from) a console class that I use for my graphics programs. It opens a dos console looking thing and uses streams to print stuff to it (ie cout).To use it, simply include the header and call console.open(300,300); and then you can print to it using console << "Test: " << some_var << ":" << some_othervar << "\n";You can also change the colors of it if you want (read the source, I forgot how off the top of my head - I just use the default).Note: endl doesn''t work so you have to use \n. Never bothered me enough to fix it.You can get the code at http://quake.condemned.com/console.zip