[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
|
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
3282.0. "Using resource file." by HGOVC::ALFREDLEUNG () Thu Aug 30 1990 04:53
I hope to know how to use the resoure file to define value of a
resource.
Say example, to define the foreground color of the following simple
example. I try my best to get these from manual, but I read all the
manuals that I have, it doesn't tell anything about it. May be I don't
have the right one that I should have, so please tell me:
1. How to define the name of the resource file?
2. What is the name of application specific class resource file?
I only know that it is in DECW$SYSTEM_DEFAULTS directory!
3. What is the file DECW$XDEFAULTS-HOST.DAT use for?
4. Which manual should give me this information(I am using VMS)?
I really don't want to ask such these straight forward questions, but
no manual, no choice, thank for any information.
/* DWT1.c - simple HelloWorld.c using toolkit high-level interface
*/
#include <stdio.h>
#include <DECwDwtApplProg.h>
static XtCallbackProc ButtonActivated();
/* callback procedure */
static DwtCallback activate_callback[] = {
/* callback list */
{ButtonActivated, NULL},
{NULL, NULL}
};
main(argc, argv)
unsigned int argc;
char *argv[];
{
Widget top_level, push_button;
/* Initialize the toolkit, and create the top-level widget */
top_level = XtInitialize("Hi!", /* application name */
"Example", /* application class */
NULL, /* pointer to options */
0, /* number of options */
&argc, argv); /* command line */
/* Create push-button widget using high-level interface */
push_button = DwtPushButton(top_level,
/* parent widget */
"pushButton", /* widget instance name */
0, 0, /* x and y */
DwtLatin1String("Hello, World!"),
/* label */
activate_callback, /* primary callback list */
NULL); /* no help callback */
/* Include push button in its parent's managed set */
XtManageChild(push_button);
/* Realize the widget hierarchy, creating and mapping windows */
XtRealizeWidget(top_level);
XtMainLoop(); /* Never returns */
}
static XtCallbackProc ButtonActivated(widget, tag, reason)
Widget widget;
char *tag;
DwtAnyCallbackStruct *reason;
{
exit(1);
}
T.R | Title | User | Personal Name | Date | Lines
|
---|