|
|
Microsoft Windows NT Build 511 (SDK Final Release) 07-24-1993
{\rtf1\ansi \deff0\deflang1024{\fonttbl{\f0\froman Times New Roman;}{\f1\froman Symbol;}{\f2\fswiss Arial;}{\f3\froman CG Times (W1);}{\f4\fswiss Univers (W1);}{\f5\fswiss MS Sans Serif;}{\f6\fmodern Courier;}
{\f7\fmodern Courier New;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue127;
\red0\green127\blue127;\red0\green127\blue0;\red127\green0\blue127;\red127\green0\blue0;\red127\green127\blue0;\red127\green127\blue127;\red192\green192\blue192;}{\stylesheet{\s244\li120\sb80\sl-240 \f5\fs18\up6\lang1033
\sbasedon0\snext0 footnote reference;}{\s245\li120\sb80\sl-240 \f5\fs20\lang1033 \sbasedon0\snext0 footnote text;}{\s251\fi-245\li360\sb120\sa60\sl-240 \f5\fs20\lang1033 \sbasedon253\snext251 heading 4;}{\s252\li120\sb120\sa60\sl-240 \f5\fs20\lang1033
\snext0 heading 3;}{\s253\li120\sb120\sa60\sl-240 \b\f5\fs20\lang1033 \snext0 heading 2;}{\s254\li120\sb280\sa120\sl-320 \b\f5\lang1033 \snext10 heading 1;}{\s255\li360\sb80\sl-240 \f5\fs20\lang1033 \snext0 Normal Indent;}{\li120\sb80\sl-240
\f5\fs20\lang1033 \snext0 Normal;}{\s2\fi-240\li600\sb60\sl-240 \f5\fs20\lang1033 \snext2 Jli;}{\s3\li120\sb60\sl-240\keep\tx520\tx920\tx1320\tx1720\tx2120 \f6\fs16\lang1033 \snext3 Ex;}{\s4\li120\sb160\sl-240 \f5\fs20\lang1033 \snext13 Sa1;}{
\s5\fi-240\li360\sl-240\tx360 \f5\fs20\lang1033 \snext6 Lb1;}{\s6\fi-240\li360\sb60\sl-240\tx360 \f5\fs20\lang1033 \snext6 Lb2;}{\s7\li360\sb60\sl-240 \f5\fs20\lang1033 \snext6 Lp1;}{\s8\li115\sb120\sa40\sl-240\brdrb\brdrs\brdrw15\brsp20 \brdrbtw
\brdrs\brdrw15\brsp20 \b\f5\fs20\lang1033 \snext9 Th;}{\s9\li115\sb60\sl-240 \f5\fs20\lang1033 \snext9 Tp;}{\s10\li120\sl-240 \f5\fs20\lang1033 \snext0 Normal 2;}{\s11\li120\sb120\sa120 \f5\fs20\lang1033 \snext0 bitmap;}{\s12\li120\sb120\sl-240
\f5\fs20\lang1033 \snext13 Sa2;}{\s13\fi-240\li360\sb60\sl-240 \f5\fs20\lang1033 \snext13 Jl;}{\s14\li115\sb120\sa40\sl-240\brdrb\brdrs\brdrw15\brsp20 \brdrbtw\brdrs\brdrw15\brsp20 \f5\fs20\lang1033 \sbasedon8\snext9 Th2;}{\s15\li115\sb120\sa40\sl-240
\brdrb\brdrs\brdrw15\brsp20 \brdrbtw\brdrs\brdrw15\brsp20 \b\f5\fs16\lang1033 \sbasedon8\snext9 Th3;}{\s16\li115\sb200\sl-240 \f5\fs20\lang1033 \sbasedon0\snext0 Normal 3;}{\s17\fi-1800\li1915\sb120\sa40\sl-240\brdrb\brdrs\brdrw15\brsp20 \brdrbtw
\brdrs\brdrw15\brsp20 \tx1915 \b\f5\fs20\lang1033 \sbasedon0\snext18 Thh;}{\s18\fi-1800\li1915\sb60\sl-240\tx1915 \f5\fs20\lang1033 \sbasedon0\snext18 Tph;}}{\info{\author TRIO}{\creatim\yr1993\mo2\dy8\hr13\min44}{\version1}{\edmins1333}{\nofpages2}
{\nofwords600}{\nofchars3340}{\vern16504}}\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\gutter0 {\*\template C:\\WINAPPS\\WINWORD\\WHAT31.DOT}\sectd \linex0 \pard\plain \s254\li115\sb280\sa120\sl-320\keepn \b\f5\lang1033 {\plain
\f5\fs18\up6\lang1033 ${\footnote \pard\plain \s245\li120\sb80\sl-240 \f5\fs20\lang1033 {\fs18\up6 $} Contents}} {\plain \f5\fs18\up6\lang1033 #{\footnote \pard\plain \s245\li120\sb80\sl-240 \f5\fs20\lang1033 {\fs18\up6 #} Contents}} {\plain
\f5\fs18\up6\lang1033 K{\footnote \pard\plain \s245\li120\sb80\sl-240 \f5\fs20\lang1033 {\fs18\up6 K} Contents}} ConGUI : A Simple Example Application
\par \pard\plain \s10\li120\sl-240 \f5\fs20\lang1033 ConGUI - Is a simple example of how a standard 'console' application might also take advantage of some of the graphical capabilities of Windows NT.
\par \pard\plain \li120\sb80\sl-240 \f5\fs20\lang1033
\par There are many applications that for one reason or another would have nothing to gain by implementing full fledged 'GUI' interface with Title Bars, Menus, Scrollable Client Area etc. But that doesn't mean they have to be stuck in the world of characters f
orever...
\par Take the example of a compiler for instance.
\par By itself, and not as a 'module' of some monster IDE, a
compiler really has no need for menus, button bars, or many of the other UI aspects of a standard Windows application. The user of a compiler simply wants to launch the compiler with special command line switches, and let it do its thing, then return con
trol back to the user. In this scenerio however, there is a timer where the user might want the compiler to be 'friendlier' then what the current generation of compiler is. Do you know what all the command line switches are for your compiler? Do you occas
ionally want some on-line assistance with understanding what the compiler is capable of?
\par The current Microsoft C compiler, has a 'help' mode where you specify a command line of:
\par {\b\f7 \tab }{\b\f7 C:> CL /?}{\b\f7
\par }
And it will promptly spill out 4 screens worth of information on the available switches. Missed one of them? Ooops, better run that command again, and this time have a pencil and paper ready to jot down some notes. Hmmm, was that a /c or /C for compile on
ly? Ooops, better run that command again...
\par
\par ConGUI illustrates the useage of a '/dialog' parameter, which will bring up a fully functional dialog box that will assist the user in selecting the parameters that they want for the command line.
\par
\par Want to see a little more information about some of those switches? Then allow the user to access a full featured WinHelp file like other 'GUI' applications have. ConGUI shows how it is extrememly easy for a console application to make standard WinHelp ca
lls to access the grapical help engine.
\par
\par Another feature that ConGUI shows,
is how it is possible for a console application to figure out how it was launched. It would often be useful for a text application to realize that it was being launched into its own window, and that when it closed down, the window it had written all of i
ts output into would be closed down as well. Windows NT doesn't currently provide an easy mechanism for doing this, but by making a couple of calls to determine some of the window states, an application can do a pretty good job at figuring this out.
\par To see this in action, try the following methods of executing ConGUI, and notice how it behaves:
\par \pard \li720\sb80\sl-240 - Double click on the .EXE from the File Manager
\par - Add it to a group in the Program Manager, and double click on it from there.
\par - From a command prompt, type : {\b\f7 CONGUI}
\par - From a command prompt, type : {\b\f7 START CONGUI}
\par - From a command prompt, type : {\b\f7 CONGUI > TEMP.TXT}{\b\f7
\par }\pard \li120\sb80\sl-240
\par This sample application is not necessarily intended to demonstrate 'the' way that console applications should be written for Windows NT, it is mearly d
emonstrating a possible way you could add some additional features to your application to make it more useful to your users, and hopefully stand out from some of your competition.
\par
\par }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.