--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403537
This commit is contained in:
Sam Lantinga 2009-02-17 05:57:54 +00:00
parent 90b4c6937f
commit a0978cdf4d
2 changed files with 28 additions and 27 deletions

View file

@ -12,10 +12,10 @@ NativeWindowFactory Win32WindowFactory = {
DestroyWindowWin32
};
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg)
LRESULT CALLBACK
WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_CLOSE:
DestroyWindow(hwnd);
break;
@ -45,16 +45,17 @@ CreateWindowWin32(int w, int h)
wc.lpszMenuName = NULL;
wc.lpszClassName = "SDL Test";
if(!RegisterClass(&wc))
{
if (!RegisterClass(&wc)) {
MessageBox(NULL, "Window Registration Failed!", "Error!",
MB_ICONEXCLAMATION | MB_OK);
return 0;
}
hwnd = CreateWindow("SDL Test", "", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, w, h, NULL, NULL, GetModuleHandle(NULL), NULL);
if(hwnd == NULL)
{
hwnd =
CreateWindow("SDL Test", "", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT,
CW_USEDEFAULT, w, h, NULL, NULL, GetModuleHandle(NULL),
NULL);
if (hwnd == NULL) {
MessageBox(NULL, "Window Creation Failed!", "Error!",
MB_ICONEXCLAMATION | MB_OK);
return 0;