source: trunk/fm4.c@ 1177

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

Ticket 187: Draft 2: Move remaining function declarations

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1
2/***********************************************************************
3
4 $Id: fm4.c 1177 2008-09-10 21:53:13Z 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\tools.h"
23#include "dll\version.h"
24#include "dll\mainwnd2.h" // StartFM32
25#include "dll\init.h" // InitFM3DLL
26
27int main(int argc, char *argv[])
28{
29 HAB hab;
30 HMQ hmq;
31 QMSG qmsg;
32 HWND hwndFrame;
33
34 strcpy(appname, "FM/4");
35 {
36 INT x;
37
38 for (x = 1; x < argc; x++) {
39 if (*argv[x] == '+' && !argv[x][1])
40 fLogFile = TRUE;
41 if (*argv[x] == '-') {
42 if (argv[x][1])
43 strcpy(profile, &argv[x][1]);
44 }
45 }
46 }
47 DosError(FERR_DISABLEHARDERR);
48 hab = WinInitialize(0);
49 if (hab) {
50 hmq = WinCreateMsgQueue(hab, 2048);
51 if (hmq) {
52 if (InitFM3DLL(hab, argc, argv)) {
53 if (CheckVersion(VERMAJOR, VERMINOR)) {
54 hwndFrame = StartFM32(hab, argc, argv);
55 if (hwndFrame != (HWND) 0) {
56 for (;;) {
57 if (!WinGetMsg(hab, &qmsg, (HWND) 0, 0, 0)) {
58 if (qmsg.hwnd)
59 qmsg.msg = WM_CLOSE;
60 else
61 break;
62 }
63 if (hwndBubble &&
64 ((qmsg.msg > (WM_BUTTON1DOWN - 1) &&
65 qmsg.msg < (WM_BUTTON3DBLCLK + 1)) ||
66 (qmsg.msg > (WM_CHORD - 1) &&
67 qmsg.msg < (WM_BUTTON3CLICK + 1))) &&
68 WinIsWindowVisible(hwndBubble))
69 WinShowWindow(hwndBubble, FALSE);
70 WinDispatchMsg(hab, &qmsg);
71 }
72 if (WinIsWindow(hab, WinWindowFromID(hwndFrame, FID_CLIENT)))
73 WinSendMsg(WinWindowFromID(hwndFrame,
74 FID_CLIENT),
75 WM_CLOSE, MPVOID, MPVOID);
76 }
77 }
78 }
79 DosSleep(250L);
80 WinDestroyMsgQueue(hmq);
81 }
82 WinTerminate(hab);
83 }
84 return 0;
85}
Note: See TracBrowser for help on using the repository browser.