fixed compiler warnings

svn path=/trunk/; revision=6098
This commit is contained in:
Thomas Bluemel 2003-09-20 14:44:35 +00:00
parent c92e25be46
commit 013bfffae8
17 changed files with 28 additions and 28 deletions

View file

@ -152,9 +152,9 @@ WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
wndclass.hInstance = hInst; wndclass.hInstance = hInst;
/* Use standard application icon and arrow cursor provided by the OS */ /* Use standard application icon and arrow cursor provided by the OS */
wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION); wndclass.hIcon = LoadIcon (NULL, (LPCTSTR)IDI_APPLICATION);
wndclass.hIconSm = LoadIcon (NULL, IDI_APPLICATION); wndclass.hIconSm = LoadIcon (NULL, (LPCTSTR)IDI_APPLICATION);
wndclass.hCursor = LoadCursor (NULL, IDC_ARROW); wndclass.hCursor = LoadCursor (NULL, (LPCTSTR)IDC_ARROW);
/* Color the background white */ /* Color the background white */
wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH); wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);

View file

@ -32,7 +32,7 @@ int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance,
wc.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS; wc.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS;
wc.lpfnWndProc = MainWndProc; wc.lpfnWndProc = MainWndProc;
wc.hInstance = HInstance; wc.hInstance = HInstance;
wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW);
/* wc.hbrBackground = reinterpret_cast<HBRUSH>(COLOR_BTNFACE + 1); */ /* wc.hbrBackground = reinterpret_cast<HBRUSH>(COLOR_BTNFACE + 1); */
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
wc.lpszClassName = WndClassName; wc.lpszClassName = WndClassName;

View file

@ -68,7 +68,7 @@ int STDCALL WinMain(
TestWndClass.cbSize = sizeof(WNDCLASSEX); TestWndClass.cbSize = sizeof(WNDCLASSEX);
TestWndClass.lpfnWndProc = &TestWndProc; TestWndClass.lpfnWndProc = &TestWndProc;
TestWndClass.hInstance = AppInstance; TestWndClass.hInstance = AppInstance;
TestWndClass.hCursor = LoadCursor(0, IDC_ARROW); TestWndClass.hCursor = LoadCursor(0, (LPCTSTR)IDC_ARROW);
TestWndClass.hbrBackground = CreateSolidBrush(RGB(255,255,230)); TestWndClass.hbrBackground = CreateSolidBrush(RGB(255,255,230));
TestWndClass.lpszClassName = TEST_WND_CLASS; TestWndClass.lpszClassName = TEST_WND_CLASS;
Result = RegisterClassEx(&TestWndClass); Result = RegisterClassEx(&TestWndClass);

View file

@ -19,8 +19,8 @@ WinMain(HINSTANCE hInstance,
wc.lpfnWndProc = MainWndProc; wc.lpfnWndProc = MainWndProc;
wc.style = CS_VREDRAW | CS_HREDRAW; wc.style = CS_VREDRAW | CS_HREDRAW;
wc.hInstance = hInstance; wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW);
wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);
wc.lpszMenuName = NULL; wc.lpszMenuName = NULL;
wc.cbClsExtra = 0; wc.cbClsExtra = 0;

View file

@ -632,7 +632,7 @@ RegisterAndCreateWindow (HINSTANCE hInst,
wc.hInstance = hInst; /* owner of the class */ wc.hInstance = hInst; /* owner of the class */
wc.lpszClassName = className; wc.lpszClassName = className;
wc.hCursor = LoadCursor ( 0, IDC_ARROW ); wc.hCursor = LoadCursor ( 0, (LPCTSTR)IDC_ARROW );
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
wc.style = CS_HREDRAW | CS_VREDRAW; wc.style = CS_HREDRAW | CS_VREDRAW;
wc.cbClsExtra = 0; wc.cbClsExtra = 0;

View file

@ -40,8 +40,8 @@ WinMain(HINSTANCE hInstance,
wc.lpfnWndProc = MainWndProc; wc.lpfnWndProc = MainWndProc;
wc.style = CS_VREDRAW | CS_HREDRAW; wc.style = CS_VREDRAW | CS_HREDRAW;
wc.hInstance = hInstance; wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW);
wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);
wc.lpszMenuName = NULL; wc.lpszMenuName = NULL;
wc.cbClsExtra = 0; wc.cbClsExtra = 0;

