Browse Source

Implement DefWindowProc directly in MainWndProc

pull/340/head
Anders Jenbo 7 years ago
parent
commit
dc5bbd0c49
  1. 4
      Source/init.cpp
  2. 2
      SourceS/miniwin/misc.h
  3. 2
      SourceS/miniwin/misc_macro.h
  4. 9
      SourceX/miniwin/misc.cpp

4
Source/init.cpp

@ -132,9 +132,11 @@ LRESULT __stdcall MainWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
#endif
case WM_QUERYNEWPALETTE:
return 1;
case WM_QUERYENDSESSION:
exit(0);
}
return DefWindowProc(hWnd, Msg, wParam, lParam);
return 0;
}
WNDPROC SetWindowProc(WNDPROC NewProc)

2
SourceS/miniwin/misc.h

@ -345,8 +345,6 @@ void lstrcpynA(LPSTR lpString1, LPCSTR lpString2, int iMaxLength);
typedef LONG LSTATUS, HKEY, REGSAM, PHKEY;
LRESULT DefWindowProcA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
WINBOOL WINAPI WriteFile(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, LPDWORD lpNumberOfBytesWritten,
LPOVERLAPPED lpOverlapped);
DWORD WINAPI SetFilePointer(HANDLE hFile, LONG lDistanceToMove, PLONG lpDistanceToMoveHigh, DWORD dwMoveMethod);

2
SourceS/miniwin/misc_macro.h

@ -97,8 +97,6 @@
#define KEY_WRITE 0x20006
#define REG_SZ 1
#define DefWindowProc DefWindowProcA
#define GetFileAttributes GetFileAttributesA
#define SetFileAttributes SetFileAttributesA
#define FindFirstFile FindFirstFileA

9
SourceX/miniwin/misc.cpp

@ -224,13 +224,4 @@ void lstrcpynA(LPSTR lpString1, LPCSTR lpString2, int iMaxLength)
{
strncpy(lpString1, lpString2, iMaxLength);
}
LRESULT DefWindowProcA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
DUMMY_ONCE();
if (Msg == DVL_WM_QUERYENDSESSION)
exit(0);
return 0;
}
} // namespace dvl

Loading…
Cancel
Save