home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
gkdemo.zip
/
GKFILES.SET
/
EMPLAPPL.C
< prev
next >
Wrap
C/C++ Source or Header
|
1994-12-09
|
2KB
|
70 lines
/*----------------------------------------------------------------------
* Employee Maintenance Example
*/
#define GKInclAll
#include "gk.h"
static void OKButtonNotify(GKObject obj);
static void CancelButtonNotify(GKObject obj);
static void SearchButtonNotify(GKObject obj);
static void HelpButtonNotify(GKObject obj);
/*----------------------------------------------------------------------*/
int main(int argc, char **argv)
{
gkRegisterNamedProcedure("OKButtonNotify",
(GKNamedProcedure)OKButtonNotify);
gkRegisterNamedProcedure("CancelButtonNotify",
(GKNamedProcedure)CancelButtonNotify);
gkRegisterNamedProcedure("SearchButtonNotify",
(GKNamedProcedure)SearchButtonNotify);
gkRegisterNamedProcedure("HelpButtonNotify",
(GKNamedProcedure)HelpButtonNotify);
gkInit(GKInit_Args, &argc, argv,
GKInit_StripArgs,
NULL);
if (gkCreateObjectGroup("EmplGroup") == -1) {
gkError("Couldn't create EmplGroup object group");
exit(1);
}
gkDispatch();
return(0);
}
/*----------------------------------------------------------------------*/
/* NotifyProc for OK button.
*/
static void OKButtonNotify(GKObject obj)
{
gkInfo("Employee Information Updated.");
}
/*----------------------------------------------------------------------*/
/* NotifyProc for Cancel button. Exit application.
*/
static void CancelButtonNotify(GKObject obj)
{
gkDestroyObjectGroup("EmplGroup");
}
/*----------------------------------------------------------------------*/
/* NotifyProc for Search button.
*/
static void SearchButtonNotify(GKObject obj)
{
gkInfo("Search function not implemented.");
}
/*----------------------------------------------------------------------*/
/* NotifyProc for Help button. Bring up some help.
*/
static void HelpButtonNotify(GKObject obj)
{
gkShowHelp(gkFindInstance("EmplFrame"), "emplappl.hlp", NULL);
}