View file

@ -51,7 +51,7 @@ POINTL point={10,3};
RECT rect = {0,0,20,20},rect2; RECT rect = {0,0,20,20},rect2;
DWORD StartP,EndP; DWORD StartP,EndP;
#define ReplaceText "->> Replaced!! <<-" #define ReplaceTextStr "->> Replaced!! <<-"
char* AllocatedText; /* Buffer in the heap to feed it to the edit control */ char* AllocatedText; /* Buffer in the heap to feed it to the edit control */
char* NewText = "New text for the edit control"; char* NewText = "New text for the edit control";
@ -211,7 +211,7 @@ Msg[] =
"EM_LINELENGTH",EM_LINELENGTH,-1,0,&HandlePrintReturnHex, "EM_LINELENGTH",EM_LINELENGTH,-1,0,&HandlePrintReturnHex,
"EM_GETWORDBREAKPROC",EM_GETWORDBREAKPROC,0,0,&HandlePrintReturnHex, "EM_GETWORDBREAKPROC",EM_GETWORDBREAKPROC,0,0,&HandlePrintReturnHex,
"EM_REPLACESEL",EM_REPLACESEL,TRUE,(LPARAM)&ReplaceText,&HandlePrintReturnHex, "EM_REPLACESEL",EM_REPLACESEL,TRUE,(LPARAM)&ReplaceTextStr,&HandlePrintReturnHex,
"EM_LINESCROLL",EM_LINESCROLL,5,1,&HandlePrintReturnHex, "EM_LINESCROLL",EM_LINESCROLL,5,1,&HandlePrintReturnHex,
"EM_SCROLL",EM_SCROLL,SB_LINEDOWN,0,&HandlePrintReturnHex, "EM_SCROLL",EM_SCROLL,SB_LINEDOWN,0,&HandlePrintReturnHex,
@ -592,7 +592,7 @@ RegisterAndCreateWindow (HINSTANCE hInst,
wc.hInstance = hInst; /* owner of the class */ wc.hInstance = hInst; /* owner of the class */
wc.lpszClassName = className; wc.lpszClassName = className;
wc.hCursor = LoadCursor ( 0, IDC_ARROW ); wc.hCursor = LoadCursor ( 0, (LPCTSTR)IDC_ARROW );
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
wc.style = CS_HREDRAW | CS_VREDRAW; wc.style = CS_HREDRAW | CS_VREDRAW;
wc.cbClsExtra = 0; wc.cbClsExtra = 0;

View file

@ -31,8 +31,8 @@ WinMain(HINSTANCE hInstance,
wc.lpfnWndProc = MainWndProc; wc.lpfnWndProc = MainWndProc;
wc.style = CS_VREDRAW | CS_HREDRAW; wc.style = CS_VREDRAW | CS_HREDRAW;
wc.hInstance = hInstance; wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW);
wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);
wc.lpszMenuName = NULL; wc.lpszMenuName = NULL;
wc.cbClsExtra = 0; wc.cbClsExtra = 0;

View file

@ -28,8 +28,8 @@ WinMain(HINSTANCE hInstance,
wc.lpfnWndProc = MainWndProc; wc.lpfnWndProc = MainWndProc;
wc.style = CS_VREDRAW | CS_HREDRAW; wc.style = CS_VREDRAW | CS_HREDRAW;
wc.hInstance = hInstance; wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW);
wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);
wc.lpszMenuName = NULL; wc.lpszMenuName = NULL;
wc.cbClsExtra = 0; wc.cbClsExtra = 0;

View file

@ -17,8 +17,8 @@ WinMain(HINSTANCE hInstance,
wc.lpfnWndProc = MainWndProc; wc.lpfnWndProc = MainWndProc;
wc.style = CS_VREDRAW | CS_HREDRAW; wc.style = CS_VREDRAW | CS_HREDRAW;
wc.hInstance = hInstance; wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW);
wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);
wc.lpszMenuName = NULL; wc.lpszMenuName = NULL;
wc.cbClsExtra = 0; wc.cbClsExtra = 0;

