home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winui / congui / readme.txt < prev   
Text File  |  1996-01-17  |  3KB  |  68 lines

  1. Console I/O Combined with GUI I/O
  2.  
  3.  
  4. SUMMARY
  5. =======
  6.  
  7. The ConGUI sample demonstrates how a standard console application can take 
  8. advantage of some of the graphical capabilities of Windows NT.
  9.  
  10. Disclaimer:
  11.  
  12. This sample application illustrates a method by which a console application 
  13. can utilize some (but not all) of the graphical user interface (GUI) 
  14. capabilities of the Win32 API. It was not the original design intention of 
  15. the Console layer of Windows NT to allow it to interact in this manner 
  16. with the graphical API, and because of this, it is possible to run into 
  17. problems if you try to accomplish too much.
  18.  
  19. Please use restraint in your usage of the graphical Win32 API in your 
  20. console application. If your needs go beyond the simple methods 
  21. illustrated here, you should probably consider designing your application 
  22. as a full GUI application.
  23.  
  24. MORE INFORMATION
  25. ================
  26.  
  27. There are many applications that have nothing to gain by implementing full-
  28. fledged GUI with title bars, menus, scrollable client area, and so forth. 
  29. However, a console application can take advantage of GUI features. 
  30.  
  31. Take the example of a compiler. A compiler has no need for menus, button 
  32. bars, or many of the other UI aspects of a standard Windows application. 
  33. However, you may want your compiler to provide on-line assistance with the 
  34. command-line switches that the compiler supports.
  35.  
  36. ConGUI illustrates the usage of a '/dialog' parameter, which brings up a 
  37. dialog box that assists the user in selecting parameters for the command 
  38. line. To provide a little more information about some of those switches,
  39. allow the user to access a Windows help file. ConGUI shows how easy it is 
  40. for a console application to make standard WinHelp calls to access the 
  41. Windows help engine.
  42.  
  43. In addition, ConGUI shows how it is possible for a console application to 
  44. figure out how it was launched. It can be useful for a text application to 
  45. know that it was being launched into its own window, because when it closes, 
  46. the window into which it has written all of its output is closed as well. 
  47.  
  48. Try the following methods of executing ConGUI, and notice how it behaves:
  49.  
  50.   - Double-click on the CONGUI.EXE from the File Manager or Windows 
  51.     Explorer. 
  52.  
  53.   - Add ConGUI to a group in the Program Manager or create a short-cut, and 
  54.     double-click on the icon.
  55.  
  56.   - From a command prompt, type: 
  57.  
  58.       CONGUI
  59.  
  60.   - From a command prompt, type: 
  61.   
  62.       START CONGUI
  63.  
  64.   - From a command prompt, type: 
  65.  
  66.       CONGUI > TEMP.TXT
  67.  
  68.