source: branches/ticket_150/fm4.c@ 869

Last change on this file since 869 was 551, checked in by Gregg Young, 18 years ago

Indentation cleanup

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.5 KB
Line 
1#define INCL_DOS
2#define INCL_WIN
3
4#include <os2.h>
5#include <stdarg.h>
6#include <stdio.h>
7#include <stdlib.h>
8#include <string.h>
9#include <ctype.h>
10#include <direct.h>
11#include "dll\fm3dll.h"
12#include "dll\tools.h"
13#include "dll\version.h"
14
15int main(int argc, char *argv[])
16{
17
18 HAB hab;
19 HMQ hmq;
20 QMSG qmsg;
21 HWND hwndFrame;
22
23 strcpy(appname, "FM/4");
24 {
25 INT x;
26
27 for (x = 1; x < argc; x++) {
28 if (*argv[x] == '+' && !argv[x][1])
29 fLogFile = TRUE;
30 if (*argv[x] == '-') {
31 if (argv[x][1])
32 strcpy(profile, &argv[x][1]);
33 }
34 }
35 }
36 DosError(FERR_DISABLEHARDERR);
37 hab = WinInitialize(0);
38 if (hab) {
39 hmq = WinCreateMsgQueue(hab, 2048);
40 if (hmq) {
41 if (InitFM3DLL(hab, argc, argv)) {
42 if (CheckVersion(VERMAJOR, VERMINOR)) {
43 hwndFrame = StartFM32(hab, argc, argv);
44 if (hwndFrame != (HWND) 0) {
45 for (;;) {
46 if (!WinGetMsg(hab, &qmsg, (HWND) 0, 0, 0)) {
47 if (qmsg.hwnd)
48 qmsg.msg = WM_CLOSE;
49 else
50 break;
51 }
52 if (hwndBubble &&
53 ((qmsg.msg > (WM_BUTTON1DOWN - 1) &&
54 qmsg.msg < (WM_BUTTON3DBLCLK + 1)) ||
55 (qmsg.msg > (WM_CHORD - 1) &&
56 qmsg.msg < (WM_BUTTON3CLICK + 1))) &&
57 WinIsWindowVisible(hwndBubble))
58 WinShowWindow(hwndBubble, FALSE);
59 WinDispatchMsg(hab, &qmsg);
60 }
61 if (WinIsWindow(hab, WinWindowFromID(hwndFrame, FID_CLIENT)))
62 WinSendMsg(WinWindowFromID(hwndFrame,
63 FID_CLIENT),
64 WM_CLOSE, MPVOID, MPVOID);
65 }
66 }
67 }
68 DosSleep(250L);
69 WinDestroyMsgQueue(hmq);
70 }
71 WinTerminate(hab);
72 }
73 return 0;
74}
Note: See TracBrowser for help on using the repository browser.