View file

@ -33,7 +33,7 @@ HFONT MakeFont(
// supported. For compatibility with these platforms you // supported. For compatibility with these platforms you
// should initialize the XFORM::eM22 data member to 1.0. // should initialize the XFORM::eM22 data member to 1.0.
// //
XFORM xf = {0, 0, 0, 1.0}; XFORM xf = {0, 0, 0, 1.0, 0, 0};
GetWorldTransform(hDestDC, &xf); GetWorldTransform(hDestDC, &xf);
int pixels_per_inch = GetDeviceCaps(hDestDC, LOGPIXELSY); int pixels_per_inch = GetDeviceCaps(hDestDC, LOGPIXELSY);

View file

@ -126,7 +126,7 @@ HWND RegisterAndCreateWindow (
wc.lpfnWndProc = WndProc; // window procedure: mandatory wc.lpfnWndProc = WndProc; // window procedure: mandatory
wc.hInstance = hInst; // owner of the class: mandatory wc.hInstance = hInst; // owner of the class: mandatory
wc.lpszClassName = className; // mandatory wc.lpszClassName = className; // mandatory
wc.hCursor = LoadCursor ( 0, IDC_ARROW ); // optional wc.hCursor = LoadCursor ( 0, (LPCTSTR)IDC_ARROW ); // optional
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); // optional wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); // optional
wc.style = 0; wc.style = 0;
wc.cbClsExtra = 0; wc.cbClsExtra = 0;

View file

@ -41,7 +41,7 @@ main(int argc, char *argv[])
z=0; z=0;
thread=CreateThread(NULL, thread=CreateThread(NULL,
0x1000, 0x1000,
thread_1, (LPTHREAD_START_ROUTINE)thread_1,
NULL, NULL,
0, 0,
&thread_id); &thread_id);

View file

@ -44,7 +44,7 @@ main(int argc, char *argv[])
z++; z++;
thread=CreateThread(NULL, thread=CreateThread(NULL,
0x1000, 0x1000,
thread_1, (LPTHREAD_START_ROUTINE)thread_1,
NULL, NULL,
0, 0,
&thread_id); &thread_id);

View file

@ -33,7 +33,7 @@ HFONT MakeFont(
// supported. For compatibility with these platforms you // supported. For compatibility with these platforms you
// should initialize the XFORM::eM22 data member to 1.0. // should initialize the XFORM::eM22 data member to 1.0.
// //
XFORM xf = {0, 0, 0, 1.0}; XFORM xf = {0, 0, 0, 1.0, 0, 0};
GetWorldTransform(hDestDC, &xf); GetWorldTransform(hDestDC, &xf);
int pixels_per_inch = GetDeviceCaps(hDestDC, LOGPIXELSY); int pixels_per_inch = GetDeviceCaps(hDestDC, LOGPIXELSY);

View file

@ -18,8 +18,8 @@ WinMain(HINSTANCE hInstance,
wc.lpfnWndProc = MainWndProc; wc.lpfnWndProc = MainWndProc;
wc.style = CS_VREDRAW | CS_HREDRAW; wc.style = CS_VREDRAW | CS_HREDRAW;
wc.hInstance = hInstance; wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW);
wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);
wc.lpszMenuName = NULL; wc.lpszMenuName = NULL;
wc.cbClsExtra = 0; wc.cbClsExtra = 0;

View file

@ -31,7 +31,7 @@ int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance,
wc.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS; wc.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS;
wc.lpfnWndProc = MainWndProc; wc.lpfnWndProc = MainWndProc;
wc.hInstance = HInstance; wc.hInstance = HInstance;
wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW);
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
wc.lpszClassName = WndClassName; wc.lpszClassName = WndClassName;
@ -72,7 +72,7 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
// determine the invalidated area of the window // determine the invalidated area of the window
RECT RUpdate; RECT RUpdate;
HDC Hdc; HDC Hdc;
GetUpdateRect(HWnd, &RUpdate, NULL); GetUpdateRect(HWnd, &RUpdate, FALSE);
// grab a handle to our window's // grab a handle to our window's
// common display device context // common display device context