source: trunk/fm4.c@ 1155

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

Ticket 187: Draft 1: Functions only

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