source: trunk/fm4.c@ 1330

Last change on this file since 1330 was 1215, checked in by John Small, 17 years ago

Ticket 187: Move data declarations/definitions out of fm3dll.h

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1
2/***********************************************************************
3
4 $Id: fm4.c 1215 2008-09-13 06:54:03Z jbs $
5
6 fm/2 lite applet
7
8 Copyright (c) 1993-98 M. Kimes
9 Copyright (c) 2008 Steven H.Levine
10
11 05 Jan 08 SHL Sync
12
13***********************************************************************/
14
15#include <string.h>
16
17#define INCL_DOS
18#define INCL_WIN
19#define INCL_LONGLONG
20
21#include "dll\fm3dll.h"
22#include "dll\mainwnd.h" // Data declaration(s)
23#include "dll\notebook.h" // Data declaration(s)
24#include "dll\tools.h"
25#include "dll\version.h"
26#include "dll\mainwnd2.h" // StartFM32
27#include "dll\init.h" // InitFM3DLL
28
29int main(int argc, char *argv[])
30{
31 HAB hab;
32 HMQ hmq;
33 QMSG qmsg;
34 HWND hwndFrame;
35
36 strcpy(appname, "FM/4");
37 {
38 INT x;
39
40 for (x = 1; x < argc; x++) {
41 if (*argv[x] == '+' && !argv[x][1])
42 fLogFile = TRUE;
43 if (*argv[x] == '-') {
44 if (argv[x][1])
45 strcpy(profile, &argv[x][1]);
46 }
47 }
48 }
49 DosError(FERR_DISABLEHARDERR);
50 hab = WinInitialize(0);
51 if (hab) {
52 hmq = WinCreateMsgQueue(hab, 2048);
53 if (hmq) {
54 if (InitFM3DLL(hab, argc, argv)) {
55 if (CheckVersion(VERMAJOR, VERMINOR)) {
56 hwndFrame = StartFM32(hab, argc, argv);
57 if (hwndFrame != (HWND) 0) {
58 for (;;) {
59 if (!WinGetMsg(hab, &qmsg, (HWND) 0, 0, 0)) {
60 if (qmsg.hwnd)
61 qmsg.msg = WM_CLOSE;
62 else
63 break;
64 }
65 if (hwndBubble &&
66 ((qmsg.msg > (WM_BUTTON1DOWN - 1) &&
67 qmsg.msg < (WM_BUTTON3DBLCLK + 1)) ||
68 (qmsg.msg > (WM_CHORD - 1) &&
69 qmsg.msg < (WM_BUTTON3CLICK + 1))) &&
70 WinIsWindowVisible(hwndBubble))
71 WinShowWindow(hwndBubble, FALSE);
72 WinDispatchMsg(hab, &qmsg);
73 }
74 if (WinIsWindow(hab, WinWindowFromID(hwndFrame, FID_CLIENT)))
75 WinSendMsg(WinWindowFromID(hwndFrame,
76 FID_CLIENT),
77 WM_CLOSE, MPVOID, MPVOID);
78 }
79 }
80 }
81 DosSleep(250L);
82 WinDestroyMsgQueue(hmq);
83 }
84 WinTerminate(hab);
85 }
86 return 0;
87}
Note: See TracBrowser for help on using the repository browser.