list_16_07.c

来自「This source code has been tested under O」· C语言 代码 · 共 48 行

C
48
字号
/*************************************************************************                                                                    ****  listing_16_07.c                                                   ****                                                                    ****  Command-line Options example. This program accepts options to     ****  change the width and height of its label.                         ****                                                                    *************************************************************************/#include <Xm/Label.h>Widget		    appshell,		    the_label;XrmOptionDescRec    cmd_options[] =                     {			{			"-height",			"*TheLabel.height",			XrmoptionSepArg,			NULL			},			{			"-width",			"*TheLabel.width",			XrmoptionSepArg,			NULL			}		    };void main( argc, argv )    int     argc;    char    *argv[];{    appshell = XtInitialize( argv[0], "Listing_16_07",                              cmd_options, XtNumber(cmd_options),                              &argc, argv );    the_label = XmCreateLabel( appshell, "TheLabel", NULL, 0 );    XtManageChild( the_label );    XtRealizeWidget( appshell );    XtMainLoop();}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?