Changed SetWindowLong to SetWindowLongPtr and removed WNDPROC related casts

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6180 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2011-11-19 15:41:45 +00:00
parent 940a12b76c
commit 0617c9d3e7
10 changed files with 45 additions and 57 deletions

View file

@ -57,7 +57,7 @@ struct myImageList {
unsigned int uWndWidth, uWndHeight;
void *oldProc;
WNDPROC oldProc;
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
HBITMAP __stdcall LoadBitmapFile(long right, long bottom, BITMAP *bBitmap);
COLORREF GetColor();
@ -151,7 +151,7 @@ NSISFunc(SetBg) {
return;
}
oldProc = (void *)SetWindowLong(hwndParent, GWL_WNDPROC, (long)WndProc);
oldProc = (WNDPROC)SetWindowLongPtr(hwndParent, GWLP_WNDPROC, (LONG_PTR)WndProc);
}
bgBitmap.bReady = FALSE;
@ -347,7 +347,7 @@ NSISFunc(Clear) {
NSISFunc(Destroy) {
bgBitmap.bReady = FALSE;
if (IsWindow(hwndParent) && oldProc)
SetWindowLong(hwndParent, GWL_WNDPROC, (long)oldProc);
SetWindowLongPtr(hwndParent, GWLP_WNDPROC, (LONG_PTR)oldProc);
if (IsWindow(hWndImage))
SendMessage(hWndImage, WM_CLOSE, 0, 0);
hWndImage = 0;
@ -387,13 +387,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
if (message == WM_WINDOWPOSCHANGED) {
SetWindowPos(hwndImage, hwndParent, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
}
return CallWindowProc(
(long (__stdcall *)(HWND,unsigned int,unsigned int,long))oldProc,
hwnd,
message,
wParam,
lParam
);
return CallWindowProc(oldProc, hwnd, message, wParam, lParam);
}
switch (message) {
case WM_PAINT: