WINMAIN.H
//----------------------------------------------------------------------------- 
// Microsoft OLE DB TABLECOPY Sample 
// Copyright 1996 - 1998 Microsoft Corporation. 
// 
// @doc 
// 
// @module WINMAIN.H 
// 
//----------------------------------------------------------------------------- 
 
#ifndef _WINMAIN_H_ 
#define _WINMAIN_H_ 
 
 
/////////////////////////////////////////////////////////////// 
// Defines 
// 
/////////////////////////////////////////////////////////////// 
 
//We want type checking on Window Handles 
 
#ifndef STRICT 
#define STRICT 
#endif 
 
 
/////////////////////////////////////////////////////////////// 
// Includes 
// 
/////////////////////////////////////////////////////////////// 
#include <windows.h> 
#include <windowsx.h> 
 
#include <stddef.h> 
#include <stdio.h> 
#include <limits.h> 
#include <wchar.h> 
 
#include "resource.h" 
 
 
 
//////////////////////////////////////////////////////////////////////////// 
// Windows Defines 
// 
//////////////////////////////////////////////////////////////////////////// 
#define CHECK_MEMORY(pv)if(!pv) { OutOfMemory(NULL); goto CLEANUP; } 
 
//Dialog Box procedures want to know if you handled the MSG 
//or not.  If you do, thenit just returns, if not then it calls 
//the default windialog procedure to try and handle it 
const BOOL HANDLED_MSG = TRUE; 
const BOOL UNHANDLED_MSG = FALSE; 
 
 
//////////////////////////////////////////////////////////////////////////// 
// Windows functions 
// 
//////////////////////////////////////////////////////////////////////////// 
void Busy(); 
void OutOfMemory(HWND hwnd); 
 
INT wMessageBox(HWND hDlg, UINT uiStyle, WCHAR* pwszTitle, WCHAR* pwszFmt, ...); 
LRESULT wSendMessage(HWND hWnd, UINT Msg, WPARAM wParam, WCHAR* pwszName); 
 
void wSetDlgItemText(HWND hWnd, INT DlgItem, WCHAR* pwszFmt, ...); 
UINT wGetDlgItemText(HWND hWnd, INT DlgItem, WCHAR* pwsz, INT nMaxSize); 
 
BOOL CenterDialog(HWND hDlg); 
void SyncSibling(HWND hwndLstChg,HWND hwndLstSrc); 
 
BOOL GetEditBoxValue(HWND hEditWnd, ULONG ulMin, ULONG ulMax, ULONG* pulCount); 
 
///////////////////////////////////////////////////////////////////// 
// Memory debugging code 
// 
///////////////////////////////////////////////////////////////////// 
void InternalAssert(char* pszExp, char* pszFile, UINT iLine); 
void InternalTrace(CHAR* pszExp, ...); 
void InternalTrace(WCHAR* pwszExp, ...); 
 
#undef ASSERT 
#undef TRACE 
 
#ifdef _DEBUG 
#define ASSERT(exp)if(!(exp)) InternalAssert(#exp, __FILE__, __LINE__) 
#define TRACEInternalTrace 
#else  //_DEBUG 
#define ASSERT(exp) 
#define TRACEif(0) InternalTrace 
#endif //_DEBUG 
 
 
#endif //_WINMAIN_H_