Category : Files from Magazines
Archive   : PROGJRNL.ZIP
Filename : WINAUX.C

 
Output of file : WINAUX.C contained in archive : PROGJRNL.ZIP
/*
* Winaux main module
*
* Written by Bill Hall
* 3665 Benton Street, #66
* Santa Clara, CA 95051
*
* See Winaux.doc for usage information
*
*/

#define NOCOMM
#include
#include

#define EXTERN
#include "winaux.h"

/* entry point for windows */
int FAR PASCAL WinMain(hInstance, hPrevInstance, lpszCmdLine, cmdShow)
HANDLE hInstance, hPrevInstance;
LPSTR lpszCmdLine;
int cmdShow;
{

MSG msg;

/* initialize program */
if (!InitProgram(hInstance,hPrevInstance, lpszCmdLine, cmdShow))
/* if we fail, then exit */
return FALSE;

/* otherwise read messages until program is terminated by user */
while (GetMessage((LPMSG)&msg,NULL,0,0)) {
TranslateMessage((LPMSG)&msg);
DispatchMessage((LPMSG)&msg);
}
return msg.wParam;
}

/* main window procedure */
long FAR PASCAL MainWndProc(hWnd,message,wParam,lParam)
HWND hWnd;
unsigned message;
WORD wParam;
LONG lParam;
{

PAINTSTRUCT ps;

switch(message) {

/* adjust position of text display if window is resized */
case WM_SIZE:
AdjustHeight(LOWORD(lParam), HIWORD(lParam));
break;

/* menu commands */
case WM_COMMAND:
WndCommand(hWnd, wParam);
break;

/* display string from remote program */
case WM_USER:
DispatchString(hWnd, wParam, lParam);
break;

/* initialize some things when window is created */
case WM_CREATE:
WndCreate(hWnd,lParam);
break;

/* quit */
case WM_DESTROY:
PostQuitMessage(0);
break;

/* set window handle to null in win.ini when closing application */
case WM_CLOSE:
SetWinIni(NULL);
DestroyWindow(hWnd);
break;

/* if closing Windows, set window handle to null in win.ini */
case WM_ENDSESSION:
if (wParam)
SetWinIni(NULL);
break;

/* refresh the window */
case WM_PAINT:
BeginPaint(hWnd, (LPPAINTSTRUCT)&ps);
MainWndPaint(hWnd, (LPPAINTSTRUCT)&ps);
EndPaint(hWnd, (LPPAINTSTRUCT)&ps);
break;

/* all other messages are handled by windows */
default:
return ((long)DefWindowProc(hWnd,message,wParam,lParam));
break;
}
return(0L);
}
/*
* Winaux main module
*
* Written by Bill Hall
* 3665 Benton Street, #66
* Santa Clara, CA 95051
*
* See Winaux.doc for usage information
*
*/

#define NOCOMM
#define NOKANJI
#define NOMINMAX
#include
#include
#include

#define EXTERN
#include "winaux.h"

/* entry point for windows */
int FAR PASCAL WinMain(hInstance, hPrevInstance, lpszCmdLine, cmdShow)
HANDLE hInstance, hPrevInstance;
LPSTR lpszCmdLine;
int cmdShow;
{

MSG msg;

/* initialize program */
if (!InitProgram(hInstance,hPrevInstance, lpszCmdLine, cmdShow))
/* if we fail, then exit */
return FALSE;

/* otherwise read messages until program is terminated by user */
while (GetMessage((LPMSG)&msg,NULL,0,0)) {
TranslateMessage((LPMSG)&msg);
DispatchMessage((LPMSG)&msg);
}
return msg.wParam;
}

