⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 settitle.cpp

📁 MicroStation源代码
💻 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 + -