Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

128 lines
2.3 KiB

/* File: C:\WACKER\TDLL\genrcdlg.c (Created: 16-Dec-1993)
* created from:
* File: C:\HA5G\ha5g\genrcdlg.c (Created: 12-Sep-1990)
*
* Copyright 1990,1994 by Hilgraeve Inc. -- Monroe, MI
* All rights reserved
*
* $Revision: 1.9 $
* $Date: 1994/08/22 11:54:28 $
*/
#include <windows.h>
#pragma hdrstop
#include "stdtyp.h"
#include "mc.h"
#include <tdll\misc.h>
#include <tdll\globals.h>
#if !defined(DlgParseCmd)
#define DlgParseCmd(i,n,c,w,l) i=LOWORD(w);n=HIWORD(w);c=(HWND)l;
#endif
struct stSaveDlgStuff
{
int nDummyVariable;
/*
* Put in whatever else you might need to access later
*/
};
typedef struct stSaveDlgStuff SDS;
// Dialog control defines...
//
#define IDC_CB_
#define IDC_RB_
#define IDC_PB_
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
* FUNCTION: Generic Dialog
*
* DESCRIPTION: Dialog manager stub
*
* ARGUMENTS: Standard Windows dialog manager
*
* RETURNS: Standard Windows dialog manager
*
*/
BOOL CALLBACK GenericDlg(HWND hDlg, UINT wMsg, WPARAM wPar, LPARAM lPar)
{
HWND hwndChild;
INT nId;
INT nNtfy;
SDS *pS;
static aHlpTable[] = {0,0};
switch (wMsg)
{
case WM_INITDIALOG:
pS = (SDS *)malloc(sizeof(SDS));
if (pS == (SDS *)0)
{
/* TODO: decide if we need to display an error here */
EndDialog(hDlg, FALSE);
break;
}
SetWindowLong(hDlg, DWL_USER, (LONG)pS);
mscCenterWindowOnWindow(hDlg, GetParent(hDlg));
break;
case WM_DESTROY:
break;
case WM_CONTEXTMENU:
WinHelp((HWND)wPar, glblQueryHelpFileName(), HELP_CONTEXTMENU,
(DWORD)(LPTSTR)aHlpTable);
break;
case WM_HELP:
WinHelp(((LPHELPINFO)lPar)->hItemHandle, glblQueryHelpFileName(),
HELP_WM_HELP, (DWORD)(LPTSTR)aHlpTable);
break;
case WM_COMMAND:
/*
* Did we plan to put a macro in here to do the parsing ?
*/
DlgParseCmd(nId, nNtfy, hwndChild, wPar, lPar);
switch (nId)
{
case IDOK:
pS = (SDS *)GetWindowLong(hDlg, DWL_USER);
/*
* Do whatever saving is necessary
*/
/* Free the storeage */
free(pS);
pS = (SDS *)0;
EndDialog(hDlg, TRUE);
break;
case IDCANCEL:
pS = (SDS *)GetWindowLong(hDlg, DWL_USER);
/* Free the storeage */
free(pS);
pS = (SDS *)0;
EndDialog(hDlg, FALSE);
break;
default:
return FALSE;
}
break;
default:
return FALSE;
}
return TRUE;
}