/* main window procedure */
long FAR PASCAL MainWndProc(hWnd,message,wParam,lParam)
HWND hWnd;
unsigned message;
WORD wParam;
LONG lParam;
{

PAINTSTRUCT ps;

switch(message) {

/* adjust position of text display if window is resized */
case WM_SIZE:
AdjustHeight(LOWORD(lParam), HIWORD(lParam));
break;

/* menu commands */
case WM_COMMAND:
WndCommand(hWnd, wParam);
break;

/* display string from remote program */
case WM_USER:
if (!IsIconic(hWnd))
DispatchString(hWnd, wParam, lParam);
break;

/* initialize some things when window is created */
case WM_CREATE:
WndCreate(hWnd,lParam);
break;

/* quit */
case WM_DESTROY:
PostQuitMessage(0);
break;

/* set window handle to null in win.ini when closing application */
case WM_CLOSE:
SetWinIni(NULL);
if (hFile)
close(hFile);
DestroyWindow(hWnd);
break;

/* if closing Windows, set window handle to null in win.ini */
case WM_ENDSESSION:
if (wParam) {
if (hFile)
close(hFile);
SetWinIni(NULL);
}
break;

/* refresh the window */
case WM_PAINT:
BeginPaint(hWnd, (LPPAINTSTRUCT)&ps);
MainWndPaint(hWnd, (LPPAINTSTRUCT)&ps);
EndPaint(hWnd, (LPPAINTSTRUCT)&ps);
break;

/* all other messages are handled by windows */
default:
return ((long)DefWindowProc(hWnd,message,wParam,lParam));
break;
}
return(0L);
}
/*
* Winaux main module
*
* Written by Bill Hall
* 3665 Benton Street, #66
* Santa Clara, CA 95051
*
* See Winaux.doc for usage information
*
*/

#define NOCOMM
#define NOKANJI
#define NOMINMAX
#include
#include
#include

#define EXTERN
#include "winaux.h"

/* entry point for windows */
int FAR PASCAL WinMain(hInstance, hPrevInstance, lpszCmdLine, cmdShow)
HANDLE hInstance, hPrevInstance;
LPSTR lpszCmdLine;
int cmdShow;
{

MSG msg;

/* initialize program */
if (!InitProgram(hInstance,hPrevInstance, lpszCmdLine, cmdShow))
/* if we fail, then exit */
return FALSE;

/* otherwise read messages until program is terminated by user */
while (GetMessage((LPMSG)&msg,NULL,0,0)) {
TranslateMessage((LPMSG)&msg);
DispatchMessage((LPMSG)&msg);
}
return msg.wParam;
}

/* main window procedure */
long FAR PASCAL MainWndProc(hWnd,message,wParam,lParam)
HWND hWnd;
unsigned message;
WORD wParam;
LONG lParam;
{

PAINTSTRUCT ps;

switch(message) {

/* adjust position of text display if window is resized */
case WM_SIZE:
AdjustHeight(LOWORD(lParam), HIWORD(lParam));
break;

/* menu commands */
case WM_COMMAND:
WndCommand(hWnd, wParam);
break;

/* display string from remote program */
case WM_USER:
if (!IsIconic(hWnd))
DispatchString(hWnd, wParam, lParam);
break;

/* initialize some things when window is created */
case WM_CREATE:
WndCreate(hWnd,lParam);
break;

/* quit */
case WM_DESTROY:
PostQuitMessage(0);
break;

/* set window handle to null in win.ini when closing application */
case WM_CLOSE:
SetWinIni(NULL);
if (hFile)
close(hFile);
DestroyWindow(hWnd);
break;

/* if closing Windows, set window handle to null in win.ini */
case WM_ENDSESSION:
if (wParam) {
if (hFile)
close(hFile);
SetWinIni(NULL);
}
break;

/* refresh the window */
case WM_PAINT:
BeginPaint(hWnd, (LPPAINTSTRUCT)&ps);
MainWndPaint(hWnd, (LPPAINTSTRUCT)&ps);
EndPaint(hWnd, (LPPAINTSTRUCT)&ps);
break;

/* all other messages are handled by windows */
default:
return ((long)DefWindowProc(hWnd,message,wParam,lParam));
break;
}
return(0L);
}


  3 Responses to “Category : Files from Magazines
Archive   : PROGJRNL.ZIP
Filename : WINAUX.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/