Skip to content

Commit 20631be

Browse files
committed
Tidied whitespace. Corrected MINMAXINFO which should have been far
pointer.
1 parent bfd5eb1 commit 20631be

4 files changed

Lines changed: 16 additions & 17 deletions

File tree

AboutDlg.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ BOOL CALLBACK AboutDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
88
switch (uMsg)
99
{
1010
case WM_COMMAND:
11-
{
11+
{
1212
WORD id = wParam;
13-
13+
1414
switch (id)
1515
{
1616
case IDOK:
@@ -32,12 +32,12 @@ BOOL CALLBACK AboutDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
3232

3333
/* Show our "about" dialog */
3434
void ShowAboutDialog(HWND owner)
35-
{
35+
{
3636
/* Create dialog callback thunk */
37-
FARPROC aboutProc = MakeProcInstance(&AboutDialogProc, g_hInstance);
38-
39-
DialogBox(g_hInstance, MAKEINTRESOURCE(IDD_ABOUTDIALOG), owner, aboutProc);
40-
37+
FARPROC aboutProc = MakeProcInstance(&AboutDialogProc, g_hInstance);
38+
39+
DialogBox(g_hInstance, MAKEINTRESOURCE(IDD_ABOUTDIALOG), owner, aboutProc);
40+
4141
/* Free dialog callback thunk */
42-
FreeProcInstance(aboutProc);
42+
FreeProcInstance(aboutProc);
4343
}

MainWnd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
3939
case WM_GETMINMAXINFO:
4040
{
4141
/* Prevent our window from being sized too small */
42-
MINMAXINFO *minMax = (MINMAXINFO*) lParam;
42+
MINMAXINFO FAR* minMax = (MINMAXINFO FAR*) lParam;
4343
minMax->ptMinTrackSize.x = 220;
4444
minMax->ptMinTrackSize.y = 110;
4545

@@ -90,7 +90,7 @@ BOOL RegisterMainWindowClass()
9090
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
9191
wc.hbrBackground = (HBRUSH) (COLOR_BTNFACE + 1);
9292
wc.lpszMenuName = MAKEINTRESOURCE(IDR_MAINMENU);
93-
wc.lpszClassName = MainWndClass;
93+
wc.lpszClassName = MainWndClass;
9494

9595
return (RegisterClass(&wc)) ? TRUE : FALSE;
9696
}

Win16App.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ HEAPSIZE 1024
77
STACKSIZE 4096
88
EXPORTS MainWndProc
99
AboutDialogProc
10-

WinMain.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <windows.h>
1+
#include <windows.h>
22
#include "mainwnd.h"
33
#include "resource.h"
44
#include "globals.h"
@@ -8,31 +8,31 @@ HINSTANCE g_hInstance = NULL;
88

99
/* Our application entry point */
1010
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
11-
{
11+
{
1212
HWND hWnd;
1313
HACCEL hAccelerators;
1414
MSG msg;
1515

1616
/* Assign global HINSTANCE */
1717
g_hInstance = hInstance;
1818

19-
/* Register our main window class */
19+
/* Register our main window class */
2020
if (! hPrevInstance)
2121
{
2222
if (! RegisterMainWindowClass())
2323
{
2424
MessageBox(NULL, "Error registering main window class.", "Error", MB_ICONHAND | MB_OK);
2525
return 0;
26-
}
26+
}
2727
}
2828

2929
/* Create our main window */
3030
if (! (hWnd = CreateMainWindow()))
3131
{
3232
MessageBox(NULL, "Error creating main window.", "Error", MB_ICONHAND | MB_OK);
3333
return 0;
34-
}
35-
34+
}
35+
3636
/* Load accelerators */
3737
hAccelerators = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDR_ACCELERATOR));
3838

0 commit comments

Comments
 (0)