Sync to Wine-20050310:

Marcelo Duarte <wine-devel@bol.com.br>
- Update the resources for Portuguese.
Dmitry Timoshkov <dmitry@codeweavers.com>
- 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.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Documentation spelling fixes.
Alex Villacis Lasso <a_villacis@palosanto.com>
- Change SUBLANG_DEFAULT to SUBLANG_NEUTRAL for LANG_SPANISH in all
  resources, so that Spanish locales other than Spain also use Spanish
  resources.
Troy Rollo <wine@troy.rollo.name>
- Fix stack object overrun when an application calls ChooseFontA.
Mike Hearn <mh@codeweavers.com>
- Respect the flags member of the CHOOSEFONT structure, and don't
  attempt to process bogus strings.

svn path=/trunk/; revision=14077
This commit is contained in:
Gé van Geldorp 2005-03-14 22:21:18 +00:00
parent 78237daf70
commit 86f13a4752
11 changed files with 94 additions and 82 deletions

View file

@ -131,8 +131,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved)
* COMDLG32_AllocMem (internal)
* Get memory for internal datastructure plus stringspace etc.
* RETURNS
* Pointer to a heap block: Succes
* NULL: Failure
* Success: Pointer to a heap block
* Failure: null
*/
LPVOID COMDLG32_AllocMem(
int size /* [in] Block size to allocate */

View file

@ -470,33 +470,6 @@ STRINGTABLE DISCARDABLE
IDS_OPEN_FILE "Open File"
}
/* Translators do not need to translate this text, unless the language uses a
* different character set or if the distribution of characters looks wrong.
* It is rendered illegibly small and is used to make a mock-up of a document.
*/
STRINGTABLE DISCARDABLE
{
IDS_FAKEDOCTEXT
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. \
Nulla a tortor. Etiam aliquet libero venenatis nunc. \n \
\n \
Sed augue ante, fermentum sit amet, imperdiet et, gravida eu, enim. \
Donec nibh quam, sodales in, commodo vel, facilisis id, neque. \n \
\n \
Nunc eleifend bibendum nibh. Phasellus in lorem. Ut vel odio quis \
libero adipiscing consequat. Donec consectetuer laoreet mauris. \n \
\n \
Maecenas tempor, ligula sed congue nonummy, arcu dolor ornare erat, \
egestas iaculis magna purus sed turpis. \n \
\n \
Morbi ultricies est non ipsum. Cum sociis natoque penatibus et magnis \
dis parturient montes, nascetur ridiculus mus. \n \
\n \
Duis sit amet nibh quis purus sollicitudin blandit. Curabitur justo. \
Phasellus varius, erat eu luctus pharetra, odio elit fringilla leo, \
non vulputate turpis elit id neque. Vestibulum sit amet tellus sed \
tortor fermentum consectetuer."
}
/****************************************************************/
/* English neutral resources

View file

@ -21,7 +21,7 @@
* WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
*/
LANGUAGE LANG_SPANISH, SUBLANG_DEFAULT
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU

View file

@ -458,3 +458,13 @@ STRINGTABLE DISCARDABLE /* Nomes de cores */
IDS_COLOR_AQUA "Azul-piscina"
IDS_COLOR_WHITE "Branco"
}
STRINGTABLE DISCARDABLE
{
IDS_FONT_SIZE "Selecione o tamanho da fonte entre %d e %d pontos."
IDS_SAVE_BUTTON "&Salvar"
IDS_SAVE_IN "Salvar &em:"
IDS_SAVE "Salvar"
IDS_SAVE_AS "Salvar como"
IDS_OPEN_FILE "Abrir Arquivo"
}

View file

