?? settitle.cpp
字號:
/*----------------------------------------------------------------------+
|
| SetTitle
|
+----------------------------------------------------------------------*/
/*----------------------------------------------------------------------+
|
| STATUS: WORKING
| DATE: 03/09/1999
|
| This example illustrates how to change the title of overall title
| bar, tool settings dialog, and all open view windows
|
+----------------------------------------------------------------------*/
/*----------------------------------------------------------------------+
|
| Include Files
|
+----------------------------------------------------------------------*/
#include <mdl.h>
#include <tcb.h>
#include <cmdlist.h>
#include <dlogids.h>
#include <msdialog.fdf>
#include <mssystem.fdf>
#include <mswindow.fdf>
#include <msview.fdf>
/*----------------------------------------------------------------------+
|
| exitApplication
|
| author BSI 12/98
|
+----------------------------------------------------------------------*/
Private void exitApplication
(
void
)
{
/* Queue up a command to unload the current MDL application */
mdlDialog_cmdNumberQueue (FALSE, CMD_MDL_UNLOAD,
mdlSystem_getCurrTaskID(), TRUE);
}
/*----------------------------------------------------------------------+
|
| main
|
| author BSI 12/98
|
+----------------------------------------------------------------------*/
Private int main
(
int argc, /* => Number of arguments passed in argv */
char *argv[] /* => Array of pointers to arguments */
)
{
MSWindow *mainTitle, *current;
int viewP;
DialogBox *dbP;
/* Change main title */
mainTitle = mdlDialog_overallTitleBarGet();
mdlWindow_titleSet (mainTitle, "- Your Custom Title -");
/* Change Tool Settings title */
dbP = mdlDialog_find (DIALOGID_ToolSettings, NULL);
if (dbP)
{
mdlWindow_titleSet (dbP, "- Your Custom Title -");
}
/* Change all active view titles */
for (current=mdlWindow_getFirst(); current; current=mdlWindow_getNext(current))
{
/* Check if window is a view and view is active */
if((mdlWindow_isView (&viewP, current)) && (mdlView_isActive (viewP)))
{
mdlWindow_titleSet (current, "- Your Custom Title -");
}
}
/* Exit the current MDL application */
exitApplication ();
return (0);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -