Microsoft KB Archive/81322

= Renaming Compile Results Window with a PWB Extension =

Article ID: 81322

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft Programmer's Workbench for MS-DOS 1.0
 * Microsoft Programmer's Workbench for MS-DOS 1.1
 * Microsoft Programmer's Workbench for MS-DOS 2.0

-



This article was previously published under Q81322



SUMMARY
The following article describes how to rename the Compile Results window in the Programmer's WorkBench (PWB) versions 1.0 and 1.1.



MORE INFORMATION
This is possible because PWB references only the name of the pseudofile that is contained in <>, and whatever comes after that will be displayed as the title of the window. This is illustrated by the following sample.

To rename the Compile Results window:

 First compile and link the sample code. Place the resulting .MXT file in the same directory as PWB. This will normally be the BIN subdirectory. Add the following lines to the TOOLS.INI file under the [pwb] tag to make the function funcname accessible in PWB by using the ALT+Z keystroke:

load:[programname] funcname:alt+z

 After starting PWB, invoke the extension by entering ALT+Z.

MORE information about PWB extensions can be found in Chapter 8 of the &quot;Microsoft C Advanced Programming Techniques&quot; manual, the online help, and in Chapter 9 of the C versions 6.x &quot;Developers Toolkit Reference.&quot;

Sample Code
/* Compile and link options needed: cl /c /ACw /Gs [programname].c       link exthdr.obj [programname].obj, [programname].mxt;  */


 * 1) include &quot;ext.h&quot;

/* function prototype */ PWBFUNC funcname(unsigned argData,                ARG _far *pArg,                 flagType fMeta);

/* switch description table (required for an extension) */ struct swiDesc swiTable[] = { { NULL,NULL,0}};

/* command description table ( required for a pwb extension) */ struct cmdDesc cmdTable[] ={ { &quot;funcname&quot;, funcname, 0, NOARG}, { NULL, NULL, 0, 0}};

/* function that PWB calls when loading the extension */ void EXTERNAL WhenLoaded(void) {       DoMessage(&quot;Loading funcname extension&quot;); }

PWBFUNC funcname(unsigned argData,                       ARG _far *pArg,                        flagType fMeta) {       PFILE pFileCompile; char szNewName[] = &quot;New Name for Window&quot;;

if((pFileCompile = FileNameToHandle(&quot;&quot;,NULL))!=PNULL) SetEditorObject(RQ_FILE_NAME | 0xff, pFileCompile,

szNewName); }

Additional query words: kbinf 1.00 1.10 2.00 PWBIss

Keywords: kb16bitonly KB81322

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.