@ -32,6 +32,35 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#include "wine/wine_common_ver.rc"
/* Translators do not need to translate this text, unless the language uses a
* different character set or if the distribution of characters looks wrong.
* It is rendered illegibly small and is used to make a mock-up of a document.
*/
STRINGTABLE DISCARDABLE
{
IDS_FAKEDOCTEXT
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. \
Nulla a tortor. Etiam aliquet libero venenatis nunc. \n \
\n \
Sed augue ante, fermentum sit amet, imperdiet et, gravida eu, enim. \
Donec nibh quam, sodales in, commodo vel, facilisis id, neque. \n \
\n \
Nunc eleifend bibendum nibh. Phasellus in lorem. Ut vel odio quis \
libero adipiscing consequat. Donec consectetuer laoreet mauris. \n \
\n \
Maecenas tempor, ligula sed congue nonummy, arcu dolor ornare erat, \
egestas iaculis magna purus sed turpis. \n \
\n \
Morbi ultricies est non ipsum. Cum sociis natoque penatibus et magnis \
dis parturient montes, nascetur ridiculus mus. \n \
\n \
Duis sit amet nibh quis purus sollicitudin blandit. Curabitur justo. \
Phasellus varius, erat eu luctus pharetra, odio elit fringilla leo, \
non vulputate turpis elit id neque. Vestibulum sit amet tellus sed \
tortor fermentum consectetuer."
}
/* BINRES pd32_collate.ico */
PD32_COLLATE ICON DISCARDABLE LOADONCALL pd32_collate.ico
/* {

View file

@ -461,7 +461,7 @@ void CC_PaintTriangle( HWND hDlg, int y)
int oben;
RECT rect;
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 */
{
@ -480,7 +480,7 @@ void CC_PaintTriangle( HWND hDlg, int y)
points[2].y = points[0].y - 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.right = points[1].x + 1;
lpp->old3angle.top = points[2].y - 1;
@ -499,7 +499,7 @@ void CC_PaintCross( HWND hDlg, int x, int y)
HDC hDC;
int w = GetDialogBaseUnits();
HWND hwnd = GetDlgItem(hDlg, 0x2c6);
LCCPRIV lpp = (LCCPRIV)GetWindowLongA( hDlg, DWL_USER );
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW( hDlg, DWLP_USER );
RECT rect;
POINT point, p;
HPEN hPen;
@ -544,11 +544,11 @@ static void CC_PrepareColorGraph( HWND hDlg )
{
int sdif, hdif, xdif, ydif, r, g, b, hue, sat;
HWND hwnd = GetDlgItem(hDlg, 0x2c6);
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
HBRUSH hbrush;
HDC hdc ;
RECT rect, client;
HCURSOR hcursor = SetCursor( LoadCursorA(0, (LPSTR)IDC_WAIT) );
HCURSOR hcursor = SetCursor( LoadCursorW(0, (LPCWSTR)IDC_WAIT) );
GetClientRect(hwnd, &client);
hdc = GetDC(hwnd);
@ -587,7 +587,7 @@ static void CC_PrepareColorGraph( HWND hDlg )
static void CC_PaintColorGraph( HWND hDlg )
{
HWND hwnd = GetDlgItem( hDlg, 0x2c6 );
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
HDC hDC;
RECT rect;
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 )
{
char buffer[10];
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
int r = GetRValue(cr);
int g = GetGValue(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 )
{
char buffer[10];
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
lpp->updating = TRUE;
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 )
{
int i;
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
EnableWindow( GetDlgItem(hDlg, 0x2cf), FALSE);
CC_PrepareColorGraph(hDlg);
@ -728,7 +728,7 @@ static void CC_PaintPredefColorArray( HWND hDlg, int rows, int cols)
HDC hdc;
HBRUSH hBrush;
int dx, dy, i, j, k;
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
GetClientRect(hwnd, &rect);
dx = rect.right / cols;
@ -737,7 +737,7 @@ static void CC_PaintPredefColorArray( HWND hDlg, int rows, int cols)
hdc = GetDC(hwnd);
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 ( i = 0; i < cols; i++ )
@ -770,7 +770,7 @@ void CC_PaintUserColorArray( HWND hDlg, int rows, int cols, COLORREF* lpcr )
HDC hdc;
HBRUSH hBrush;
int dx, dy, i, j, k;
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
GetClientRect(hwnd, &rect);
@ -781,7 +781,7 @@ void CC_PaintUserColorArray( HWND hDlg, int rows, int cols, COLORREF* lpcr )
hdc = GetDC(hwnd);
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 (i = 0; i < cols; i++)
@ -842,7 +842,7 @@ LONG CC_WMInitDialog( HWND hDlg, WPARAM wParam, LPARAM lParam )
return FALSE;
}
SetWindowLongA(hDlg, DWL_USER, (LONG)lpp);
SetWindowLongPtrW(hDlg, DWLP_USER, (LONG_PTR)lpp);
if (!(lpp->lpcc->Flags & CC_SHOWHELP))
ShowWindow( GetDlgItem(hDlg,0x40e), SW_HIDE);
@ -936,7 +936,7 @@ LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notifyCode,
UINT cokmsg;
HDC hdc;
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);
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 )
{
PAINTSTRUCT ps;
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
BeginPaint(hDlg, &ps);
/* 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 )
{
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
if (lpp->capturedGraph)
{
lpp->capturedGraph = 0;
@ -1095,7 +1095,7 @@ LRESULT CC_WMLButtonUp( HWND hDlg, WPARAM wParam, 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;
if (lpp->capturedGraph)
@ -1133,7 +1133,7 @@ LRESULT CC_WMMouseMove( HWND hDlg, 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;
i = 0;
@ -1192,7 +1192,7 @@ static INT_PTR CALLBACK ColorDlgProc( HWND hDlg, UINT message,
{
int res;
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
if (message != WM_INITDIALOG)
{
if (!lpp)
@ -1217,7 +1217,7 @@ static INT_PTR CALLBACK ColorDlgProc( HWND hDlg, UINT message,
DeleteDC(lpp->hdcMem);
DeleteObject(lpp->hbmMem);
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;
case WM_COMMAND:
if (CC_WMCommand( hDlg, wParam, lParam, HIWORD(wParam), (HWND) lParam))

View file

@ -102,7 +102,7 @@ LONG CC_WMInitDialog16( HWND hDlg, WPARAM wParam, LPARAM lParam )
ch32->lpfnHook = (LPCCHOOKPROC) ch16->lpfnHook; /* only used as flag */
ch32->Flags = ch16->Flags;
SetWindowLongA(hDlg, DWL_USER, (LONG)lpp);
SetWindowLongPtrW(hDlg, DWLP_USER, (LONG_PTR)lpp);
if (!(lpp->lpcc->Flags & CC_SHOWHELP))
ShowWindow( GetDlgItem(hDlg,0x40e), SW_HIDE);
@ -196,7 +196,7 @@ LRESULT CC_WMCommand16( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notifyCode
UINT cokmsg;
HDC hdc;
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);
switch (wParam)
{
@ -334,7 +334,7 @@ BOOL16 CALLBACK ColorDlgProc16( HWND16 hDlg16, UINT16 message,
BOOL16 res;
HWND hDlg = HWND_32(hDlg16);
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
if (message != WM_INITDIALOG)
{
if (!lpp)
@ -360,7 +360,7 @@ BOOL16 CALLBACK ColorDlgProc16( HWND16 hDlg16, UINT16 message,
DeleteObject(lpp->hbmMem);
HeapFree(GetProcessHeap(), 0, lpp->lpcc);
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;
case WM_COMMAND:
if (CC_WMCommand16(hDlg, wParam, lParam,

View file

@ -1528,7 +1528,7 @@ static LRESULT FILEDLG95_OnWMGetIShellBrowser(HWND hwnd)
TRACE("\n");
SetWindowLongA(hwnd,DWL_MSGRESULT,(LONG)fodInfos->Shell.FOIShellBrowser);
SetWindowLongPtrW(hwnd,DWLP_MSGRESULT,(LONG_PTR)fodInfos->Shell.FOIShellBrowser);
return TRUE;
}
@ -1551,7 +1551,7 @@ static BOOL FILEDLG95_SendFileOK( HWND hwnd, FileOpenDlgInfos *fodInfos )
TRACE("---\n");
/* First send CDN_FILEOK as MSDN doc says */
SendCustomDlgNotificationMessage(hwnd,CDN_FILEOK);
if (GetWindowLongW(fodInfos->DlgInfos.hwndCustomDlg, DWL_MSGRESULT))
if (GetWindowLongPtrW(fodInfos->DlgInfos.hwndCustomDlg, DWLP_MSGRESULT))
{
TRACE("canceled\n");
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 */
SendMessageW(fodInfos->DlgInfos.hwndCustomDlg,
fodInfos->HookMsg.fileokstring, 0, (LPARAM)fodInfos->ofnInfos);
if (GetWindowLongW(fodInfos->DlgInfos.hwndCustomDlg, DWL_MSGRESULT))
if (GetWindowLongPtrW(fodInfos->DlgInfos.hwndCustomDlg, DWLP_MSGRESULT))
{
TRACE("canceled\n");
return FALSE;

View file

@ -230,7 +230,7 @@ HWND16 WINAPI ReplaceText16( SEGPTR find )
static LRESULT FINDDLG_WMInitDialog(HWND hWnd, LPARAM lParam, LPDWORD lpFlags,
LPSTR lpstrFindWhat, BOOL fUnicode)
{
SetWindowLongA(hWnd, DWL_USER, lParam);
SetWindowLongPtrW(hWnd, DWLP_USER, lParam);
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);
/*
* 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;
*lpFlags &= ~(FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);
*lpFlags |= FR_FINDNEXT;
SendMessageA(hwndOwner, uFindReplaceMessage, 0,
GetWindowLongA(hWnd, DWL_USER) );
SendMessageW( hwndOwner, uFindReplaceMessage, 0,
GetWindowLongPtrW(hWnd, DWLP_USER) );
return TRUE;
case IDCANCEL:
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL);
*lpFlags |= FR_DIALOGTERM;
SendMessageA(hwndOwner, uFindReplaceMessage, 0,
GetWindowLongA(hWnd, DWL_USER) );
SendMessageW( hwndOwner, uFindReplaceMessage, 0,
GetWindowLongPtrW(hWnd, DWLP_USER) );
DestroyWindow(hWnd);
return TRUE;
case pshHelp:
@ -328,7 +328,7 @@ BOOL16 CALLBACK FindTextDlgProc16(HWND16 hWnd16, UINT16 wMsg, WPARAM16 wParam,
return FINDDLG_WMInitDialog(hWnd, lParam, &(lpfr->Flags),
MapSL(lpfr->lpstrFindWhat), FALSE);
case WM_COMMAND:
lpfr=MapSL(GetWindowLongA(hWnd, DWL_USER));
lpfr=MapSL(GetWindowLongPtrW(hWnd, DWLP_USER));
return FINDDLG_WMCommand(hWnd, wParam, HWND_32(lpfr->hwndOwner),
&lpfr->Flags, MapSL(lpfr->lpstrFindWhat),
lpfr->wFindWhatLen, FALSE);
@ -344,7 +344,7 @@ static LRESULT REPLACEDLG_WMInitDialog(HWND hWnd, LPARAM lParam,
LPDWORD lpFlags, LPSTR lpstrFindWhat,
LPSTR lpstrReplaceWith, BOOL fUnicode)
{
SetWindowLongA(hWnd, DWL_USER, lParam);
SetWindowLongPtrW(hWnd, DWLP_USER, lParam);
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);
/*
* 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;
*lpFlags &= ~(FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);
*lpFlags |= FR_FINDNEXT;
SendMessageA(hwndOwner, uFindReplaceMessage, 0,
GetWindowLongA(hWnd, DWL_USER) );
SendMessageW( hwndOwner, uFindReplaceMessage, 0,
GetWindowLongPtrW(hWnd, DWLP_USER) );
return TRUE;
case IDCANCEL:
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL);
*lpFlags |= FR_DIALOGTERM;
SendMessageA(hwndOwner, uFindReplaceMessage, 0,
GetWindowLongA(hWnd, DWL_USER) );
SendMessageW( hwndOwner, uFindReplaceMessage, 0,
GetWindowLongPtrW(hWnd, DWLP_USER) );
DestroyWindow(hWnd);
return TRUE;
case psh1:
@ -438,8 +438,8 @@ static LRESULT REPLACEDLG_WMCommand(HWND hWnd, WPARAM16 wParam,
else *lpFlags &= ~FR_MATCHCASE;
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACEALL | FR_DIALOGTERM);
*lpFlags |= FR_REPLACE;
SendMessageA(hwndOwner, uFindReplaceMessage, 0,
GetWindowLongA(hWnd, DWL_USER) );
SendMessageW( hwndOwner, uFindReplaceMessage, 0,
GetWindowLongPtrW(hWnd, DWLP_USER) );
return TRUE;
case psh2:
if (fUnicode)
@ -459,8 +459,8 @@ static LRESULT REPLACEDLG_WMCommand(HWND hWnd, WPARAM16 wParam,
else *lpFlags &= ~FR_MATCHCASE;
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_DIALOGTERM);
*lpFlags |= FR_REPLACEALL;
SendMessageA(hwndOwner, uFindReplaceMessage, 0,
GetWindowLongA(hWnd, DWL_USER) );
SendMessageW( hwndOwner, uFindReplaceMessage, 0,
GetWindowLongPtrW(hWnd, DWLP_USER) );
return TRUE;
case pshHelp:
/* 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->lpstrReplaceWith), FALSE);
case WM_COMMAND:
lpfr=MapSL(GetWindowLongA(hWnd, DWL_USER));
lpfr=MapSL(GetWindowLongPtrW(hWnd, DWLP_USER));
return REPLACEDLG_WMCommand(hWnd, wParam, HWND_32(lpfr->hwndOwner),
&lpfr->Flags, MapSL(lpfr->lpstrFindWhat),
lpfr->wFindWhatLen, MapSL(lpfr->lpstrReplaceWith),

View file

@ -590,7 +590,7 @@ LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
HCURSOR hcursor=SetCursor(LoadCursorW(0,(LPWSTR)IDC_WAIT));
static const WCHAR strColorName[] = {'[','c','o','l','o','r',' ','n','a','m','e',']',0};
SetPropW(hDlg, strWineFontData, (HANDLE)lParam);
SetPropW(hDlg, strWineFontData, (HANDLE)lpcf);
lpxx=lpcf->lpLogFont;
TRACE("WM_INITDIALOG lParam=%08lX\n", lParam);
@ -697,7 +697,7 @@ LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
SendMessageW(hDlg, WM_COMMAND, MAKEWPARAM(cmb1, CBN_SELCHANGE),
(LPARAM)GetDlgItem(hDlg,cmb1));
}
if (lpcf->Flags & CF_USESTYLE && lpcf->lpszStyle)
if ((lpcf->Flags & CF_USESTYLE) && lpcf->lpszStyle)
{
j=SendDlgItemMessageW(hDlg,cmb2,CB_FINDSTRING,-1,(LONG)lpcf->lpszStyle);
if (j!=CB_ERR)
@ -1041,7 +1041,7 @@ LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam, LPCHOOSEFONTW lpc
WideCharToMultiByte(CP_ACP, 0, lpcfw->lpLogFont->lfFaceName,
LF_FACESIZE, lpcfa->lpLogFont->lfFaceName, LF_FACESIZE, 0, 0);
if(lpcfw->lpszStyle) {
if((lpcfw->Flags & CF_USESTYLE) && lpcfw->lpszStyle) {
len = WideCharToMultiByte(CP_ACP, 0, lpcfw->lpszStyle, -1, NULL, -1, 0, 0);
WideCharToMultiByte(CP_ACP, 0, lpcfw->lpszStyle, -1, lpcfa->lpszStyle, len, 0, 0);
HeapFree(GetProcessHeap(), 0, lpcfw->lpszStyle);
@ -1135,13 +1135,13 @@ INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam,
MultiByteToWideChar(CP_ACP, 0, lpcfa->lpLogFont->lfFaceName,
LF_FACESIZE, lpcfw->lpLogFont->lfFaceName, LF_FACESIZE);
if(lpcfa->lpszStyle) {
if((lpcfa->Flags & CF_USESTYLE) && lpcfa->lpszStyle) {
len = MultiByteToWideChar(CP_ACP, 0, lpcfa->lpszStyle, -1, NULL, 0);
lpcfw->lpszStyle = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, lpcfa->lpszStyle, -1, lpcfw->lpszStyle, len);
}
if(lpcfa->lpTemplateName) {
if((lpcfa->Flags & CF_ENABLETEMPLATE) && lpcfa->lpTemplateName) {
len = MultiByteToWideChar(CP_ACP, 0, lpcfa->lpTemplateName, -1, NULL, 0);
lpcfw->lpTemplateName = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, lpcfa->lpTemplateName,

View file

@ -122,7 +122,7 @@ INT16 WINAPI FontFamilyEnumProc16( SEGPTR logfont, SEGPTR metrics,
{
HWND hwnd=HWND_32(LOWORD(lParam));
HWND hDlg=GetParent(hwnd);
LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);
LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongPtrW(hDlg, DWLP_USER);
LOGFONT16 *lplf = MapSL( logfont );
TEXTMETRIC16 *lpmtrx16 = MapSL(metrics);
ENUMLOGFONTEXW elf32w;
@ -142,7 +142,7 @@ INT16 WINAPI FontStyleEnumProc16( SEGPTR logfont, SEGPTR metrics,
HWND hcmb2=HWND_32(LOWORD(lParam));
HWND hcmb3=HWND_32(HIWORD(lParam));
HWND hDlg=GetParent(hcmb3);
LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);
LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongPtrW(hDlg, DWLP_USER);
LOGFONT16 *lplf = MapSL(logfont);
TEXTMETRIC16 *lpmtrx16 = MapSL(metrics);
ENUMLOGFONTEXW elf32w;
@ -300,7 +300,7 @@ BOOL16 CALLBACK FormatCharDlgProc16(HWND16 hDlg16, UINT16 message,
BOOL16 res=0;
if (message!=WM_INITDIALOG)
{
lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);
lpcf=(LPCHOOSEFONT16)GetWindowLongPtrW(hDlg, DWLP_USER);
if (!lpcf && message != WM_MEASUREITEM)
return FALSE;
if (CFn_HookCallChk(lpcf))