00001 #ifndef __WINTOOLS_H
00002 #define __WINTOOLS_H
00003
00011 #include <stdio.h>
00012 #include <windows.h>
00013
00026 #ifndef SPRTF
00027 # ifdef UNICODE
00028 # ifdef __CEGCC__
00029 extern int _snwprintf(wchar_t*, size_t, const wchar_t*, ...);
00030 # endif
00031 # define SPRTF _snwprintf
00032 # else
00033 # define SPRTF _snprintf
00034 # endif
00035 #endif
00036
00037 #ifndef MAX_STRLEN
00038 # define MAX_STRLEN 127
00039 #endif
00040
00041 #ifdef __cplusplus
00042 extern "C" {
00043 #endif
00044
00053 LPCTSTR getStrRes(UINT aResID, LPTSTR theBuf, int aMaxLen);
00054
00061 void prtMsg(HWND aHWND, LPCTSTR aTitle, UINT flags, LPCTSTR anFmt, ...);
00062
00072 LPCTSTR errMsg(LPTSTR theBuf, size_t aMaxLen, UINT anMsgID, HRESULT aSysErr);
00073
00086 void prtErr(HWND aHWND, UINT aTitID, UINT anMsgID, HRESULT aSysErr);
00087
00094 void prtInfo(HWND aHWND, UINT aTitID, UINT anMsgID);
00095
00096 #ifdef __cplusplus
00097 }
00098 #endif
00099
00100 #endif