- Fix prototypes of GetClassLongA/W, GetClassLongPtrA/W and
SetClassLongA/W according to SDK definitions. - Add prototypes for SetClassLongPtrA/W, protect some GWL_ and GCL_ constants from using in Wine or in _WIN64 mode. - Fix all places in Wine affected by the above changes.
This commit is contained in:
parent
2d2a39cc42
commit
39f960bdfa
|
@ -6274,7 +6274,7 @@ static BOOL LISTVIEW_SetBkColor(LISTVIEW_INFO *infoPtr, COLORREF clrBk)
|
||||||
if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush);
|
if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush);
|
||||||
infoPtr->clrBk = clrBk;
|
infoPtr->clrBk = clrBk;
|
||||||
if (clrBk == CLR_NONE)
|
if (clrBk == CLR_NONE)
|
||||||
infoPtr->hBkBrush = (HBRUSH)GetClassLongW(infoPtr->hwndSelf, GCL_HBRBACKGROUND);
|
infoPtr->hBkBrush = (HBRUSH)GetClassLongPtrW(infoPtr->hwndSelf, GCLP_HBRBACKGROUND);
|
||||||
else
|
else
|
||||||
infoPtr->hBkBrush = CreateSolidBrush(clrBk);
|
infoPtr->hBkBrush = CreateSolidBrush(clrBk);
|
||||||
LISTVIEW_InvalidateList(infoPtr);
|
LISTVIEW_InvalidateList(infoPtr);
|
||||||
|
|
|
@ -461,7 +461,7 @@ void CC_PaintTriangle( HWND hDlg, int y)
|
||||||
int oben;
|
int oben;
|
||||||
RECT rect;
|
RECT rect;
|
||||||
HWND hwnd = GetDlgItem(hDlg, 0x2be);
|
HWND hwnd = GetDlgItem(hDlg, 0x2be);
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA( hDlg, DWL_USER);
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW( hDlg, DWLP_USER);
|
||||||
|
|
||||||
if (IsWindowVisible( GetDlgItem(hDlg, 0x2c6))) /* if full size */
|
if (IsWindowVisible( GetDlgItem(hDlg, 0x2c6))) /* if full size */
|
||||||
{
|
{
|
||||||
|
@ -480,7 +480,7 @@ void CC_PaintTriangle( HWND hDlg, int y)
|
||||||
points[2].y = points[0].y - w;
|
points[2].y = points[0].y - w;
|
||||||
points[2].x = points[1].x = points[0].x + w;
|
points[2].x = points[1].x = points[0].x + w;
|
||||||
|
|
||||||
FillRect(hDC, &lpp->old3angle, (HBRUSH)GetClassLongA( hwnd, GCL_HBRBACKGROUND));
|
FillRect(hDC, &lpp->old3angle, (HBRUSH)GetClassLongPtrW( hwnd, GCLP_HBRBACKGROUND));
|
||||||
lpp->old3angle.left = points[0].x;
|
lpp->old3angle.left = points[0].x;
|
||||||
lpp->old3angle.right = points[1].x + 1;
|
lpp->old3angle.right = points[1].x + 1;
|
||||||
lpp->old3angle.top = points[2].y - 1;
|
lpp->old3angle.top = points[2].y - 1;
|
||||||
|
@ -499,7 +499,7 @@ void CC_PaintCross( HWND hDlg, int x, int y)
|
||||||
HDC hDC;
|
HDC hDC;
|
||||||
int w = GetDialogBaseUnits();
|
int w = GetDialogBaseUnits();
|
||||||
HWND hwnd = GetDlgItem(hDlg, 0x2c6);
|
HWND hwnd = GetDlgItem(hDlg, 0x2c6);
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA( hDlg, DWL_USER );
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW( hDlg, DWLP_USER );
|
||||||
RECT rect;
|
RECT rect;
|
||||||
POINT point, p;
|
POINT point, p;
|
||||||
HPEN hPen;
|
HPEN hPen;
|
||||||
|
@ -544,11 +544,11 @@ static void CC_PrepareColorGraph( HWND hDlg )
|
||||||
{
|
{
|
||||||
int sdif, hdif, xdif, ydif, r, g, b, hue, sat;
|
int sdif, hdif, xdif, ydif, r, g, b, hue, sat;
|
||||||
HWND hwnd = GetDlgItem(hDlg, 0x2c6);
|
HWND hwnd = GetDlgItem(hDlg, 0x2c6);
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
HBRUSH hbrush;
|
HBRUSH hbrush;
|
||||||
HDC hdc ;
|
HDC hdc ;
|
||||||
RECT rect, client;
|
RECT rect, client;
|
||||||
HCURSOR hcursor = SetCursor( LoadCursorA(0, (LPSTR)IDC_WAIT) );
|
HCURSOR hcursor = SetCursor( LoadCursorW(0, (LPCWSTR)IDC_WAIT) );
|
||||||
|
|
||||||
GetClientRect(hwnd, &client);
|
GetClientRect(hwnd, &client);
|
||||||
hdc = GetDC(hwnd);
|
hdc = GetDC(hwnd);
|
||||||
|
@ -587,7 +587,7 @@ static void CC_PrepareColorGraph( HWND hDlg )
|
||||||
static void CC_PaintColorGraph( HWND hDlg )
|
static void CC_PaintColorGraph( HWND hDlg )
|
||||||
{
|
{
|
||||||
HWND hwnd = GetDlgItem( hDlg, 0x2c6 );
|
HWND hwnd = GetDlgItem( hDlg, 0x2c6 );
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
HDC hDC;
|
HDC hDC;
|
||||||
RECT rect;
|
RECT rect;
|
||||||
if (IsWindowVisible(hwnd)) /* if full size */
|
if (IsWindowVisible(hwnd)) /* if full size */
|
||||||
|
@ -647,7 +647,7 @@ static void CC_PaintLumBar( HWND hDlg, int hue, int sat )
|
||||||
void CC_EditSetRGB( HWND hDlg, COLORREF cr )
|
void CC_EditSetRGB( HWND hDlg, COLORREF cr )
|
||||||
{
|
{
|
||||||
char buffer[10];
|
char buffer[10];
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
int r = GetRValue(cr);
|
int r = GetRValue(cr);
|
||||||
int g = GetGValue(cr);
|
int g = GetGValue(cr);
|
||||||
int b = GetBValue(cr);
|
int b = GetBValue(cr);
|
||||||
|
@ -670,7 +670,7 @@ void CC_EditSetRGB( HWND hDlg, COLORREF cr )
|
||||||
void CC_EditSetHSL( HWND hDlg, int h, int s, int l )
|
void CC_EditSetHSL( HWND hDlg, int h, int s, int l )
|
||||||
{
|
{
|
||||||
char buffer[10];
|
char buffer[10];
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
lpp->updating = TRUE;
|
lpp->updating = TRUE;
|
||||||
if (IsWindowVisible( GetDlgItem(hDlg, 0x2c6) )) /* if full size */
|
if (IsWindowVisible( GetDlgItem(hDlg, 0x2c6) )) /* if full size */
|
||||||
{
|
{
|
||||||
|
@ -692,7 +692,7 @@ void CC_EditSetHSL( HWND hDlg, int h, int s, int l )
|
||||||
void CC_SwitchToFullSize( HWND hDlg, COLORREF result, LPRECT lprect )
|
void CC_SwitchToFullSize( HWND hDlg, COLORREF result, LPRECT lprect )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
|
|
||||||
EnableWindow( GetDlgItem(hDlg, 0x2cf), FALSE);
|
EnableWindow( GetDlgItem(hDlg, 0x2cf), FALSE);
|
||||||
CC_PrepareColorGraph(hDlg);
|
CC_PrepareColorGraph(hDlg);
|
||||||
|
@ -728,7 +728,7 @@ static void CC_PaintPredefColorArray( HWND hDlg, int rows, int cols)
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush;
|
||||||
int dx, dy, i, j, k;
|
int dx, dy, i, j, k;
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
|
|
||||||
GetClientRect(hwnd, &rect);
|
GetClientRect(hwnd, &rect);
|
||||||
dx = rect.right / cols;
|
dx = rect.right / cols;
|
||||||
|
@ -737,7 +737,7 @@ static void CC_PaintPredefColorArray( HWND hDlg, int rows, int cols)
|
||||||
|
|
||||||
hdc = GetDC(hwnd);
|
hdc = GetDC(hwnd);
|
||||||
GetClientRect(hwnd, &rect);
|
GetClientRect(hwnd, &rect);
|
||||||
FillRect(hdc, &rect, (HBRUSH)GetClassLongA(hwnd, GCL_HBRBACKGROUND));
|
FillRect(hdc, &rect, (HBRUSH)GetClassLongPtrW(hwnd, GCLP_HBRBACKGROUND));
|
||||||
for ( j = 0; j < rows; j++ )
|
for ( j = 0; j < rows; j++ )
|
||||||
{
|
{
|
||||||
for ( i = 0; i < cols; i++ )
|
for ( i = 0; i < cols; i++ )
|
||||||
|
@ -770,7 +770,7 @@ void CC_PaintUserColorArray( HWND hDlg, int rows, int cols, COLORREF* lpcr )
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush;
|
||||||
int dx, dy, i, j, k;
|
int dx, dy, i, j, k;
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
|
|
||||||
GetClientRect(hwnd, &rect);
|
GetClientRect(hwnd, &rect);
|
||||||
|
|
||||||
|
@ -781,7 +781,7 @@ void CC_PaintUserColorArray( HWND hDlg, int rows, int cols, COLORREF* lpcr )
|
||||||
hdc = GetDC(hwnd);
|
hdc = GetDC(hwnd);
|
||||||
if (hdc)
|
if (hdc)
|
||||||
{
|
{
|
||||||
FillRect(hdc, &rect, (HBRUSH)GetClassLongA(hwnd, GCL_HBRBACKGROUND) );
|
FillRect(hdc, &rect, (HBRUSH)GetClassLongPtrW(hwnd, GCLP_HBRBACKGROUND) );
|
||||||
for (j = 0; j < rows; j++)
|
for (j = 0; j < rows; j++)
|
||||||
{
|
{
|
||||||
for (i = 0; i < cols; i++)
|
for (i = 0; i < cols; i++)
|
||||||
|
@ -842,7 +842,7 @@ LONG CC_WMInitDialog( HWND hDlg, WPARAM wParam, LPARAM lParam )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetWindowLongA(hDlg, DWL_USER, (LONG)lpp);
|
SetWindowLongPtrW(hDlg, DWLP_USER, (LONG_PTR)lpp);
|
||||||
|
|
||||||
if (!(lpp->lpcc->Flags & CC_SHOWHELP))
|
if (!(lpp->lpcc->Flags & CC_SHOWHELP))
|
||||||
ShowWindow( GetDlgItem(hDlg,0x40e), SW_HIDE);
|
ShowWindow( GetDlgItem(hDlg,0x40e), SW_HIDE);
|
||||||
|
@ -936,7 +936,7 @@ LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notifyCode,
|
||||||
UINT cokmsg;
|
UINT cokmsg;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
COLORREF *cr;
|
COLORREF *cr;
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
TRACE("CC_WMCommand wParam=%x lParam=%lx\n", wParam, lParam);
|
TRACE("CC_WMCommand wParam=%x lParam=%lx\n", wParam, lParam);
|
||||||
switch (wParam)
|
switch (wParam)
|
||||||
{
|
{
|
||||||
|
@ -1058,7 +1058,7 @@ LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notifyCode,
|
||||||
LRESULT CC_WMPaint( HWND hDlg, WPARAM wParam, LPARAM lParam )
|
LRESULT CC_WMPaint( HWND hDlg, WPARAM wParam, LPARAM lParam )
|
||||||
{
|
{
|
||||||
PAINTSTRUCT ps;
|
PAINTSTRUCT ps;
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
|
|
||||||
BeginPaint(hDlg, &ps);
|
BeginPaint(hDlg, &ps);
|
||||||
/* we have to paint dialog children except text and buttons */
|
/* we have to paint dialog children except text and buttons */
|
||||||
|
@ -1079,7 +1079,7 @@ LRESULT CC_WMPaint( HWND hDlg, WPARAM wParam, LPARAM lParam )
|
||||||
*/
|
*/
|
||||||
LRESULT CC_WMLButtonUp( HWND hDlg, WPARAM wParam, LPARAM lParam )
|
LRESULT CC_WMLButtonUp( HWND hDlg, WPARAM wParam, LPARAM lParam )
|
||||||
{
|
{
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
if (lpp->capturedGraph)
|
if (lpp->capturedGraph)
|
||||||
{
|
{
|
||||||
lpp->capturedGraph = 0;
|
lpp->capturedGraph = 0;
|
||||||
|
@ -1095,7 +1095,7 @@ LRESULT CC_WMLButtonUp( HWND hDlg, WPARAM wParam, LPARAM lParam )
|
||||||
*/
|
*/
|
||||||
LRESULT CC_WMMouseMove( HWND hDlg, LPARAM lParam )
|
LRESULT CC_WMMouseMove( HWND hDlg, LPARAM lParam )
|
||||||
{
|
{
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
int r, g, b;
|
int r, g, b;
|
||||||
|
|
||||||
if (lpp->capturedGraph)
|
if (lpp->capturedGraph)
|
||||||
|
@ -1133,7 +1133,7 @@ LRESULT CC_WMMouseMove( HWND hDlg, LPARAM lParam )
|
||||||
*/
|
*/
|
||||||
LRESULT CC_WMLButtonDown( HWND hDlg, WPARAM wParam, LPARAM lParam )
|
LRESULT CC_WMLButtonDown( HWND hDlg, WPARAM wParam, LPARAM lParam )
|
||||||
{
|
{
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
int r, g, b, i;
|
int r, g, b, i;
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
|
@ -1192,7 +1192,7 @@ static INT_PTR CALLBACK ColorDlgProc( HWND hDlg, UINT message,
|
||||||
{
|
{
|
||||||
|
|
||||||
int res;
|
int res;
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
if (message != WM_INITDIALOG)
|
if (message != WM_INITDIALOG)
|
||||||
{
|
{
|
||||||
if (!lpp)
|
if (!lpp)
|
||||||
|
@ -1217,7 +1217,7 @@ static INT_PTR CALLBACK ColorDlgProc( HWND hDlg, UINT message,
|
||||||
DeleteDC(lpp->hdcMem);
|
DeleteDC(lpp->hdcMem);
|
||||||
DeleteObject(lpp->hbmMem);
|
DeleteObject(lpp->hbmMem);
|
||||||
HeapFree(GetProcessHeap(), 0, lpp);
|
HeapFree(GetProcessHeap(), 0, lpp);
|
||||||
SetWindowLongA(hDlg, DWL_USER, 0L); /* we don't need it anymore */
|
SetWindowLongPtrW(hDlg, DWLP_USER, 0); /* we don't need it anymore */
|
||||||
break;
|
break;
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
if (CC_WMCommand( hDlg, wParam, lParam, HIWORD(wParam), (HWND) lParam))
|
if (CC_WMCommand( hDlg, wParam, lParam, HIWORD(wParam), (HWND) lParam))
|
||||||
|
|
|
@ -102,7 +102,7 @@ LONG CC_WMInitDialog16( HWND hDlg, WPARAM wParam, LPARAM lParam )
|
||||||
ch32->lpfnHook = (LPCCHOOKPROC) ch16->lpfnHook; /* only used as flag */
|
ch32->lpfnHook = (LPCCHOOKPROC) ch16->lpfnHook; /* only used as flag */
|
||||||
ch32->Flags = ch16->Flags;
|
ch32->Flags = ch16->Flags;
|
||||||
|
|
||||||
SetWindowLongA(hDlg, DWL_USER, (LONG)lpp);
|
SetWindowLongPtrW(hDlg, DWLP_USER, (LONG_PTR)lpp);
|
||||||
|
|
||||||
if (!(lpp->lpcc->Flags & CC_SHOWHELP))
|
if (!(lpp->lpcc->Flags & CC_SHOWHELP))
|
||||||
ShowWindow( GetDlgItem(hDlg,0x40e), SW_HIDE);
|
ShowWindow( GetDlgItem(hDlg,0x40e), SW_HIDE);
|
||||||
|
@ -196,7 +196,7 @@ LRESULT CC_WMCommand16( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notifyCode
|
||||||
UINT cokmsg;
|
UINT cokmsg;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
COLORREF *cr;
|
COLORREF *cr;
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
TRACE("CC_WMCommand wParam=%x lParam=%lx\n", wParam, lParam);
|
TRACE("CC_WMCommand wParam=%x lParam=%lx\n", wParam, lParam);
|
||||||
switch (wParam)
|
switch (wParam)
|
||||||
{
|
{
|
||||||
|
@ -334,7 +334,7 @@ BOOL16 CALLBACK ColorDlgProc16( HWND16 hDlg16, UINT16 message,
|
||||||
BOOL16 res;
|
BOOL16 res;
|
||||||
HWND hDlg = HWND_32(hDlg16);
|
HWND hDlg = HWND_32(hDlg16);
|
||||||
|
|
||||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
|
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
if (message != WM_INITDIALOG)
|
if (message != WM_INITDIALOG)
|
||||||
{
|
{
|
||||||
if (!lpp)
|
if (!lpp)
|
||||||
|
@ -360,7 +360,7 @@ BOOL16 CALLBACK ColorDlgProc16( HWND16 hDlg16, UINT16 message,
|
||||||
DeleteObject(lpp->hbmMem);
|
DeleteObject(lpp->hbmMem);
|
||||||
HeapFree(GetProcessHeap(), 0, lpp->lpcc);
|
HeapFree(GetProcessHeap(), 0, lpp->lpcc);
|
||||||
HeapFree(GetProcessHeap(), 0, lpp);
|
HeapFree(GetProcessHeap(), 0, lpp);
|
||||||
SetWindowLongA(hDlg, DWL_USER, 0L); /* we don't need it anymore */
|
SetWindowLongPtrW(hDlg, DWLP_USER, 0); /* we don't need it anymore */
|
||||||
break;
|
break;
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
if (CC_WMCommand16(hDlg, wParam, lParam,
|
if (CC_WMCommand16(hDlg, wParam, lParam,
|
||||||
|
|
|
@ -1528,7 +1528,7 @@ static LRESULT FILEDLG95_OnWMGetIShellBrowser(HWND hwnd)
|
||||||
|
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
|
|
||||||
SetWindowLongA(hwnd,DWL_MSGRESULT,(LONG)fodInfos->Shell.FOIShellBrowser);
|
SetWindowLongPtrW(hwnd,DWLP_MSGRESULT,(LONG_PTR)fodInfos->Shell.FOIShellBrowser);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1551,7 +1551,7 @@ static BOOL FILEDLG95_SendFileOK( HWND hwnd, FileOpenDlgInfos *fodInfos )
|
||||||
TRACE("---\n");
|
TRACE("---\n");
|
||||||
/* First send CDN_FILEOK as MSDN doc says */
|
/* First send CDN_FILEOK as MSDN doc says */
|
||||||
SendCustomDlgNotificationMessage(hwnd,CDN_FILEOK);
|
SendCustomDlgNotificationMessage(hwnd,CDN_FILEOK);
|
||||||
if (GetWindowLongW(fodInfos->DlgInfos.hwndCustomDlg, DWL_MSGRESULT))
|
if (GetWindowLongPtrW(fodInfos->DlgInfos.hwndCustomDlg, DWLP_MSGRESULT))
|
||||||
{
|
{
|
||||||
TRACE("canceled\n");
|
TRACE("canceled\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1560,7 +1560,7 @@ static BOOL FILEDLG95_SendFileOK( HWND hwnd, FileOpenDlgInfos *fodInfos )
|
||||||
/* fodInfos->ofnInfos points to an ASCII or UNICODE structure as appropriate */
|
/* fodInfos->ofnInfos points to an ASCII or UNICODE structure as appropriate */
|
||||||
SendMessageW(fodInfos->DlgInfos.hwndCustomDlg,
|
SendMessageW(fodInfos->DlgInfos.hwndCustomDlg,
|
||||||
fodInfos->HookMsg.fileokstring, 0, (LPARAM)fodInfos->ofnInfos);
|
fodInfos->HookMsg.fileokstring, 0, (LPARAM)fodInfos->ofnInfos);
|
||||||
if (GetWindowLongW(fodInfos->DlgInfos.hwndCustomDlg, DWL_MSGRESULT))
|
if (GetWindowLongPtrW(fodInfos->DlgInfos.hwndCustomDlg, DWLP_MSGRESULT))
|
||||||
{
|
{
|
||||||
TRACE("canceled\n");
|
TRACE("canceled\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -230,7 +230,7 @@ HWND16 WINAPI ReplaceText16( SEGPTR find )
|
||||||
static LRESULT FINDDLG_WMInitDialog(HWND hWnd, LPARAM lParam, LPDWORD lpFlags,
|
static LRESULT FINDDLG_WMInitDialog(HWND hWnd, LPARAM lParam, LPDWORD lpFlags,
|
||||||
LPSTR lpstrFindWhat, BOOL fUnicode)
|
LPSTR lpstrFindWhat, BOOL fUnicode)
|
||||||
{
|
{
|
||||||
SetWindowLongA(hWnd, DWL_USER, lParam);
|
SetWindowLongPtrW(hWnd, DWLP_USER, lParam);
|
||||||
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);
|
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);
|
||||||
/*
|
/*
|
||||||
* FIXME : If the initial FindWhat string is empty, we should disable the
|
* FIXME : If the initial FindWhat string is empty, we should disable the
|
||||||
|
@ -295,14 +295,14 @@ static LRESULT FINDDLG_WMCommand(HWND hWnd, WPARAM wParam,
|
||||||
else *lpFlags &= ~FR_MATCHCASE;
|
else *lpFlags &= ~FR_MATCHCASE;
|
||||||
*lpFlags &= ~(FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);
|
*lpFlags &= ~(FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);
|
||||||
*lpFlags |= FR_FINDNEXT;
|
*lpFlags |= FR_FINDNEXT;
|
||||||
SendMessageA(hwndOwner, uFindReplaceMessage, 0,
|
SendMessageW( hwndOwner, uFindReplaceMessage, 0,
|
||||||
GetWindowLongA(hWnd, DWL_USER) );
|
GetWindowLongPtrW(hWnd, DWLP_USER) );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case IDCANCEL:
|
case IDCANCEL:
|
||||||
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL);
|
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL);
|
||||||
*lpFlags |= FR_DIALOGTERM;
|
*lpFlags |= FR_DIALOGTERM;
|
||||||
SendMessageA(hwndOwner, uFindReplaceMessage, 0,
|
SendMessageW( hwndOwner, uFindReplaceMessage, 0,
|
||||||
GetWindowLongA(hWnd, DWL_USER) );
|
GetWindowLongPtrW(hWnd, DWLP_USER) );
|
||||||
DestroyWindow(hWnd);
|
DestroyWindow(hWnd);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case pshHelp:
|
case pshHelp:
|
||||||
|
@ -328,7 +328,7 @@ BOOL16 CALLBACK FindTextDlgProc16(HWND16 hWnd16, UINT16 wMsg, WPARAM16 wParam,
|
||||||
return FINDDLG_WMInitDialog(hWnd, lParam, &(lpfr->Flags),
|
return FINDDLG_WMInitDialog(hWnd, lParam, &(lpfr->Flags),
|
||||||
MapSL(lpfr->lpstrFindWhat), FALSE);
|
MapSL(lpfr->lpstrFindWhat), FALSE);
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
lpfr=MapSL(GetWindowLongA(hWnd, DWL_USER));
|
lpfr=MapSL(GetWindowLongPtrW(hWnd, DWLP_USER));
|
||||||
return FINDDLG_WMCommand(hWnd, wParam, HWND_32(lpfr->hwndOwner),
|
return FINDDLG_WMCommand(hWnd, wParam, HWND_32(lpfr->hwndOwner),
|
||||||
&lpfr->Flags, MapSL(lpfr->lpstrFindWhat),
|
&lpfr->Flags, MapSL(lpfr->lpstrFindWhat),
|
||||||
lpfr->wFindWhatLen, FALSE);
|
lpfr->wFindWhatLen, FALSE);
|
||||||
|
@ -344,7 +344,7 @@ static LRESULT REPLACEDLG_WMInitDialog(HWND hWnd, LPARAM lParam,
|
||||||
LPDWORD lpFlags, LPSTR lpstrFindWhat,
|
LPDWORD lpFlags, LPSTR lpstrFindWhat,
|
||||||
LPSTR lpstrReplaceWith, BOOL fUnicode)
|
LPSTR lpstrReplaceWith, BOOL fUnicode)
|
||||||
{
|
{
|
||||||
SetWindowLongA(hWnd, DWL_USER, lParam);
|
SetWindowLongPtrW(hWnd, DWLP_USER, lParam);
|
||||||
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);
|
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);
|
||||||
/*
|
/*
|
||||||
* FIXME : If the initial FindWhat string is empty, we should disable the FinNext /
|
* FIXME : If the initial FindWhat string is empty, we should disable the FinNext /
|
||||||
|
@ -410,14 +410,14 @@ static LRESULT REPLACEDLG_WMCommand(HWND hWnd, WPARAM16 wParam,
|
||||||
else *lpFlags &= ~FR_MATCHCASE;
|
else *lpFlags &= ~FR_MATCHCASE;
|
||||||
*lpFlags &= ~(FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);
|
*lpFlags &= ~(FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);
|
||||||
*lpFlags |= FR_FINDNEXT;
|
*lpFlags |= FR_FINDNEXT;
|
||||||
SendMessageA(hwndOwner, uFindReplaceMessage, 0,
|
SendMessageW( hwndOwner, uFindReplaceMessage, 0,
|
||||||
GetWindowLongA(hWnd, DWL_USER) );
|
GetWindowLongPtrW(hWnd, DWLP_USER) );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case IDCANCEL:
|
case IDCANCEL:
|
||||||
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL);
|
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL);
|
||||||
*lpFlags |= FR_DIALOGTERM;
|
*lpFlags |= FR_DIALOGTERM;
|
||||||
SendMessageA(hwndOwner, uFindReplaceMessage, 0,
|
SendMessageW( hwndOwner, uFindReplaceMessage, 0,
|
||||||
GetWindowLongA(hWnd, DWL_USER) );
|
GetWindowLongPtrW(hWnd, DWLP_USER) );
|
||||||
DestroyWindow(hWnd);
|
DestroyWindow(hWnd);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case psh1:
|
case psh1:
|
||||||
|
@ -438,8 +438,8 @@ static LRESULT REPLACEDLG_WMCommand(HWND hWnd, WPARAM16 wParam,
|
||||||
else *lpFlags &= ~FR_MATCHCASE;
|
else *lpFlags &= ~FR_MATCHCASE;
|
||||||
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACEALL | FR_DIALOGTERM);
|
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACEALL | FR_DIALOGTERM);
|
||||||
*lpFlags |= FR_REPLACE;
|
*lpFlags |= FR_REPLACE;
|
||||||
SendMessageA(hwndOwner, uFindReplaceMessage, 0,
|
SendMessageW( hwndOwner, uFindReplaceMessage, 0,
|
||||||
GetWindowLongA(hWnd, DWL_USER) );
|
GetWindowLongPtrW(hWnd, DWLP_USER) );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case psh2:
|
case psh2:
|
||||||
if (fUnicode)
|
if (fUnicode)
|
||||||
|
@ -459,8 +459,8 @@ static LRESULT REPLACEDLG_WMCommand(HWND hWnd, WPARAM16 wParam,
|
||||||
else *lpFlags &= ~FR_MATCHCASE;
|
else *lpFlags &= ~FR_MATCHCASE;
|
||||||
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_DIALOGTERM);
|
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_DIALOGTERM);
|
||||||
*lpFlags |= FR_REPLACEALL;
|
*lpFlags |= FR_REPLACEALL;
|
||||||
SendMessageA(hwndOwner, uFindReplaceMessage, 0,
|
SendMessageW( hwndOwner, uFindReplaceMessage, 0,
|
||||||
GetWindowLongA(hWnd, DWL_USER) );
|
GetWindowLongPtrW(hWnd, DWLP_USER) );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case pshHelp:
|
case pshHelp:
|
||||||
/* FIXME : should lpfr structure be passed as an argument ??? */
|
/* FIXME : should lpfr structure be passed as an argument ??? */
|
||||||
|
@ -486,7 +486,7 @@ BOOL16 CALLBACK ReplaceTextDlgProc16(HWND16 hWnd16, UINT16 wMsg, WPARAM16 wParam
|
||||||
MapSL(lpfr->lpstrFindWhat),
|
MapSL(lpfr->lpstrFindWhat),
|
||||||
MapSL(lpfr->lpstrReplaceWith), FALSE);
|
MapSL(lpfr->lpstrReplaceWith), FALSE);
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
lpfr=MapSL(GetWindowLongA(hWnd, DWL_USER));
|
lpfr=MapSL(GetWindowLongPtrW(hWnd, DWLP_USER));
|
||||||
return REPLACEDLG_WMCommand(hWnd, wParam, HWND_32(lpfr->hwndOwner),
|
return REPLACEDLG_WMCommand(hWnd, wParam, HWND_32(lpfr->hwndOwner),
|
||||||
&lpfr->Flags, MapSL(lpfr->lpstrFindWhat),
|
&lpfr->Flags, MapSL(lpfr->lpstrFindWhat),
|
||||||
lpfr->wFindWhatLen, MapSL(lpfr->lpstrReplaceWith),
|
lpfr->wFindWhatLen, MapSL(lpfr->lpstrReplaceWith),
|
||||||
|
|
|
@ -122,7 +122,7 @@ INT16 WINAPI FontFamilyEnumProc16( SEGPTR logfont, SEGPTR metrics,
|
||||||
{
|
{
|
||||||
HWND hwnd=HWND_32(LOWORD(lParam));
|
HWND hwnd=HWND_32(LOWORD(lParam));
|
||||||
HWND hDlg=GetParent(hwnd);
|
HWND hDlg=GetParent(hwnd);
|
||||||
LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);
|
LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
LOGFONT16 *lplf = MapSL( logfont );
|
LOGFONT16 *lplf = MapSL( logfont );
|
||||||
TEXTMETRIC16 *lpmtrx16 = MapSL(metrics);
|
TEXTMETRIC16 *lpmtrx16 = MapSL(metrics);
|
||||||
ENUMLOGFONTEXW elf32w;
|
ENUMLOGFONTEXW elf32w;
|
||||||
|
@ -142,7 +142,7 @@ INT16 WINAPI FontStyleEnumProc16( SEGPTR logfont, SEGPTR metrics,
|
||||||
HWND hcmb2=HWND_32(LOWORD(lParam));
|
HWND hcmb2=HWND_32(LOWORD(lParam));
|
||||||
HWND hcmb3=HWND_32(HIWORD(lParam));
|
HWND hcmb3=HWND_32(HIWORD(lParam));
|
||||||
HWND hDlg=GetParent(hcmb3);
|
HWND hDlg=GetParent(hcmb3);
|
||||||
LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);
|
LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
LOGFONT16 *lplf = MapSL(logfont);
|
LOGFONT16 *lplf = MapSL(logfont);
|
||||||
TEXTMETRIC16 *lpmtrx16 = MapSL(metrics);
|
TEXTMETRIC16 *lpmtrx16 = MapSL(metrics);
|
||||||
ENUMLOGFONTEXW elf32w;
|
ENUMLOGFONTEXW elf32w;
|
||||||
|
@ -300,7 +300,7 @@ BOOL16 CALLBACK FormatCharDlgProc16(HWND16 hDlg16, UINT16 message,
|
||||||
BOOL16 res=0;
|
BOOL16 res=0;
|
||||||
if (message!=WM_INITDIALOG)
|
if (message!=WM_INITDIALOG)
|
||||||
{
|
{
|
||||||
lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);
|
lpcf=(LPCHOOSEFONT16)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
if (!lpcf && message != WM_MEASUREITEM)
|
if (!lpcf && message != WM_MEASUREITEM)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (CFn_HookCallChk(lpcf))
|
if (CFn_HookCallChk(lpcf))
|
||||||
|
|
|
@ -356,7 +356,7 @@ INT_PTR CALLBACK SERIALUI_ConfigDialogProc(HWND hWnd, UINT uMsg, WPARAM wParam,
|
||||||
info = (SERIALUI_DialogInfo*) lParam;
|
info = (SERIALUI_DialogInfo*) lParam;
|
||||||
if(!info)
|
if(!info)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
SetWindowLongW(hWnd, DWL_USER, lParam);
|
SetWindowLongPtrW(hWnd, DWLP_USER, lParam);
|
||||||
strcpyW( szTitle, szSettings );
|
strcpyW( szTitle, szSettings );
|
||||||
strcatW( szTitle, info->lpszDevice );
|
strcatW( szTitle, info->lpszDevice );
|
||||||
SetWindowTextW(hWnd, szTitle);
|
SetWindowTextW(hWnd, szTitle);
|
||||||
|
@ -367,7 +367,7 @@ INT_PTR CALLBACK SERIALUI_ConfigDialogProc(HWND hWnd, UINT uMsg, WPARAM wParam,
|
||||||
{
|
{
|
||||||
WORD wID = LOWORD(wParam);
|
WORD wID = LOWORD(wParam);
|
||||||
|
|
||||||
info = (SERIALUI_DialogInfo *) GetWindowLongW(hWnd, DWL_USER);
|
info = (SERIALUI_DialogInfo *) GetWindowLongPtrW(hWnd, DWLP_USER);
|
||||||
if(!info)
|
if(!info)
|
||||||
EndDialog(hWnd,0);
|
EndDialog(hWnd,0);
|
||||||
switch (wID)
|
switch (wID)
|
||||||
|
|
|
@ -127,9 +127,9 @@ INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar
|
||||||
case WM_INITDIALOG :
|
case WM_INITDIALOG :
|
||||||
prfdp = (RUNFILEDLGPARAMS *)lParam ;
|
prfdp = (RUNFILEDLGPARAMS *)lParam ;
|
||||||
SetWindowTextA (hwnd, prfdp->lpstrTitle) ;
|
SetWindowTextA (hwnd, prfdp->lpstrTitle) ;
|
||||||
SetClassLongA (hwnd, GCL_HICON, (LPARAM)prfdp->hIcon) ;
|
SetClassLongPtrW (hwnd, GCLP_HICON, (LPARAM)prfdp->hIcon) ;
|
||||||
SendMessageA (GetDlgItem (hwnd, 12297), STM_SETICON,
|
SendMessageW (GetDlgItem (hwnd, 12297), STM_SETICON,
|
||||||
(WPARAM)LoadIconA (NULL, (LPSTR)IDI_WINLOGO), 0);
|
(WPARAM)LoadIconW (NULL, (LPCWSTR)IDI_WINLOGO), 0);
|
||||||
FillList (GetDlgItem (hwnd, 12298), NULL) ;
|
FillList (GetDlgItem (hwnd, 12298), NULL) ;
|
||||||
SetFocus (GetDlgItem (hwnd, 12298)) ;
|
SetFocus (GetDlgItem (hwnd, 12298)) ;
|
||||||
return TRUE ;
|
return TRUE ;
|
||||||
|
|
|
@ -62,7 +62,7 @@ typedef struct tagDLGDATAEX
|
||||||
/* Dialogue procedure for general message boxes */
|
/* Dialogue procedure for general message boxes */
|
||||||
static INT_PTR CALLBACK SHDlgProcEx(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
static INT_PTR CALLBACK SHDlgProcEx(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
DLGDATAEX *d = (DLGDATAEX *)GetWindowLongW(hDlg, DWL_USER);
|
DLGDATAEX *d = (DLGDATAEX *)GetWindowLongPtrW(hDlg, DWLP_USER);
|
||||||
|
|
||||||
TRACE("(%p,%u,%d,%ld) data %p\n", hDlg, uMsg, wParam, lParam, d);
|
TRACE("(%p,%u,%d,%ld) data %p\n", hDlg, uMsg, wParam, lParam, d);
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ static INT_PTR CALLBACK SHDlgProcEx(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
/* FIXME: Not sure where native stores its lParam */
|
/* FIXME: Not sure where native stores its lParam */
|
||||||
SetWindowLongW(hDlg, DWL_USER, lParam);
|
SetWindowLongPtrW(hDlg, DWLP_USER, lParam);
|
||||||
d = (DLGDATAEX *)lParam;
|
d = (DLGDATAEX *)lParam;
|
||||||
TRACE("WM_INITDIALOG: %p, %s,%p,%p\n", hDlg, debugstr_w(d->lpszId),
|
TRACE("WM_INITDIALOG: %p, %s,%p,%p\n", hDlg, debugstr_w(d->lpszId),
|
||||||
d->dlgProc, (void*)d->lParam);
|
d->dlgProc, (void*)d->lParam);
|
||||||
|
|
|
@ -2452,7 +2452,7 @@ HWND WINAPI SHCreateWorkerWindowA(LONG wndProc, HWND hWndParent, DWORD dwExStyle
|
||||||
hWndParent, hMenu, shlwapi_hInstance, 0);
|
hWndParent, hMenu, shlwapi_hInstance, 0);
|
||||||
if (hWnd)
|
if (hWnd)
|
||||||
{
|
{
|
||||||
SetWindowLongA(hWnd, DWL_MSGRESULT, z);
|
SetWindowLongPtrW(hWnd, DWLP_MSGRESULT, z);
|
||||||
|
|
||||||
if (wndProc)
|
if (wndProc)
|
||||||
SetWindowLongPtrA(hWnd, GWLP_WNDPROC, wndProc);
|
SetWindowLongPtrA(hWnd, GWLP_WNDPROC, wndProc);
|
||||||
|
@ -2739,7 +2739,7 @@ HWND WINAPI SHCreateWorkerWindowW(LONG wndProc, HWND hWndParent, DWORD dwExStyle
|
||||||
hWndParent, hMenu, shlwapi_hInstance, 0);
|
hWndParent, hMenu, shlwapi_hInstance, 0);
|
||||||
if (hWnd)
|
if (hWnd)
|
||||||
{
|
{
|
||||||
SetWindowLongW(hWnd, DWL_MSGRESULT, z);
|
SetWindowLongPtrW(hWnd, DWLP_MSGRESULT, z);
|
||||||
|
|
||||||
if (wndProc)
|
if (wndProc)
|
||||||
SetWindowLongPtrW(hWnd, GWLP_WNDPROC, wndProc);
|
SetWindowLongPtrW(hWnd, GWLP_WNDPROC, wndProc);
|
||||||
|
|
|
@ -148,7 +148,7 @@ typedef struct
|
||||||
#define DF_OWNERENABLED 0x0002
|
#define DF_OWNERENABLED 0x0002
|
||||||
|
|
||||||
/* offset of DIALOGINFO ptr in dialog extra bytes */
|
/* offset of DIALOGINFO ptr in dialog extra bytes */
|
||||||
#define DWL_WINE_DIALOGINFO (DWL_USER+sizeof(ULONG_PTR))
|
#define DWLP_WINE_DIALOGINFO (DWLP_USER+sizeof(ULONG_PTR))
|
||||||
|
|
||||||
extern DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create );
|
extern DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create );
|
||||||
extern BOOL DIALOG_GetCharSize( HDC hdc, HFONT hFont, SIZE * pSize );
|
extern BOOL DIALOG_GetCharSize( HDC hdc, HFONT hFont, SIZE * pSize );
|
||||||
|
|
|
@ -142,7 +142,7 @@ BOOL WINAPI PaintDesktop(HDC hdc)
|
||||||
(!fTileWallPaper && ((bitmapSize.cx < rect.right) || (bitmapSize.cy < rect.bottom))))
|
(!fTileWallPaper && ((bitmapSize.cx < rect.right) || (bitmapSize.cy < rect.bottom))))
|
||||||
{
|
{
|
||||||
HBRUSH brush = hbrushPattern;
|
HBRUSH brush = hbrushPattern;
|
||||||
if (!brush) brush = (HBRUSH)GetClassLongA( hwnd, GCL_HBRBACKGROUND );
|
if (!brush) brush = (HBRUSH)GetClassLongPtrW( hwnd, GCLP_HBRBACKGROUND );
|
||||||
/* Set colors in case pattern is a monochrome bitmap */
|
/* Set colors in case pattern is a monochrome bitmap */
|
||||||
SetBkColor( hdc, RGB(0,0,0) );
|
SetBkColor( hdc, RGB(0,0,0) );
|
||||||
SetTextColor( hdc, GetSysColor(COLOR_BACKGROUND) );
|
SetTextColor( hdc, GetSysColor(COLOR_BACKGROUND) );
|
||||||
|
|
|
@ -410,8 +410,8 @@ static HWND DIALOG_CreateIndirect16( HINSTANCE16 hInst, LPCVOID dlgTemplate,
|
||||||
wndPtr->flags |= WIN_ISDIALOG;
|
wndPtr->flags |= WIN_ISDIALOG;
|
||||||
WIN_ReleasePtr( wndPtr );
|
WIN_ReleasePtr( wndPtr );
|
||||||
|
|
||||||
SetWindowLongW( hwnd, DWL_WINE_DIALOGINFO, (LONG)dlgInfo );
|
SetWindowLongPtrW( hwnd, DWLP_WINE_DIALOGINFO, (LONG_PTR)dlgInfo );
|
||||||
SetWindowLong16( HWND_16(hwnd), DWL_DLGPROC, (LONG)dlgProc );
|
SetWindowLong16( HWND_16(hwnd), DWLP_DLGPROC, (LONG)dlgProc );
|
||||||
|
|
||||||
if (dlgInfo->hUserFont)
|
if (dlgInfo->hUserFont)
|
||||||
SendMessageA( hwnd, WM_SETFONT, (WPARAM)dlgInfo->hUserFont, 0 );
|
SendMessageA( hwnd, WM_SETFONT, (WPARAM)dlgInfo->hUserFont, 0 );
|
||||||
|
|
|
@ -150,7 +150,7 @@ static BOOL ICONTITLE_Paint( HWND hwnd, HWND owner, HDC hDC, BOOL bActive )
|
||||||
{
|
{
|
||||||
if( GetWindowLongA( hwnd, GWL_STYLE ) & WS_CHILD )
|
if( GetWindowLongA( hwnd, GWL_STYLE ) & WS_CHILD )
|
||||||
{
|
{
|
||||||
hBrush = (HBRUSH) GetClassLongA(hwnd, GCL_HBRBACKGROUND);
|
hBrush = (HBRUSH) GetClassLongPtrW(hwnd, GCLP_HBRBACKGROUND);
|
||||||
if( hBrush )
|
if( hBrush )
|
||||||
{
|
{
|
||||||
INT level;
|
INT level;
|
||||||
|
|
|
@ -206,7 +206,7 @@ INT_PTR CALLBACK PSDRV_PaperDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
|
||||||
switch(msg) {
|
switch(msg) {
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
di = (PSDRV_DLGINFO*)((PROPSHEETPAGEA*)lParam)->lParam;
|
di = (PSDRV_DLGINFO*)((PROPSHEETPAGEA*)lParam)->lParam;
|
||||||
SetWindowLongA(hwnd, DWL_USER, (LONG)di);
|
SetWindowLongPtrW(hwnd, DWLP_USER, (LONG_PTR)di);
|
||||||
|
|
||||||
for(ps = di->pi->ppd->PageSizes, i = 0; ps; ps = ps->next, i++) {
|
for(ps = di->pi->ppd->PageSizes, i = 0; ps; ps = ps->next, i++) {
|
||||||
SendDlgItemMessageA(hwnd, IDD_PAPERS, LB_INSERTSTRING, i,
|
SendDlgItemMessageA(hwnd, IDD_PAPERS, LB_INSERTSTRING, i,
|
||||||
|
@ -237,7 +237,7 @@ INT_PTR CALLBACK PSDRV_PaperDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
di = (PSDRV_DLGINFO *)GetWindowLongA(hwnd, DWL_USER);
|
di = (PSDRV_DLGINFO *)GetWindowLongPtrW(hwnd, DWLP_USER);
|
||||||
switch(LOWORD(wParam)) {
|
switch(LOWORD(wParam)) {
|
||||||
case IDD_PAPERS:
|
case IDD_PAPERS:
|
||||||
if(HIWORD(wParam) == LBN_SELCHANGE) {
|
if(HIWORD(wParam) == LBN_SELCHANGE) {
|
||||||
|
@ -272,11 +272,11 @@ INT_PTR CALLBACK PSDRV_PaperDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
|
||||||
case WM_NOTIFY:
|
case WM_NOTIFY:
|
||||||
{
|
{
|
||||||
NMHDR *nmhdr = (NMHDR *)lParam;
|
NMHDR *nmhdr = (NMHDR *)lParam;
|
||||||
di = (PSDRV_DLGINFO *)GetWindowLongA(hwnd, DWL_USER);
|
di = (PSDRV_DLGINFO *)GetWindowLongPtrW(hwnd, DWLP_USER);
|
||||||
switch(nmhdr->code) {
|
switch(nmhdr->code) {
|
||||||
case PSN_APPLY:
|
case PSN_APPLY:
|
||||||
memcpy(di->pi->Devmode, di->dlgdm, sizeof(PSDRV_DEVMODEA));
|
memcpy(di->pi->Devmode, di->dlgdm, sizeof(PSDRV_DEVMODEA));
|
||||||
SetWindowLongA(hwnd, DWL_MSGRESULT, PSNRET_NOERROR);
|
SetWindowLongPtrW(hwnd, DWLP_MSGRESULT, PSNRET_NOERROR);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -484,7 +484,7 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data )
|
||||||
wm_hints->input = !(style & WS_DISABLED);
|
wm_hints->input = !(style & WS_DISABLED);
|
||||||
|
|
||||||
set_icon_hints( display, data, wm_hints,
|
set_icon_hints( display, data, wm_hints,
|
||||||
(HICON)GetClassLongW( data->hwnd, GCL_HICON ) );
|
(HICON)GetClassLongPtrW( data->hwnd, GCLP_HICON ) );
|
||||||
|
|
||||||
wm_hints->initial_state = (style & WS_MINIMIZE) ? IconicState : NormalState;
|
wm_hints->initial_state = (style & WS_MINIMIZE) ? IconicState : NormalState;
|
||||||
wm_hints->window_group = group_leader;
|
wm_hints->window_group = group_leader;
|
||||||
|
|
|
@ -1866,8 +1866,8 @@ void X11DRV_SysCommandSizeMove( HWND hwnd, WPARAM wParam )
|
||||||
|
|
||||||
if( iconic ) /* create a cursor for dragging */
|
if( iconic ) /* create a cursor for dragging */
|
||||||
{
|
{
|
||||||
hDragCursor = (HCURSOR)GetClassLongA( hwnd, GCL_HICON);
|
hDragCursor = (HCURSOR)GetClassLongPtrW( hwnd, GCLP_HICON);
|
||||||
if( !hDragCursor ) hDragCursor = (HCURSOR)SendMessageA( hwnd, WM_QUERYDRAGICON, 0, 0L);
|
if( !hDragCursor ) hDragCursor = (HCURSOR)SendMessageW( hwnd, WM_QUERYDRAGICON, 0, 0L);
|
||||||
if( !hDragCursor ) iconic = FALSE;
|
if( !hDragCursor ) iconic = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ extern "C" {
|
||||||
|
|
||||||
/****** USER Macro APIs ******************************************************/
|
/****** USER Macro APIs ******************************************************/
|
||||||
|
|
||||||
#define GetWindowInstance(hwnd) ((HMODULE)GetWindowLong(hwnd, GWL_HINSTANCE))
|
#define GetWindowInstance(hwnd) ((HMODULE)GetWindowLongPtr(hwnd, GWLP_HINSTANCE))
|
||||||
|
|
||||||
#define GetWindowStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_STYLE))
|
#define GetWindowStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_STYLE))
|
||||||
#define GetWindowExStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_EXSTYLE))
|
#define GetWindowExStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_EXSTYLE))
|
||||||
|
@ -136,7 +136,7 @@ extern "C" {
|
||||||
#define SetWindowRedraw(hwnd, fRedraw) \
|
#define SetWindowRedraw(hwnd, fRedraw) \
|
||||||
((void)SendMessage(hwnd, WM_SETREDRAW, (WPARAM)(BOOL)(fRedraw), 0L))
|
((void)SendMessage(hwnd, WM_SETREDRAW, (WPARAM)(BOOL)(fRedraw), 0L))
|
||||||
#define SubclassWindow(hwnd, lpfn) \
|
#define SubclassWindow(hwnd, lpfn) \
|
||||||
((WNDPROC)SetWindowLong((hwnd), GWL_WNDPROC, (LPARAM)(WNDPROC)(lpfn)))
|
((WNDPROC)SetWindowLongPtr((hwnd), GWLP_WNDPROC, (LPARAM)(WNDPROC)(lpfn)))
|
||||||
|
|
||||||
#define IsMinimized(hwnd) IsIconic(hwnd)
|
#define IsMinimized(hwnd) IsIconic(hwnd)
|
||||||
#define IsMaximized(hwnd) IsZoomed(hwnd)
|
#define IsMaximized(hwnd) IsZoomed(hwnd)
|
||||||
|
@ -166,7 +166,7 @@ extern "C" {
|
||||||
(msg) == WM_CHARTOITEM || \
|
(msg) == WM_CHARTOITEM || \
|
||||||
(msg) == WM_QUERYDRAGICON || \
|
(msg) == WM_QUERYDRAGICON || \
|
||||||
(msg) == WM_INITDIALOG \
|
(msg) == WM_INITDIALOG \
|
||||||
) ? (BOOL)(result) : (SetWindowLong((hwnd), DWL_MSGRESULT, (LPARAM)(LRESULT)(result)), TRUE))
|
) ? (BOOL)(result) : (SetWindowLongPtr((hwnd), DWLP_MSGRESULT, (LPARAM)(LRESULT)(result)), TRUE))
|
||||||
|
|
||||||
#define DefDlgProcEx(hwnd, msg, wParam, lParam, pfRecursion) \
|
#define DefDlgProcEx(hwnd, msg, wParam, lParam, pfRecursion) \
|
||||||
(*(pfRecursion) = TRUE, DefDlgProc(hwnd, msg, wParam, lParam))
|
(*(pfRecursion) = TRUE, DefDlgProc(hwnd, msg, wParam, lParam))
|
||||||
|
@ -175,7 +175,7 @@ extern "C" {
|
||||||
if (*(pfRecursion)) { *(pfRecursion) = FALSE; return FALSE; }
|
if (*(pfRecursion)) { *(pfRecursion) = FALSE; return FALSE; }
|
||||||
|
|
||||||
#define SubclassDialog(hwndDlg, lpfn) \
|
#define SubclassDialog(hwndDlg, lpfn) \
|
||||||
((DLGPROC)SetWindowLong(hwndDlg, DWL_DLGPROC, (LPARAM)(DLGPROC)(lpfn)))
|
((DLGPROC)SetWindowLongPtr(hwndDlg, DWLP_DLGPROC, (LPARAM)(DLGPROC)(lpfn)))
|
||||||
|
|
||||||
#define DeletePen(hpen) DeleteObject((HGDIOBJ)(HPEN)(hpen))
|
#define DeletePen(hpen) DeleteObject((HGDIOBJ)(HPEN)(hpen))
|
||||||
#define SelectPen(hdc, hpen) ((HPEN)SelectObject((hdc), (HGDIOBJ)(HPEN)(hpen)))
|
#define SelectPen(hdc, hpen) ((HPEN)SelectObject((hdc), (HGDIOBJ)(HPEN)(hpen)))
|
||||||
|
|
|
@ -1351,16 +1351,16 @@ typedef struct tagSTYLESTRUCT {
|
||||||
/* Offsets for GetWindowLong() and GetWindowWord() */
|
/* Offsets for GetWindowLong() and GetWindowWord() */
|
||||||
#define GWL_EXSTYLE (-20)
|
#define GWL_EXSTYLE (-20)
|
||||||
#define GWL_STYLE (-16)
|
#define GWL_STYLE (-16)
|
||||||
#ifndef __WINESRC__
|
#if !defined _WIN64 && !defined __WINESRC__
|
||||||
# define GWL_USERDATA (-21)
|
# define GWL_USERDATA (-21)
|
||||||
# define GWL_ID (-12)
|
# define GWL_ID (-12)
|
||||||
# define GWL_HWNDPARENT (-8)
|
# define GWL_HWNDPARENT (-8)
|
||||||
# define GWL_HINSTANCE (-6)
|
# define GWL_HINSTANCE (-6)
|
||||||
# define GWL_WNDPROC (-4)
|
# define GWL_WNDPROC (-4)
|
||||||
#endif /* __WINESRC__ */
|
|
||||||
# define DWL_MSGRESULT 0
|
# define DWL_MSGRESULT 0
|
||||||
# define DWL_DLGPROC 4
|
# define DWL_DLGPROC 4
|
||||||
# define DWL_USER 8
|
# define DWL_USER 8
|
||||||
|
#endif /* _WIN64 && __WINESRC__ */
|
||||||
|
|
||||||
/* Offsets for GetWindowLongPtr() and SetWindowLongPtr() */
|
/* Offsets for GetWindowLongPtr() and SetWindowLongPtr() */
|
||||||
#define GWLP_USERDATA (-21)
|
#define GWLP_USERDATA (-21)
|
||||||
|
@ -1555,17 +1555,20 @@ typedef struct
|
||||||
#define PRF_OWNED 0x00000020L
|
#define PRF_OWNED 0x00000020L
|
||||||
|
|
||||||
/* Offsets for GetClassLong() and GetClassWord() */
|
/* Offsets for GetClassLong() and GetClassWord() */
|
||||||
|
#if !defined _WIN64 && !defined __WINESRC__
|
||||||
# define GCL_MENUNAME (-8)
|
# define GCL_MENUNAME (-8)
|
||||||
# define GCL_HBRBACKGROUND (-10)
|
# define GCL_HBRBACKGROUND (-10)
|
||||||
# define GCL_HCURSOR (-12)
|
# define GCL_HCURSOR (-12)
|
||||||
# define GCL_HICON (-14)
|
# define GCL_HICON (-14)
|
||||||
# define GCL_HMODULE (-16)
|
# define GCL_HMODULE (-16)
|
||||||
|
# define GCL_WNDPROC (-24)
|
||||||
|
# define GCL_HICONSM (-34)
|
||||||
|
#endif /* _WIN64 && __WINESRC__ */
|
||||||
|
|
||||||
#define GCL_CBWNDEXTRA (-18)
|
#define GCL_CBWNDEXTRA (-18)
|
||||||
#define GCL_CBCLSEXTRA (-20)
|
#define GCL_CBCLSEXTRA (-20)
|
||||||
#define GCL_WNDPROC (-24)
|
|
||||||
#define GCL_STYLE (-26)
|
#define GCL_STYLE (-26)
|
||||||
#define GCW_ATOM (-32)
|
#define GCW_ATOM (-32)
|
||||||
#define GCL_HICONSM (-34)
|
|
||||||
|
|
||||||
#define GCLP_MENUNAME (-8)
|
#define GCLP_MENUNAME (-8)
|
||||||
#define GCLP_HBRBACKGROUND (-10)
|
#define GCLP_HBRBACKGROUND (-10)
|
||||||
|
@ -4181,12 +4184,12 @@ BOOL WINAPI GetClassInfoW(HINSTANCE,LPCWSTR,WNDCLASSW *);
|
||||||
BOOL WINAPI GetClassInfoExA(HINSTANCE,LPCSTR,WNDCLASSEXA *);
|
BOOL WINAPI GetClassInfoExA(HINSTANCE,LPCSTR,WNDCLASSEXA *);
|
||||||
BOOL WINAPI GetClassInfoExW(HINSTANCE,LPCWSTR,WNDCLASSEXW *);
|
BOOL WINAPI GetClassInfoExW(HINSTANCE,LPCWSTR,WNDCLASSEXW *);
|
||||||
#define GetClassInfoEx WINELIB_NAME_AW(GetClassInfoEx)
|
#define GetClassInfoEx WINELIB_NAME_AW(GetClassInfoEx)
|
||||||
LONG WINAPI GetClassLongA(HWND,INT);
|
DWORD WINAPI GetClassLongA(HWND,INT);
|
||||||
LONG WINAPI GetClassLongW(HWND,INT);
|
DWORD WINAPI GetClassLongW(HWND,INT);
|
||||||
#define GetClassLong WINELIB_NAME_AW(GetClassLong)
|
#define GetClassLong WINELIB_NAME_AW(GetClassLong)
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
LONG_PTR WINAPI GetClassLongPtrA(HWND,INT);
|
ULONG_PTR WINAPI GetClassLongPtrA(HWND,INT);
|
||||||
LONG_PTR WINAPI GetClassLongPtrW(HWND,INT);
|
ULONG_PTR WINAPI GetClassLongPtrW(HWND,INT);
|
||||||
#else
|
#else
|
||||||
#define GetClassLongPtrA GetClassLongA
|
#define GetClassLongPtrA GetClassLongA
|
||||||
#define GetClassLongPtrW GetClassLongW
|
#define GetClassLongPtrW GetClassLongW
|
||||||
|
@ -4470,9 +4473,17 @@ HWND WINAPI SetActiveWindow(HWND);
|
||||||
HWND WINAPI SetCapture(HWND);
|
HWND WINAPI SetCapture(HWND);
|
||||||
BOOL WINAPI SetCaretBlinkTime(UINT);
|
BOOL WINAPI SetCaretBlinkTime(UINT);
|
||||||
BOOL WINAPI SetCaretPos(INT,INT);
|
BOOL WINAPI SetCaretPos(INT,INT);
|
||||||
LONG WINAPI SetClassLongA(HWND,INT,LONG);
|
DWORD WINAPI SetClassLongA(HWND,INT,LONG);
|
||||||
LONG WINAPI SetClassLongW(HWND,INT,LONG);
|
DWORD WINAPI SetClassLongW(HWND,INT,LONG);
|
||||||
#define SetClassLong WINELIB_NAME_AW(SetClassLong)
|
#define SetClassLong WINELIB_NAME_AW(SetClassLong)
|
||||||
|
#ifdef _WIN64
|
||||||
|
ULONG_PTR WINAPI SetClassLongPtrA(HWND,INT,LONG_PTR);
|
||||||
|
ULONG_PTR WINAPI SetClassLongPtrW(HWND,INT,LONG_PTR);
|
||||||
|
#else
|
||||||
|
#define SetClassLongPtrA SetClassLongA
|
||||||
|
#define SetClassLongPtrW SetClassLongW
|
||||||
|
#endif
|
||||||
|
#define SetClassLongPtr WINELIB_NAME_AW(SetClassLongPtr)
|
||||||
WORD WINAPI SetClassWord(HWND,INT,WORD);
|
WORD WINAPI SetClassWord(HWND,INT,WORD);
|
||||||
HANDLE WINAPI SetClipboardData(UINT,HANDLE);
|
HANDLE WINAPI SetClipboardData(UINT,HANDLE);
|
||||||
HWND WINAPI SetClipboardViewer(HWND);
|
HWND WINAPI SetClipboardViewer(HWND);
|
||||||
|
|
|
@ -286,8 +286,8 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
|
||||||
|
|
||||||
if (!hIcon)
|
if (!hIcon)
|
||||||
{
|
{
|
||||||
hIcon = (HICON)GetClassLong(hWnd, bLargeIcon ? GCL_HICON : GCL_HICONSM);
|
hIcon = (HICON)GetClassLongPtr(hWnd, bLargeIcon ? GCLP_HICON : GCLP_HICONSM);
|
||||||
if (!hIcon) hIcon = (HICON)GetClassLong(hWnd, bLargeIcon ? GCL_HICONSM : GCL_HICON);
|
if (!hIcon) hIcon = (HICON)GetClassLongPtr(hWnd, bLargeIcon ? GCLP_HICONSM : GCLP_HICON);
|
||||||
if (!hIcon) SendMessageTimeout(hWnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (unsigned long*)&hIcon);
|
if (!hIcon) SendMessageTimeout(hWnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (unsigned long*)&hIcon);
|
||||||
if (!hIcon) SendMessageTimeout(hWnd, WM_GETICON, bLargeIcon ? ICON_SMALL /*0*/ : ICON_BIG /*1*/, 0, 0, 1000, (unsigned long*)&hIcon);
|
if (!hIcon) SendMessageTimeout(hWnd, WM_GETICON, bLargeIcon ? ICON_SMALL /*0*/ : ICON_BIG /*1*/, 0, 0, 1000, (unsigned long*)&hIcon);
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR
|
||||||
/*
|
/*
|
||||||
* Get the background brush
|
* Get the background brush
|
||||||
*/
|
*/
|
||||||
hbrBackground = (HBRUSH) GetClassLong(hWnd, GCL_HBRBACKGROUND);
|
hbrBackground = (HBRUSH) GetClassLongPtr(hWnd, GCLP_HBRBACKGROUND);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calculate the clip rect by getting the RECT
|
* Calculate the clip rect by getting the RECT
|
||||||
|
|
|
@ -372,7 +372,7 @@ AppDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
break;
|
break;
|
||||||
case PSN_APPLY:
|
case PSN_APPLY:
|
||||||
apply();
|
apply();
|
||||||
SetWindowLong(hDlg, DWL_MSGRESULT, PSNRET_NOERROR);
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -183,11 +183,11 @@ AudioDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
case WM_NOTIFY:
|
case WM_NOTIFY:
|
||||||
switch(((LPNMHDR)lParam)->code) {
|
switch(((LPNMHDR)lParam)->code) {
|
||||||
case PSN_KILLACTIVE:
|
case PSN_KILLACTIVE:
|
||||||
SetWindowLong(hDlg, DWL_MSGRESULT, FALSE);
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, FALSE);
|
||||||
break;
|
break;
|
||||||
case PSN_APPLY:
|
case PSN_APPLY:
|
||||||
apply();
|
apply();
|
||||||
SetWindowLong(hDlg, DWL_MSGRESULT, PSNRET_NOERROR);
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
|
||||||
break;
|
break;
|
||||||
case PSN_SETACTIVE:
|
case PSN_SETACTIVE:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -642,11 +642,11 @@ DriveDlgProc (HWND dialog, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
case PSN_KILLACTIVE:
|
case PSN_KILLACTIVE:
|
||||||
WINE_TRACE("PSN_KILLACTIVE\n");
|
WINE_TRACE("PSN_KILLACTIVE\n");
|
||||||
SetWindowLong(dialog, DWL_MSGRESULT, FALSE);
|
SetWindowLongPtr(dialog, DWLP_MSGRESULT, FALSE);
|
||||||
break;
|
break;
|
||||||
case PSN_APPLY:
|
case PSN_APPLY:
|
||||||
apply_drive_changes();
|
apply_drive_changes();
|
||||||
SetWindowLong(dialog, DWL_MSGRESULT, PSNRET_NOERROR);
|
SetWindowLongPtr(dialog, DWLP_MSGRESULT, PSNRET_NOERROR);
|
||||||
break;
|
break;
|
||||||
case PSN_SETACTIVE:
|
case PSN_SETACTIVE:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -245,12 +245,12 @@ GraphDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
case WM_NOTIFY:
|
case WM_NOTIFY:
|
||||||
switch (((LPNMHDR)lParam)->code) {
|
switch (((LPNMHDR)lParam)->code) {
|
||||||
case PSN_KILLACTIVE: {
|
case PSN_KILLACTIVE: {
|
||||||
SetWindowLong(hDlg, DWL_MSGRESULT, FALSE);
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, FALSE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PSN_APPLY: {
|
case PSN_APPLY: {
|
||||||
apply();
|
apply();
|
||||||
SetWindowLong(hDlg, DWL_MSGRESULT, PSNRET_NOERROR);
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PSN_SETACTIVE: {
|
case PSN_SETACTIVE: {
|
||||||
|
|
|
@ -127,7 +127,7 @@ static BOOL WINAPI WCUSER_OptionDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPAR
|
||||||
val = (IsDlgButtonChecked(hDlg, IDC_OPT_QUICK_EDIT) & BST_CHECKED) ? TRUE : FALSE;
|
val = (IsDlgButtonChecked(hDlg, IDC_OPT_QUICK_EDIT) & BST_CHECKED) ? TRUE : FALSE;
|
||||||
di->config.quick_edit = val;
|
di->config.quick_edit = val;
|
||||||
|
|
||||||
SetWindowLong(hDlg, DWL_MSGRESULT, PSNRET_NOERROR);
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -573,7 +573,7 @@ static BOOL WINAPI WCUSER_FontDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
|
||||||
GetWindowLong(GetDlgItem(hDlg, IDC_FNT_COLOR_FG), 0);
|
GetWindowLong(GetDlgItem(hDlg, IDC_FNT_COLOR_FG), 0);
|
||||||
di->config.def_attr = val;
|
di->config.def_attr = val;
|
||||||
|
|
||||||
SetWindowLong(hDlg, DWL_MSGRESULT, PSNRET_NOERROR);
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -643,14 +643,14 @@ static BOOL WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPAR
|
||||||
sb_h = GetDlgItemInt(hDlg, IDC_CNF_SB_HEIGHT, &st2, FALSE);
|
sb_h = GetDlgItemInt(hDlg, IDC_CNF_SB_HEIGHT, &st2, FALSE);
|
||||||
if (!st1 || ! st2)
|
if (!st1 || ! st2)
|
||||||
{
|
{
|
||||||
SetWindowLong(hDlg, DWL_MSGRESULT, PSNRET_INVALID);
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_INVALID);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
win_w = GetDlgItemInt(hDlg, IDC_CNF_WIN_WIDTH, &st1, FALSE);
|
win_w = GetDlgItemInt(hDlg, IDC_CNF_WIN_WIDTH, &st1, FALSE);
|
||||||
win_h = GetDlgItemInt(hDlg, IDC_CNF_WIN_HEIGHT, &st2, FALSE);
|
win_h = GetDlgItemInt(hDlg, IDC_CNF_WIN_HEIGHT, &st2, FALSE);
|
||||||
if (!st1 || !st2)
|
if (!st1 || !st2)
|
||||||
{
|
{
|
||||||
SetWindowLong(hDlg, DWL_MSGRESULT, PSNRET_INVALID);
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_INVALID);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (win_w > sb_w || win_h > sb_h)
|
if (win_w > sb_w || win_h > sb_h)
|
||||||
|
@ -664,7 +664,7 @@ static BOOL WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPAR
|
||||||
txt, sizeof(txt) / sizeof(WCHAR));
|
txt, sizeof(txt) / sizeof(WCHAR));
|
||||||
|
|
||||||
MessageBox(hDlg, txt, cap, MB_OK);
|
MessageBox(hDlg, txt, cap, MB_OK);
|
||||||
SetWindowLong(hDlg, DWL_MSGRESULT, PSNRET_INVALID);
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_INVALID);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
di->config.win_width = win_w;
|
di->config.win_width = win_w;
|
||||||
|
@ -675,7 +675,7 @@ static BOOL WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPAR
|
||||||
di->config.exit_on_die = IsDlgButtonChecked(hDlg, IDC_CNF_CLOSE_EXIT) ? 1 : 0;
|
di->config.exit_on_die = IsDlgButtonChecked(hDlg, IDC_CNF_CLOSE_EXIT) ? 1 : 0;
|
||||||
di->config.edition_mode = SendDlgItemMessage(hDlg, IDC_CNF_EDITION_MODE, CB_GETCURSEL,
|
di->config.edition_mode = SendDlgItemMessage(hDlg, IDC_CNF_EDITION_MODE, CB_GETCURSEL,
|
||||||
0, 0);
|
0, 0);
|
||||||
SetWindowLong(hDlg, DWL_MSGRESULT, PSNRET_NOERROR);
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
120
windows/class.c
120
windows/class.c
|
@ -127,7 +127,7 @@ static BOOL set_server_info( HWND hwnd, INT offset, LONG newval )
|
||||||
req->flags = SET_CLASS_WINEXTRA;
|
req->flags = SET_CLASS_WINEXTRA;
|
||||||
req->win_extra = newval;
|
req->win_extra = newval;
|
||||||
break;
|
break;
|
||||||
case GCL_HMODULE:
|
case GCLP_HMODULE:
|
||||||
req->flags = SET_CLASS_INSTANCE;
|
req->flags = SET_CLASS_INSTANCE;
|
||||||
req->instance = (void *)newval;
|
req->instance = (void *)newval;
|
||||||
break;
|
break;
|
||||||
|
@ -726,13 +726,13 @@ LONG WINAPI GetClassLong16( HWND16 hwnd16, INT16 offset )
|
||||||
|
|
||||||
switch( offset )
|
switch( offset )
|
||||||
{
|
{
|
||||||
case GCL_WNDPROC:
|
case GCLP_WNDPROC:
|
||||||
if (!(class = get_class_ptr( hwnd, FALSE ))) return 0;
|
if (!(class = get_class_ptr( hwnd, FALSE ))) return 0;
|
||||||
if (class == CLASS_OTHER_PROCESS) break;
|
if (class == CLASS_OTHER_PROCESS) break;
|
||||||
ret = (LONG)CLASS_GetProc( class, WIN_PROC_16 );
|
ret = (LONG)CLASS_GetProc( class, WIN_PROC_16 );
|
||||||
release_class_ptr( class );
|
release_class_ptr( class );
|
||||||
return ret;
|
return ret;
|
||||||
case GCL_MENUNAME:
|
case GCLP_MENUNAME:
|
||||||
if (!(class = get_class_ptr( hwnd, FALSE ))) return 0;
|
if (!(class = get_class_ptr( hwnd, FALSE ))) return 0;
|
||||||
if (class == CLASS_OTHER_PROCESS) break;
|
if (class == CLASS_OTHER_PROCESS) break;
|
||||||
ret = (LONG)CLASS_GetMenuName16( class );
|
ret = (LONG)CLASS_GetMenuName16( class );
|
||||||
|
@ -750,10 +750,10 @@ LONG WINAPI GetClassLong16( HWND16 hwnd16, INT16 offset )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetClassLongW (USER32.@)
|
* GetClassLongW (USER32.@)
|
||||||
*/
|
*/
|
||||||
LONG WINAPI GetClassLongW( HWND hwnd, INT offset )
|
DWORD WINAPI GetClassLongW( HWND hwnd, INT offset )
|
||||||
{
|
{
|
||||||
CLASS *class;
|
CLASS *class;
|
||||||
LONG retvalue = 0;
|
DWORD retvalue = 0;
|
||||||
|
|
||||||
TRACE("%p %d\n", hwnd, offset);
|
TRACE("%p %d\n", hwnd, offset);
|
||||||
|
|
||||||
|
@ -771,12 +771,12 @@ LONG WINAPI GetClassLongW( HWND hwnd, INT offset )
|
||||||
{
|
{
|
||||||
switch(offset)
|
switch(offset)
|
||||||
{
|
{
|
||||||
case GCL_HBRBACKGROUND:
|
case GCLP_HBRBACKGROUND:
|
||||||
case GCL_HCURSOR:
|
case GCLP_HCURSOR:
|
||||||
case GCL_HICON:
|
case GCLP_HICON:
|
||||||
case GCL_HICONSM:
|
case GCLP_HICONSM:
|
||||||
case GCL_WNDPROC:
|
case GCLP_WNDPROC:
|
||||||
case GCL_MENUNAME:
|
case GCLP_MENUNAME:
|
||||||
FIXME( "offset %d not supported on other process window %p\n", offset, hwnd );
|
FIXME( "offset %d not supported on other process window %p\n", offset, hwnd );
|
||||||
SetLastError( ERROR_INVALID_HANDLE );
|
SetLastError( ERROR_INVALID_HANDLE );
|
||||||
break;
|
break;
|
||||||
|
@ -789,8 +789,8 @@ LONG WINAPI GetClassLongW( HWND hwnd, INT offset )
|
||||||
case GCL_CBCLSEXTRA:
|
case GCL_CBCLSEXTRA:
|
||||||
retvalue = reply->old_extra;
|
retvalue = reply->old_extra;
|
||||||
break;
|
break;
|
||||||
case GCL_HMODULE:
|
case GCLP_HMODULE:
|
||||||
retvalue = (LONG)reply->old_instance;
|
retvalue = (DWORD)reply->old_instance;
|
||||||
break;
|
break;
|
||||||
case GCW_ATOM:
|
case GCW_ATOM:
|
||||||
retvalue = reply->old_atom;
|
retvalue = reply->old_atom;
|
||||||
|
@ -818,35 +818,35 @@ LONG WINAPI GetClassLongW( HWND hwnd, INT offset )
|
||||||
|
|
||||||
switch(offset)
|
switch(offset)
|
||||||
{
|
{
|
||||||
case GCL_HBRBACKGROUND:
|
case GCLP_HBRBACKGROUND:
|
||||||
retvalue = (LONG)class->hbrBackground;
|
retvalue = (DWORD)class->hbrBackground;
|
||||||
break;
|
break;
|
||||||
case GCL_HCURSOR:
|
case GCLP_HCURSOR:
|
||||||
retvalue = (LONG)class->hCursor;
|
retvalue = (DWORD)class->hCursor;
|
||||||
break;
|
break;
|
||||||
case GCL_HICON:
|
case GCLP_HICON:
|
||||||
retvalue = (LONG)class->hIcon;
|
retvalue = (DWORD)class->hIcon;
|
||||||
break;
|
break;
|
||||||
case GCL_HICONSM:
|
case GCLP_HICONSM:
|
||||||
retvalue = (LONG)class->hIconSm;
|
retvalue = (DWORD)class->hIconSm;
|
||||||
break;
|
break;
|
||||||
case GCL_STYLE:
|
case GCL_STYLE:
|
||||||
retvalue = (LONG)class->style;
|
retvalue = (DWORD)class->style;
|
||||||
break;
|
break;
|
||||||
case GCL_CBWNDEXTRA:
|
case GCL_CBWNDEXTRA:
|
||||||
retvalue = (LONG)class->cbWndExtra;
|
retvalue = (DWORD)class->cbWndExtra;
|
||||||
break;
|
break;
|
||||||
case GCL_CBCLSEXTRA:
|
case GCL_CBCLSEXTRA:
|
||||||
retvalue = (LONG)class->cbClsExtra;
|
retvalue = (DWORD)class->cbClsExtra;
|
||||||
break;
|
break;
|
||||||
case GCL_HMODULE:
|
case GCLP_HMODULE:
|
||||||
retvalue = (LONG)class->hInstance;
|
retvalue = (DWORD)class->hInstance;
|
||||||
break;
|
break;
|
||||||
case GCL_WNDPROC:
|
case GCLP_WNDPROC:
|
||||||
retvalue = (LONG)CLASS_GetProc( class, WIN_PROC_32W );
|
retvalue = (DWORD)CLASS_GetProc( class, WIN_PROC_32W );
|
||||||
break;
|
break;
|
||||||
case GCL_MENUNAME:
|
case GCLP_MENUNAME:
|
||||||
retvalue = (LONG)CLASS_GetMenuNameW( class );
|
retvalue = (DWORD)CLASS_GetMenuNameW( class );
|
||||||
break;
|
break;
|
||||||
case GCW_ATOM:
|
case GCW_ATOM:
|
||||||
retvalue = (DWORD)class->atomName;
|
retvalue = (DWORD)class->atomName;
|
||||||
|
@ -863,12 +863,12 @@ LONG WINAPI GetClassLongW( HWND hwnd, INT offset )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetClassLongA (USER32.@)
|
* GetClassLongA (USER32.@)
|
||||||
*/
|
*/
|
||||||
LONG WINAPI GetClassLongA( HWND hwnd, INT offset )
|
DWORD WINAPI GetClassLongA( HWND hwnd, INT offset )
|
||||||
{
|
{
|
||||||
CLASS *class;
|
CLASS *class;
|
||||||
LONG retvalue;
|
DWORD retvalue;
|
||||||
|
|
||||||
if (offset != GCL_WNDPROC && offset != GCL_MENUNAME)
|
if (offset != GCLP_WNDPROC && offset != GCLP_MENUNAME)
|
||||||
return GetClassLongW( hwnd, offset );
|
return GetClassLongW( hwnd, offset );
|
||||||
|
|
||||||
TRACE("%p %d\n", hwnd, offset);
|
TRACE("%p %d\n", hwnd, offset);
|
||||||
|
@ -882,10 +882,10 @@ LONG WINAPI GetClassLongA( HWND hwnd, INT offset )
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (offset == GCL_WNDPROC)
|
if (offset == GCLP_WNDPROC)
|
||||||
retvalue = (LONG)CLASS_GetProc( class, WIN_PROC_32A );
|
retvalue = (DWORD)CLASS_GetProc( class, WIN_PROC_32A );
|
||||||
else /* GCL_MENUNAME */
|
else /* GCL_MENUNAME */
|
||||||
retvalue = (LONG)CLASS_GetMenuNameA( class );
|
retvalue = (DWORD)CLASS_GetMenuNameA( class );
|
||||||
|
|
||||||
release_class_ptr( class );
|
release_class_ptr( class );
|
||||||
return retvalue;
|
return retvalue;
|
||||||
|
@ -939,12 +939,12 @@ LONG WINAPI SetClassLong16( HWND16 hwnd16, INT16 offset, LONG newval )
|
||||||
|
|
||||||
switch(offset)
|
switch(offset)
|
||||||
{
|
{
|
||||||
case GCL_WNDPROC:
|
case GCLP_WNDPROC:
|
||||||
if (!(class = get_class_ptr( hwnd, TRUE ))) return 0;
|
if (!(class = get_class_ptr( hwnd, TRUE ))) return 0;
|
||||||
retval = (LONG)CLASS_SetProc( class, (WNDPROC)newval, WIN_PROC_16 );
|
retval = (LONG)CLASS_SetProc( class, (WNDPROC)newval, WIN_PROC_16 );
|
||||||
release_class_ptr( class );
|
release_class_ptr( class );
|
||||||
return retval;
|
return retval;
|
||||||
case GCL_MENUNAME:
|
case GCLP_MENUNAME:
|
||||||
newval = (LONG)MapSL( newval );
|
newval = (LONG)MapSL( newval );
|
||||||
/* fall through */
|
/* fall through */
|
||||||
default:
|
default:
|
||||||
|
@ -956,10 +956,10 @@ LONG WINAPI SetClassLong16( HWND16 hwnd16, INT16 offset, LONG newval )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SetClassLongW (USER32.@)
|
* SetClassLongW (USER32.@)
|
||||||
*/
|
*/
|
||||||
LONG WINAPI SetClassLongW( HWND hwnd, INT offset, LONG newval )
|
DWORD WINAPI SetClassLongW( HWND hwnd, INT offset, LONG newval )
|
||||||
{
|
{
|
||||||
CLASS *class;
|
CLASS *class;
|
||||||
LONG retval = 0;
|
DWORD retval = 0;
|
||||||
|
|
||||||
TRACE("%p %d %lx\n", hwnd, offset, newval);
|
TRACE("%p %d %lx\n", hwnd, offset, newval);
|
||||||
|
|
||||||
|
@ -976,42 +976,42 @@ LONG WINAPI SetClassLongW( HWND hwnd, INT offset, LONG newval )
|
||||||
}
|
}
|
||||||
else switch(offset)
|
else switch(offset)
|
||||||
{
|
{
|
||||||
case GCL_MENUNAME:
|
case GCLP_MENUNAME:
|
||||||
CLASS_SetMenuNameW( class, (LPCWSTR)newval );
|
CLASS_SetMenuNameW( class, (LPCWSTR)newval );
|
||||||
retval = 0; /* Old value is now meaningless anyway */
|
retval = 0; /* Old value is now meaningless anyway */
|
||||||
break;
|
break;
|
||||||
case GCL_WNDPROC:
|
case GCLP_WNDPROC:
|
||||||
retval = (LONG)CLASS_SetProc( class, (WNDPROC)newval, WIN_PROC_32W );
|
retval = (DWORD)CLASS_SetProc( class, (WNDPROC)newval, WIN_PROC_32W );
|
||||||
break;
|
break;
|
||||||
case GCL_HBRBACKGROUND:
|
case GCLP_HBRBACKGROUND:
|
||||||
retval = (LONG)class->hbrBackground;
|
retval = (DWORD)class->hbrBackground;
|
||||||
class->hbrBackground = (HBRUSH)newval;
|
class->hbrBackground = (HBRUSH)newval;
|
||||||
break;
|
break;
|
||||||
case GCL_HCURSOR:
|
case GCLP_HCURSOR:
|
||||||
retval = (LONG)class->hCursor;
|
retval = (DWORD)class->hCursor;
|
||||||
class->hCursor = (HCURSOR)newval;
|
class->hCursor = (HCURSOR)newval;
|
||||||
break;
|
break;
|
||||||
case GCL_HICON:
|
case GCLP_HICON:
|
||||||
retval = (LONG)class->hIcon;
|
retval = (DWORD)class->hIcon;
|
||||||
class->hIcon = (HICON)newval;
|
class->hIcon = (HICON)newval;
|
||||||
break;
|
break;
|
||||||
case GCL_HICONSM:
|
case GCLP_HICONSM:
|
||||||
retval = (LONG)class->hIconSm;
|
retval = (DWORD)class->hIconSm;
|
||||||
class->hIconSm = (HICON)newval;
|
class->hIconSm = (HICON)newval;
|
||||||
break;
|
break;
|
||||||
case GCL_STYLE:
|
case GCL_STYLE:
|
||||||
if (!set_server_info( hwnd, offset, newval )) break;
|
if (!set_server_info( hwnd, offset, newval )) break;
|
||||||
retval = (LONG)class->style;
|
retval = (DWORD)class->style;
|
||||||
class->style = newval;
|
class->style = newval;
|
||||||
break;
|
break;
|
||||||
case GCL_CBWNDEXTRA:
|
case GCL_CBWNDEXTRA:
|
||||||
if (!set_server_info( hwnd, offset, newval )) break;
|
if (!set_server_info( hwnd, offset, newval )) break;
|
||||||
retval = (LONG)class->cbWndExtra;
|
retval = (DWORD)class->cbWndExtra;
|
||||||
class->cbWndExtra = newval;
|
class->cbWndExtra = newval;
|
||||||
break;
|
break;
|
||||||
case GCL_HMODULE:
|
case GCLP_HMODULE:
|
||||||
if (!set_server_info( hwnd, offset, newval )) break;
|
if (!set_server_info( hwnd, offset, newval )) break;
|
||||||
retval = (LONG)class->hInstance;
|
retval = (DWORD)class->hInstance;
|
||||||
class->hInstance = (HINSTANCE)newval;
|
class->hInstance = (HINSTANCE)newval;
|
||||||
break;
|
break;
|
||||||
case GCW_ATOM:
|
case GCW_ATOM:
|
||||||
|
@ -1034,20 +1034,20 @@ LONG WINAPI SetClassLongW( HWND hwnd, INT offset, LONG newval )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SetClassLongA (USER32.@)
|
* SetClassLongA (USER32.@)
|
||||||
*/
|
*/
|
||||||
LONG WINAPI SetClassLongA( HWND hwnd, INT offset, LONG newval )
|
DWORD WINAPI SetClassLongA( HWND hwnd, INT offset, LONG newval )
|
||||||
{
|
{
|
||||||
CLASS *class;
|
CLASS *class;
|
||||||
LONG retval;
|
DWORD retval;
|
||||||
|
|
||||||
if (offset != GCL_WNDPROC && offset != GCL_MENUNAME)
|
if (offset != GCLP_WNDPROC && offset != GCLP_MENUNAME)
|
||||||
return SetClassLongW( hwnd, offset, newval );
|
return SetClassLongW( hwnd, offset, newval );
|
||||||
|
|
||||||
TRACE("%p %d %lx\n", hwnd, offset, newval);
|
TRACE("%p %d %lx\n", hwnd, offset, newval);
|
||||||
|
|
||||||
if (!(class = get_class_ptr( hwnd, TRUE ))) return 0;
|
if (!(class = get_class_ptr( hwnd, TRUE ))) return 0;
|
||||||
|
|
||||||
if (offset == GCL_WNDPROC)
|
if (offset == GCLP_WNDPROC)
|
||||||
retval = (LONG)CLASS_SetProc( class, (WNDPROC)newval, WIN_PROC_32A );
|
retval = (DWORD)CLASS_SetProc( class, (WNDPROC)newval, WIN_PROC_32A );
|
||||||
else /* GCL_MENUNAME */
|
else /* GCL_MENUNAME */
|
||||||
{
|
{
|
||||||
CLASS_SetMenuNameA( class, (LPCSTR)newval );
|
CLASS_SetMenuNameA( class, (LPCSTR)newval );
|
||||||
|
|
|
@ -46,7 +46,7 @@ static WNDPROC DEFDLG_GetDlgProc( HWND hwnd )
|
||||||
ERR( "cannot get dlg proc %p from other process\n", hwnd );
|
ERR( "cannot get dlg proc %p from other process\n", hwnd );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
ret = *(WNDPROC *)((char *)wndPtr->wExtra + DWL_DLGPROC);
|
ret = *(WNDPROC *)((char *)wndPtr->wExtra + DWLP_DLGPROC);
|
||||||
WIN_ReleasePtr( wndPtr );
|
WIN_ReleasePtr( wndPtr );
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -127,9 +127,9 @@ static HWND DEFDLG_FindDefButton( HWND hwndDlg )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Recurse into WS_EX_CONTROLPARENT controls */
|
/* Recurse into WS_EX_CONTROLPARENT controls */
|
||||||
if (GetWindowLongA( hwndChild, GWL_EXSTYLE ) & WS_EX_CONTROLPARENT)
|
if (GetWindowLongW( hwndChild, GWL_EXSTYLE ) & WS_EX_CONTROLPARENT)
|
||||||
{
|
{
|
||||||
LONG dsStyle = GetWindowLongA( hwndChild, GWL_STYLE );
|
LONG dsStyle = GetWindowLongW( hwndChild, GWL_STYLE );
|
||||||
if ((dsStyle & WS_VISIBLE) && !(dsStyle & WS_DISABLED) &&
|
if ((dsStyle & WS_VISIBLE) && !(dsStyle & WS_DISABLED) &&
|
||||||
(hwndTmp = DEFDLG_FindDefButton(hwndChild)) != NULL)
|
(hwndTmp = DEFDLG_FindDefButton(hwndChild)) != NULL)
|
||||||
return hwndTmp;
|
return hwndTmp;
|
||||||
|
@ -237,7 +237,7 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
case WM_NCDESTROY:
|
case WM_NCDESTROY:
|
||||||
if ((dlgInfo = (DIALOGINFO *)SetWindowLongW( hwnd, DWL_WINE_DIALOGINFO, 0 )))
|
if ((dlgInfo = (DIALOGINFO *)SetWindowLongPtrW( hwnd, DWLP_WINE_DIALOGINFO, 0 )))
|
||||||
{
|
{
|
||||||
/* Free dialog heap (if created) */
|
/* Free dialog heap (if created) */
|
||||||
if (dlgInfo->hDialogHeap)
|
if (dlgInfo->hDialogHeap)
|
||||||
|
@ -333,7 +333,7 @@ static LRESULT DEFDLG_Epilog(HWND hwnd, UINT msg, BOOL fResult)
|
||||||
msg == WM_QUERYDRAGICON || msg == WM_INITDIALOG)
|
msg == WM_QUERYDRAGICON || msg == WM_INITDIALOG)
|
||||||
return fResult;
|
return fResult;
|
||||||
|
|
||||||
return GetWindowLongA( hwnd, DWL_MSGRESULT );
|
return GetWindowLongPtrW( hwnd, DWLP_MSGRESULT );
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -345,7 +345,7 @@ static LRESULT DEFDLG_Epilog(HWND hwnd, UINT msg, BOOL fResult)
|
||||||
DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create )
|
DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create )
|
||||||
{
|
{
|
||||||
WND* wndPtr;
|
WND* wndPtr;
|
||||||
DIALOGINFO* dlgInfo = (DIALOGINFO *)GetWindowLongW( hwnd, DWL_WINE_DIALOGINFO );
|
DIALOGINFO* dlgInfo = (DIALOGINFO *)GetWindowLongPtrW( hwnd, DWLP_WINE_DIALOGINFO );
|
||||||
|
|
||||||
if(!dlgInfo && create)
|
if(!dlgInfo && create)
|
||||||
{
|
{
|
||||||
|
@ -363,7 +363,7 @@ DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create )
|
||||||
{
|
{
|
||||||
wndPtr->flags |= WIN_ISDIALOG;
|
wndPtr->flags |= WIN_ISDIALOG;
|
||||||
WIN_ReleasePtr( wndPtr );
|
WIN_ReleasePtr( wndPtr );
|
||||||
SetWindowLongW( hwnd, DWL_WINE_DIALOGINFO, (LONG)dlgInfo );
|
SetWindowLongPtrW( hwnd, DWLP_WINE_DIALOGINFO, (ULONG_PTR)dlgInfo );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -388,7 +388,7 @@ LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
|
||||||
/* Perform DIALOGINFO intialization if not done */
|
/* Perform DIALOGINFO intialization if not done */
|
||||||
if(!(dlgInfo = DIALOG_get_info(hwnd32, TRUE))) return -1;
|
if(!(dlgInfo = DIALOG_get_info(hwnd32, TRUE))) return -1;
|
||||||
|
|
||||||
SetWindowLongW( hwnd32, DWL_MSGRESULT, 0 );
|
SetWindowLongPtrW( hwnd32, DWLP_MSGRESULT, 0 );
|
||||||
|
|
||||||
if ((dlgproc = (WNDPROC16)DEFDLG_GetDlgProc( hwnd32 )))
|
if ((dlgproc = (WNDPROC16)DEFDLG_GetDlgProc( hwnd32 )))
|
||||||
{
|
{
|
||||||
|
@ -445,7 +445,7 @@ LRESULT WINAPI DefDlgProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||||
/* Perform DIALOGINFO initialization if not done */
|
/* Perform DIALOGINFO initialization if not done */
|
||||||
if(!(dlgInfo = DIALOG_get_info( hwnd, TRUE ))) return -1;
|
if(!(dlgInfo = DIALOG_get_info( hwnd, TRUE ))) return -1;
|
||||||
|
|
||||||
SetWindowLongW( hwnd, DWL_MSGRESULT, 0 );
|
SetWindowLongPtrW( hwnd, DWLP_MSGRESULT, 0 );
|
||||||
|
|
||||||
if ((dlgproc = DEFDLG_GetDlgProc( hwnd )))
|
if ((dlgproc = DEFDLG_GetDlgProc( hwnd )))
|
||||||
{
|
{
|
||||||
|
@ -502,7 +502,7 @@ LRESULT WINAPI DefDlgProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||||
/* Perform DIALOGINFO intialization if not done */
|
/* Perform DIALOGINFO intialization if not done */
|
||||||
if(!(dlgInfo = DIALOG_get_info( hwnd, TRUE ))) return -1;
|
if(!(dlgInfo = DIALOG_get_info( hwnd, TRUE ))) return -1;
|
||||||
|
|
||||||
SetWindowLongW( hwnd, DWL_MSGRESULT, 0 );
|
SetWindowLongPtrW( hwnd, DWLP_MSGRESULT, 0 );
|
||||||
|
|
||||||
if ((dlgproc = DEFDLG_GetDlgProc( hwnd )))
|
if ((dlgproc = DEFDLG_GetDlgProc( hwnd )))
|
||||||
{
|
{
|
||||||
|
|
|
@ -413,7 +413,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
|
||||||
if( hdc )
|
if( hdc )
|
||||||
{
|
{
|
||||||
HICON hIcon;
|
HICON hIcon;
|
||||||
if (IsIconic(hwnd) && ((hIcon = (HICON)GetClassLongW( hwnd, GCL_HICON))) )
|
if (IsIconic(hwnd) && ((hIcon = (HICON)GetClassLongPtrW( hwnd, GCLP_HICON))) )
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT rc;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
@ -475,7 +475,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
|
||||||
{
|
{
|
||||||
RECT rect;
|
RECT rect;
|
||||||
HDC hdc = (HDC)wParam;
|
HDC hdc = (HDC)wParam;
|
||||||
HBRUSH hbr = (HBRUSH)GetClassLongW( hwnd, GCL_HBRBACKGROUND );
|
HBRUSH hbr = (HBRUSH)GetClassLongPtrW( hwnd, GCLP_HBRBACKGROUND );
|
||||||
if (!hbr) return 0;
|
if (!hbr) return 0;
|
||||||
|
|
||||||
if (GetClassLongW( hwnd, GCL_STYLE ) & CS_PARENTDC)
|
if (GetClassLongW( hwnd, GCL_STYLE ) & CS_PARENTDC)
|
||||||
|
@ -609,7 +609,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
|
||||||
{
|
{
|
||||||
UINT len;
|
UINT len;
|
||||||
|
|
||||||
HICON hIcon = (HICON)GetClassLongW( hwnd, GCL_HICON );
|
HICON hIcon = (HICON)GetClassLongPtrW( hwnd, GCLP_HICON );
|
||||||
HINSTANCE instance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
|
HINSTANCE instance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
|
||||||
if (hIcon) return (LRESULT)hIcon;
|
if (hIcon) return (LRESULT)hIcon;
|
||||||
for(len=1; len<64; len++)
|
for(len=1; len<64; len++)
|
||||||
|
@ -680,7 +680,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
|
||||||
break;
|
break;
|
||||||
case ICON_SMALL2:
|
case ICON_SMALL2:
|
||||||
ret = wndPtr->hIconSmall;
|
ret = wndPtr->hIconSmall;
|
||||||
if (!ret) ret = (HICON)GetClassLongA( hwnd, GCL_HICONSM );
|
if (!ret) ret = (HICON)GetClassLongPtrW( hwnd, GCLP_HICONSM );
|
||||||
/* FIXME: should have a default here if class icon is null */
|
/* FIXME: should have a default here if class icon is null */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -652,8 +652,8 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
|
||||||
|
|
||||||
if (template.helpId) SetWindowContextHelpId( hwnd, template.helpId );
|
if (template.helpId) SetWindowContextHelpId( hwnd, template.helpId );
|
||||||
|
|
||||||
if (unicode) SetWindowLongW( hwnd, DWL_DLGPROC, (LONG)dlgProc );
|
if (unicode) SetWindowLongPtrW( hwnd, DWLP_DLGPROC, (ULONG_PTR)dlgProc );
|
||||||
else SetWindowLongA( hwnd, DWL_DLGPROC, (LONG)dlgProc );
|
else SetWindowLongPtrA( hwnd, DWLP_DLGPROC, (ULONG_PTR)dlgProc );
|
||||||
|
|
||||||
if (dlgInfo->hUserFont)
|
if (dlgInfo->hUserFont)
|
||||||
SendMessageW( hwnd, WM_SETFONT, (WPARAM)dlgInfo->hUserFont, 0 );
|
SendMessageW( hwnd, WM_SETFONT, (WPARAM)dlgInfo->hUserFont, 0 );
|
||||||
|
|
|
@ -820,9 +820,9 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
|
||||||
SC_CLOSE, (LPSTR)(DWORD)HBMMENU_MBAR_CLOSE );
|
SC_CLOSE, (LPSTR)(DWORD)HBMMENU_MBAR_CLOSE );
|
||||||
|
|
||||||
/* The system menu is replaced by the child icon */
|
/* The system menu is replaced by the child icon */
|
||||||
hIcon = (HICON)GetClassLongW(hChild, GCL_HICONSM);
|
hIcon = (HICON)GetClassLongPtrW(hChild, GCLP_HICONSM);
|
||||||
if (!hIcon)
|
if (!hIcon)
|
||||||
hIcon = (HICON)GetClassLongW(hChild, GCL_HICON);
|
hIcon = (HICON)GetClassLongPtrW(hChild, GCLP_HICON);
|
||||||
if (!hIcon)
|
if (!hIcon)
|
||||||
hIcon = LoadImageW(0, MAKEINTRESOURCEW(IDI_WINLOGO), IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR);
|
hIcon = LoadImageW(0, MAKEINTRESOURCEW(IDI_WINLOGO), IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR);
|
||||||
if (hIcon)
|
if (hIcon)
|
||||||
|
|
|
@ -188,14 +188,14 @@ static HICON NC_IconForWindow( HWND hwnd )
|
||||||
if (!hIcon) hIcon = wndPtr->hIcon;
|
if (!hIcon) hIcon = wndPtr->hIcon;
|
||||||
WIN_ReleasePtr( wndPtr );
|
WIN_ReleasePtr( wndPtr );
|
||||||
}
|
}
|
||||||
if (!hIcon) hIcon = (HICON) GetClassLongA( hwnd, GCL_HICONSM );
|
if (!hIcon) hIcon = (HICON) GetClassLongPtrW( hwnd, GCLP_HICONSM );
|
||||||
if (!hIcon) hIcon = (HICON) GetClassLongA( hwnd, GCL_HICON );
|
if (!hIcon) hIcon = (HICON) GetClassLongPtrW( hwnd, GCLP_HICON );
|
||||||
|
|
||||||
/* If there is no hIcon specified and this is a modal dialog,
|
/* If there is no hIcon specified and this is a modal dialog,
|
||||||
* get the default one.
|
* get the default one.
|
||||||
*/
|
*/
|
||||||
if (!hIcon && (GetWindowLongA( hwnd, GWL_STYLE ) & DS_MODALFRAME))
|
if (!hIcon && (GetWindowLongW( hwnd, GWL_STYLE ) & DS_MODALFRAME))
|
||||||
hIcon = LoadImageA(0, (LPSTR)IDI_WINLOGO, IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR);
|
hIcon = LoadImageW(0, (LPCWSTR)IDI_WINLOGO, IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR);
|
||||||
return hIcon;
|
return hIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -375,9 +375,9 @@ LONG NC_HandleNCCalcSize( HWND hwnd, RECT *winRect )
|
||||||
{
|
{
|
||||||
RECT tmpRect = { 0, 0, 0, 0 };
|
RECT tmpRect = { 0, 0, 0, 0 };
|
||||||
LONG result = 0;
|
LONG result = 0;
|
||||||
LONG cls_style = GetClassLongA(hwnd, GCL_STYLE);
|
LONG cls_style = GetClassLongW(hwnd, GCL_STYLE);
|
||||||
LONG style = GetWindowLongA( hwnd, GWL_STYLE );
|
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
|
||||||
LONG exStyle = GetWindowLongA( hwnd, GWL_EXSTYLE );
|
LONG exStyle = GetWindowLongW( hwnd, GWL_EXSTYLE );
|
||||||
|
|
||||||
if (cls_style & CS_VREDRAW) result |= WVR_VREDRAW;
|
if (cls_style & CS_VREDRAW) result |= WVR_VREDRAW;
|
||||||
if (cls_style & CS_HREDRAW) result |= WVR_HREDRAW;
|
if (cls_style & CS_HREDRAW) result |= WVR_HREDRAW;
|
||||||
|
@ -679,7 +679,7 @@ static void NC_DrawCloseButton (HWND hwnd, HDC hdc, BOOL down, BOOL bGrayed)
|
||||||
NC_GetInsideRect( hwnd, &rect );
|
NC_GetInsideRect( hwnd, &rect );
|
||||||
|
|
||||||
/* A tool window has a smaller Close button */
|
/* A tool window has a smaller Close button */
|
||||||
if (GetWindowLongA( hwnd, GWL_EXSTYLE ) & WS_EX_TOOLWINDOW)
|
if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_TOOLWINDOW)
|
||||||
{
|
{
|
||||||
INT iBmpHeight = 11; /* Windows does not use SM_CXSMSIZE and SM_CYSMSIZE */
|
INT iBmpHeight = 11; /* Windows does not use SM_CXSMSIZE and SM_CYSMSIZE */
|
||||||
INT iBmpWidth = 11; /* it uses 11x11 for the close button in tool window */
|
INT iBmpWidth = 11; /* it uses 11x11 for the close button in tool window */
|
||||||
|
@ -721,7 +721,7 @@ static void NC_DrawMaxButton(HWND hwnd,HDC hdc,BOOL down, BOOL bGrayed)
|
||||||
flags = IsZoomed(hwnd) ? DFCS_CAPTIONRESTORE : DFCS_CAPTIONMAX;
|
flags = IsZoomed(hwnd) ? DFCS_CAPTIONRESTORE : DFCS_CAPTIONMAX;
|
||||||
|
|
||||||
NC_GetInsideRect( hwnd, &rect );
|
NC_GetInsideRect( hwnd, &rect );
|
||||||
if (GetWindowLongA( hwnd, GWL_STYLE) & WS_SYSMENU)
|
if (GetWindowLongW( hwnd, GWL_STYLE) & WS_SYSMENU)
|
||||||
rect.right -= GetSystemMetrics(SM_CXSIZE) + 1;
|
rect.right -= GetSystemMetrics(SM_CXSIZE) + 1;
|
||||||
rect.left = rect.right - GetSystemMetrics(SM_CXSIZE);
|
rect.left = rect.right - GetSystemMetrics(SM_CXSIZE);
|
||||||
rect.bottom = rect.top + GetSystemMetrics(SM_CYSIZE) - 1;
|
rect.bottom = rect.top + GetSystemMetrics(SM_CYSIZE) - 1;
|
||||||
|
@ -742,7 +742,7 @@ static void NC_DrawMinButton(HWND hwnd,HDC hdc,BOOL down, BOOL bGrayed)
|
||||||
{
|
{
|
||||||
RECT rect;
|
RECT rect;
|
||||||
UINT flags = DFCS_CAPTIONMIN;
|
UINT flags = DFCS_CAPTIONMIN;
|
||||||
DWORD style = GetWindowLongA( hwnd, GWL_STYLE );
|
DWORD style = GetWindowLongW( hwnd, GWL_STYLE );
|
||||||
|
|
||||||
/* never draw minimize box when window has WS_EX_TOOLWINDOW style */
|
/* never draw minimize box when window has WS_EX_TOOLWINDOW style */
|
||||||
if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_TOOLWINDOW)
|
if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_TOOLWINDOW)
|
||||||
|
@ -1136,7 +1136,7 @@ LONG NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
||||||
|
|
||||||
case HTCLIENT:
|
case HTCLIENT:
|
||||||
{
|
{
|
||||||
HCURSOR hCursor = (HCURSOR)GetClassLongA(hwnd, GCL_HCURSOR);
|
HCURSOR hCursor = (HCURSOR)GetClassLongPtrW(hwnd, GCLP_HCURSOR);
|
||||||
if(hCursor) {
|
if(hCursor) {
|
||||||
SetCursor(hCursor);
|
SetCursor(hCursor);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1202,7 +1202,7 @@ static void NC_TrackMinMaxBox( HWND hwnd, WORD wParam )
|
||||||
HDC hdc = GetWindowDC( hwnd );
|
HDC hdc = GetWindowDC( hwnd );
|
||||||
BOOL pressed = TRUE;
|
BOOL pressed = TRUE;
|
||||||
UINT state;
|
UINT state;
|
||||||
DWORD wndStyle = GetWindowLongA( hwnd, GWL_STYLE);
|
DWORD wndStyle = GetWindowLongW( hwnd, GWL_STYLE);
|
||||||
HMENU hSysMenu = GetSystemMenu(hwnd, FALSE);
|
HMENU hSysMenu = GetSystemMenu(hwnd, FALSE);
|
||||||
|
|
||||||
void (*paintButton)(HWND, HDC, BOOL, BOOL);
|
void (*paintButton)(HWND, HDC, BOOL, BOOL);
|
||||||
|
@ -1357,7 +1357,7 @@ static void NC_TrackScrollBar( HWND hwnd, WPARAM wParam, POINT pt )
|
||||||
*/
|
*/
|
||||||
LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
||||||
{
|
{
|
||||||
LONG style = GetWindowLongA( hwnd, GWL_STYLE );
|
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
|
||||||
|
|
||||||
switch(wParam) /* Hit test */
|
switch(wParam) /* Hit test */
|
||||||
{
|
{
|
||||||
|
@ -1451,7 +1451,7 @@ LONG NC_HandleNCLButtonDblClk( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
||||||
{
|
{
|
||||||
case HTCAPTION:
|
case HTCAPTION:
|
||||||
/* stop processing if WS_MAXIMIZEBOX is missing */
|
/* stop processing if WS_MAXIMIZEBOX is missing */
|
||||||
if (GetWindowLongA( hwnd, GWL_STYLE ) & WS_MAXIMIZEBOX)
|
if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_MAXIMIZEBOX)
|
||||||
SendMessageW( hwnd, WM_SYSCOMMAND,
|
SendMessageW( hwnd, WM_SYSCOMMAND,
|
||||||
IsZoomed(hwnd) ? SC_RESTORE : SC_MAXIMIZE, lParam );
|
IsZoomed(hwnd) ? SC_RESTORE : SC_MAXIMIZE, lParam );
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1184,7 +1184,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
|
||||||
if (cs->hMenu) MENU_SetMenu(hwnd, cs->hMenu);
|
if (cs->hMenu) MENU_SetMenu(hwnd, cs->hMenu);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LPCSTR menuName = (LPCSTR)GetClassLongA( hwnd, GCL_MENUNAME );
|
LPCSTR menuName = (LPCSTR)GetClassLongPtrA( hwnd, GCLP_MENUNAME );
|
||||||
if (menuName)
|
if (menuName)
|
||||||
{
|
{
|
||||||
if (HIWORD(cs->hInstance))
|
if (HIWORD(cs->hInstance))
|
||||||
|
@ -1981,7 +1981,7 @@ static LONG_PTR WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
|
||||||
ERR( "- replaced invalid offset %d with %d\n",
|
ERR( "- replaced invalid offset %d with %d\n",
|
||||||
offset, offset2 );
|
offset, offset2 );
|
||||||
|
|
||||||
retvalue = *(LONG *)(((char *)wndPtr->wExtra) + offset2);
|
retvalue = *(LONG_PTR *)(((char *)wndPtr->wExtra) + offset2);
|
||||||
WIN_ReleasePtr( wndPtr );
|
WIN_ReleasePtr( wndPtr );
|
||||||
return retvalue;
|
return retvalue;
|
||||||
}
|
}
|
||||||
|
@ -1990,10 +1990,10 @@ static LONG_PTR WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
|
||||||
SetLastError( ERROR_INVALID_INDEX );
|
SetLastError( ERROR_INVALID_INDEX );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
retvalue = *(LONG *)(((char *)wndPtr->wExtra) + offset);
|
retvalue = *(LONG_PTR *)(((char *)wndPtr->wExtra) + offset);
|
||||||
/* Special case for dialog window procedure */
|
/* Special case for dialog window procedure */
|
||||||
if ((offset == DWL_DLGPROC) && (wndPtr->flags & WIN_ISDIALOG))
|
if ((offset == DWLP_DLGPROC) && (wndPtr->flags & WIN_ISDIALOG))
|
||||||
retvalue = (LONG)WINPROC_GetProc( (WNDPROC)retvalue, type );
|
retvalue = (LONG_PTR)WINPROC_GetProc( (WNDPROC)retvalue, type );
|
||||||
WIN_ReleasePtr( wndPtr );
|
WIN_ReleasePtr( wndPtr );
|
||||||
return retvalue;
|
return retvalue;
|
||||||
}
|
}
|
||||||
|
@ -2029,7 +2029,7 @@ static LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, LONG_PTR newval,
|
||||||
{
|
{
|
||||||
STYLESTRUCT style;
|
STYLESTRUCT style;
|
||||||
BOOL ok;
|
BOOL ok;
|
||||||
LONG retval = 0;
|
LONG_PTR retval = 0;
|
||||||
WND *wndPtr;
|
WND *wndPtr;
|
||||||
|
|
||||||
TRACE( "%p %d %lx %x\n", hwnd, offset, newval, type );
|
TRACE( "%p %d %lx %x\n", hwnd, offset, newval, type );
|
||||||
|
@ -2092,7 +2092,7 @@ static LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, LONG_PTR newval,
|
||||||
case GWLP_USERDATA:
|
case GWLP_USERDATA:
|
||||||
break;
|
break;
|
||||||
case DWLP_DLGPROC:
|
case DWLP_DLGPROC:
|
||||||
if ((wndPtr->cbWndExtra + sizeof(LONG) >= DWLP_DLGPROC) && (wndPtr->flags & WIN_ISDIALOG))
|
if ((wndPtr->cbWndExtra + sizeof(LONG_PTR) >= DWLP_DLGPROC) && (wndPtr->flags & WIN_ISDIALOG))
|
||||||
{
|
{
|
||||||
WNDPROC *ptr = (WNDPROC *)((char *)wndPtr->wExtra + DWLP_DLGPROC);
|
WNDPROC *ptr = (WNDPROC *)((char *)wndPtr->wExtra + DWLP_DLGPROC);
|
||||||
retval = (ULONG_PTR)WINPROC_GetProc( *ptr, type );
|
retval = (ULONG_PTR)WINPROC_GetProc( *ptr, type );
|
||||||
|
@ -2102,7 +2102,7 @@ static LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, LONG_PTR newval,
|
||||||
}
|
}
|
||||||
/* fall through */
|
/* fall through */
|
||||||
default:
|
default:
|
||||||
if (offset < 0 || offset > (int)(wndPtr->cbWndExtra - sizeof(LONG)))
|
if (offset < 0 || offset > (int)(wndPtr->cbWndExtra - sizeof(LONG_PTR)))
|
||||||
{
|
{
|
||||||
WARN("Invalid offset %d\n", offset );
|
WARN("Invalid offset %d\n", offset );
|
||||||
WIN_ReleasePtr( wndPtr );
|
WIN_ReleasePtr( wndPtr );
|
||||||
|
@ -2722,7 +2722,7 @@ BOOL WIN_IsWindowDrawable( HWND hwnd, BOOL icon )
|
||||||
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
|
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
|
||||||
|
|
||||||
if (!(style & WS_VISIBLE)) return FALSE;
|
if (!(style & WS_VISIBLE)) return FALSE;
|
||||||
if ((style & WS_MINIMIZE) && icon && GetClassLongA( hwnd, GCL_HICON )) return FALSE;
|
if ((style & WS_MINIMIZE) && icon && GetClassLongPtrW( hwnd, GCLP_HICON )) return FALSE;
|
||||||
|
|
||||||
if (!(list = list_window_parents( hwnd ))) return TRUE;
|
if (!(list = list_window_parents( hwnd ))) return TRUE;
|
||||||
for (i = 0; list[i]; i++)
|
for (i = 0; list[i]; i++)
|
||||||
|
|
|
@ -2406,14 +2406,14 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
if (IsIconic( hwnd ) && GetClassLongW( hwnd, GCL_HICON ))
|
if (IsIconic( hwnd ) && GetClassLongPtrW( hwnd, GCLP_HICON ))
|
||||||
{
|
{
|
||||||
*pmsg16 = WM_PAINTICON;
|
*pmsg16 = WM_PAINTICON;
|
||||||
*pwparam16 = 1;
|
*pwparam16 = 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
case WM_ERASEBKGND:
|
case WM_ERASEBKGND:
|
||||||
if (IsIconic( hwnd ) && GetClassLongW( hwnd, GCL_HICON ))
|
if (IsIconic( hwnd ) && GetClassLongPtrW( hwnd, GCLP_HICON ))
|
||||||
*pmsg16 = WM_ICONERASEBKGND;
|
*pmsg16 = WM_ICONERASEBKGND;
|
||||||
return 0;
|
return 0;
|
||||||
case WM_PAINTCLIPBOARD:
|
case WM_PAINTCLIPBOARD:
|
||||||
|
|
Loading…
Reference in New Issue