http://freesoft.cei.gov.cn/motif/top.htm
解决方案 »
- 动态创建了一个图片控件,怎么在控件中显示我打开的图片
- Windowless RichEdit 中,怎样实现对Bitmap,gif图片等OLE对象的复制粘贴?
- 如何自动设置ListView控件的大小
- error C2504: 'CObject' : base class undefined
- 提问关于TCP的内容,为什么会比UDP慢那么多?
- 求异步模式下,多客户端,单服务器端的文件传输源代码
- 做为中国人,应该知道自己的悲哀
- 假如面试时间有冲突,你会怎么处理!!!!
- 100分急切期盼ADO错误--runtime error!!
- 请问:如何制作,可以在安装时进行选择语言版本的SetUp文件?
- 请教如何在Visual C++程序中显示gif,jpeg,jpg等格式的图像?
- 急!!!那里 有 XteamLindows 的 下载???
在初时化的 fallback 中
每次建立XmString时使用FontSet
本例所演示的是第二种, 编译: gcc -I/usr/X11R6/include -o motif motif.c -L/usr/X11R6/lib -lXm -lX11, 运行结果为: 请注意: LessTif不支持XIM输入
// file motif.c#include <X11/Xlib.h>
#include <X11/keysym.h>
#include <Xm/TextF.h>
#include <Xm/TextFP.h>
#include <Xm/LabelG.h>
#include <Xm/RowColumn.h>
#include <locale.h>
#include <ctype.h>
String fallbacks[] = {
"*fontList:8x16,cclib16_1",
NULL
};main(int argc, char *argv[])
{
Widget toplevel, text_w, rowcol;
XtAppContext app; setlocale(LC_ALL, ""); toplevel = XtVaAppInitialize(&app, "Demos",
NULL, 0, &argc, argv, fallbacks, NULL); rowcol = XtVaCreateWidget("rowcol",
xmRowColumnWidgetClass, toplevel,
XmNorientation, XmHORIZONTAL,
NULL);
XtVaCreateManagedWidget("请输入:",
xmLabelGadgetClass, rowcol, NULL); text_w = XtVaCreateManagedWidget("text_w",
xmTextFieldWidgetClass, rowcol,
NULL); XtAddCallback(text_w, XmNactivateCallback, Test, 0); XtManageChild(rowcol); XtRealizeWidget(toplevel); XtAppMainLoop(app);
}http://www.turbolinux.com.cn/pub/mirrors/openmotif/R2.1.30/motif/