Sync to Wine-20050310:
authorGé van Geldorp <ge@gse.nl>
Mon, 14 Mar 2005 22:21:18 +0000 (22:21 +0000)
committerGé van Geldorp <ge@gse.nl>
Mon, 14 Mar 2005 22:21:18 +0000 (22:21 +0000)
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

reactos/lib/comdlg32/cdlg32.c
reactos/lib/comdlg32/cdlg_En.rc
reactos/lib/comdlg32/cdlg_Es.rc
reactos/lib/comdlg32/cdlg_Pt.rc
reactos/lib/comdlg32/cdlg_xx.rc
reactos/lib/comdlg32/colordlg.c
reactos/lib/comdlg32/colordlg16.c
reactos/lib/comdlg32/filedlg.c
reactos/lib/comdlg32/finddlg.c
reactos/lib/comdlg32/fontdlg.c
reactos/lib/comdlg32/fontdlg16.c

index eaf0eb5..1790aef 100644 (file)
@@ -131,8 +131,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved)
  *     COMDLG32_AllocMem                       (internal)\r
  * Get memory for internal datastructure plus stringspace etc.\r
  *     RETURNS\r
- *             Pointer to a heap block: Succes\r
- *             NULL: Failure\r
+ *             Success: Pointer to a heap block\r
+ *             Failure: null\r
  */\r
 LPVOID COMDLG32_AllocMem(\r
        int size        /* [in] Block size to allocate */\r
index a18ad98..4f8820c 100644 (file)
@@ -470,33 +470,6 @@ STRINGTABLE DISCARDABLE
     IDS_OPEN_FILE   "Open File"\r
 }\r
 \r
-/* Translators do not need to translate this text, unless the language uses a\r
- * different character set or if the distribution of characters looks wrong.\r
- * It is rendered illegibly small and is used to make a mock-up of a document.\r
- */\r
-STRINGTABLE DISCARDABLE\r
-{\r
-    IDS_FAKEDOCTEXT\r
-        "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. \\r
-        Nulla a tortor. Etiam aliquet libero venenatis nunc. \n \\r
-        \n \\r
-        Sed augue ante, fermentum sit amet, imperdiet et, gravida eu, enim. \\r
-        Donec nibh quam, sodales in, commodo vel, facilisis id, neque. \n \\r
-        \n \\r
-        Nunc eleifend bibendum nibh. Phasellus in lorem. Ut vel odio quis \\r
-        libero adipiscing consequat. Donec consectetuer laoreet mauris. \n \\r
-        \n \\r
-        Maecenas tempor, ligula sed congue nonummy, arcu dolor ornare erat, \\r
-        egestas iaculis magna purus sed turpis. \n \\r
-        \n \\r
-        Morbi ultricies est non ipsum. Cum sociis natoque penatibus et magnis \\r
-        dis parturient montes, nascetur ridiculus mus. \n \\r
-        \n \\r
-        Duis sit amet nibh quis purus sollicitudin blandit. Curabitur justo. \\r
-        Phasellus varius, erat eu luctus pharetra, odio elit fringilla leo, \\r
-        non vulputate turpis elit id neque. Vestibulum sit amet tellus sed \\r
-        tortor fermentum consectetuer."\r
-}\r
 \r
 /****************************************************************/\r
 /* English neutral resources\r
index fe46629..1489a02 100644 (file)
@@ -21,7 +21,7 @@
  * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.\r
  */\r
 \r
-LANGUAGE LANG_SPANISH, SUBLANG_DEFAULT\r
+LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL\r
 \r
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134\r
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
index af0258b..446be3f 100644 (file)
@@ -458,3 +458,13 @@ STRINGTABLE DISCARDABLE /* Nomes de cores */
     IDS_COLOR_AQUA      "Azul-piscina"\r
     IDS_COLOR_WHITE     "Branco"\r
 }\r
+\r
+STRINGTABLE DISCARDABLE\r
+{\r
+    IDS_FONT_SIZE   "Selecione o tamanho da fonte entre %d e %d pontos."\r
+    IDS_SAVE_BUTTON "&Salvar"\r
+    IDS_SAVE_IN     "Salvar &em:"\r
+    IDS_SAVE        "Salvar"\r
+    IDS_SAVE_AS     "Salvar como"\r
+    IDS_OPEN_FILE   "Abrir Arquivo"\r
+}\r
index a4a23a7..f03e4db 100644 (file)
@@ -32,6 +32,35 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
 \r
 #include "wine/wine_common_ver.rc"\r
 \r
+/* Translators do not need to translate this text, unless the language uses a\r
+ * different character set or if the distribution of characters looks wrong.\r
+ * It is rendered illegibly small and is used to make a mock-up of a document.\r
+ */\r
+STRINGTABLE DISCARDABLE\r
+{\r
+    IDS_FAKEDOCTEXT\r
+        "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. \\r
+        Nulla a tortor. Etiam aliquet libero venenatis nunc. \n \\r
+        \n \\r
+        Sed augue ante, fermentum sit amet, imperdiet et, gravida eu, enim. \\r
+        Donec nibh quam, sodales in, commodo vel, facilisis id, neque. \n \\r
+        \n \\r
+        Nunc eleifend bibendum nibh. Phasellus in lorem. Ut vel odio quis \\r
+        libero adipiscing consequat. Donec consectetuer laoreet mauris. \n \\r
+        \n \\r
+        Maecenas tempor, ligula sed congue nonummy, arcu dolor ornare erat, \\r
+        egestas iaculis magna purus sed turpis. \n \\r
+        \n \\r
+        Morbi ultricies est non ipsum. Cum sociis natoque penatibus et magnis \\r
+        dis parturient montes, nascetur ridiculus mus. \n \\r
+        \n \\r
+        Duis sit amet nibh quis purus sollicitudin blandit. Curabitur justo. \\r
+        Phasellus varius, erat eu luctus pharetra, odio elit fringilla leo, \\r
+        non vulputate turpis elit id neque. Vestibulum sit amet tellus sed \\r
+        tortor fermentum consectetuer."\r
+}\r
+\r
+\r
 /* BINRES pd32_collate.ico */\r
 PD32_COLLATE ICON DISCARDABLE LOADONCALL pd32_collate.ico\r
 /* {\r
index 9898f0d..a9ff14f 100644 (file)
@@ -461,7 +461,7 @@ void CC_PaintTriangle( HWND hDlg, int y)
  int oben;\r
  RECT rect;\r
  HWND hwnd = GetDlgItem(hDlg, 0x2be);\r
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA( hDlg, DWL_USER);\r
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW( hDlg, DWLP_USER);\r
 \r
  if (IsWindowVisible( GetDlgItem(hDlg, 0x2c6)))   /* if full size */\r
  {\r
@@ -480,7 +480,7 @@ void CC_PaintTriangle( HWND hDlg, int y)
    points[2].y = points[0].y - w;\r
    points[2].x = points[1].x = points[0].x + w;\r
 \r
-   FillRect(hDC, &lpp->old3angle, (HBRUSH)GetClassLongA( hwnd, GCL_HBRBACKGROUND));\r
+   FillRect(hDC, &lpp->old3angle, (HBRUSH)GetClassLongPtrW( hwnd, GCLP_HBRBACKGROUND));\r
    lpp->old3angle.left  = points[0].x;\r
    lpp->old3angle.right = points[1].x + 1;\r
    lpp->old3angle.top   = points[2].y - 1;\r
@@ -499,7 +499,7 @@ void CC_PaintCross( HWND hDlg, int x, int y)
  HDC hDC;\r
  int w = GetDialogBaseUnits();\r
  HWND hwnd = GetDlgItem(hDlg, 0x2c6);\r
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA( hDlg, DWL_USER );\r
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW( hDlg, DWLP_USER );\r
  RECT rect;\r
  POINT point, p;\r
  HPEN hPen;\r
@@ -544,11 +544,11 @@ static void CC_PrepareColorGraph( HWND hDlg )
 {\r
  int sdif, hdif, xdif, ydif, r, g, b, hue, sat;\r
  HWND hwnd = GetDlgItem(hDlg, 0x2c6);\r
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);\r
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);\r
  HBRUSH hbrush;\r
  HDC hdc ;\r
  RECT rect, client;\r
- HCURSOR hcursor = SetCursor( LoadCursorA(0, (LPSTR)IDC_WAIT) );\r
+ HCURSOR hcursor = SetCursor( LoadCursorW(0, (LPCWSTR)IDC_WAIT) );\r
 \r
  GetClientRect(hwnd, &client);\r
  hdc = GetDC(hwnd);\r
@@ -587,7 +587,7 @@ static void CC_PrepareColorGraph( HWND hDlg )
 static void CC_PaintColorGraph( HWND hDlg )\r
 {\r
  HWND hwnd = GetDlgItem( hDlg, 0x2c6 );\r
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);\r
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);\r
  HDC  hDC;\r
  RECT rect;\r
  if (IsWindowVisible(hwnd))   /* if full size */\r
@@ -647,7 +647,7 @@ static void CC_PaintLumBar( HWND hDlg, int hue, int sat )
 void CC_EditSetRGB( HWND hDlg, COLORREF cr )\r
 {\r
  char buffer[10];\r
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);\r
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);\r
  int r = GetRValue(cr);\r
  int g = GetGValue(cr);\r
  int b = GetBValue(cr);\r
@@ -670,7 +670,7 @@ void CC_EditSetRGB( HWND hDlg, COLORREF cr )
 void CC_EditSetHSL( HWND hDlg, int h, int s, int l )\r
 {\r
  char buffer[10];\r
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);\r
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);\r
  lpp->updating = TRUE;\r
  if (IsWindowVisible( GetDlgItem(hDlg, 0x2c6) ))   /* if full size */\r
  {\r
@@ -692,7 +692,7 @@ void CC_EditSetHSL( HWND hDlg, int h, int s, int l )
 void CC_SwitchToFullSize( HWND hDlg, COLORREF result, LPRECT lprect )\r
 {\r
  int i;\r
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);\r
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);\r
 \r
  EnableWindow( GetDlgItem(hDlg, 0x2cf), FALSE);\r
  CC_PrepareColorGraph(hDlg);\r
@@ -728,7 +728,7 @@ static void CC_PaintPredefColorArray( HWND hDlg, int rows, int cols)
  HDC  hdc;\r
  HBRUSH hBrush;\r
  int dx, dy, i, j, k;\r
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);\r
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);\r
 \r
  GetClientRect(hwnd, &rect);\r
  dx = rect.right / cols;\r
@@ -737,7 +737,7 @@ static void CC_PaintPredefColorArray( HWND hDlg, int rows, int cols)
 \r
  hdc = GetDC(hwnd);\r
  GetClientRect(hwnd, &rect);\r
- FillRect(hdc, &rect, (HBRUSH)GetClassLongA(hwnd, GCL_HBRBACKGROUND));\r
+ FillRect(hdc, &rect, (HBRUSH)GetClassLongPtrW(hwnd, GCLP_HBRBACKGROUND));\r
  for ( j = 0; j < rows; j++ )\r
  {\r
   for ( i = 0; i < cols; i++ )\r
@@ -770,7 +770,7 @@ void CC_PaintUserColorArray( HWND hDlg, int rows, int cols, COLORREF* lpcr )
  HDC  hdc;\r
  HBRUSH hBrush;\r
  int dx, dy, i, j, k;\r
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);\r
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);\r
 \r
  GetClientRect(hwnd, &rect);\r
 \r
@@ -781,7 +781,7 @@ void CC_PaintUserColorArray( HWND hDlg, int rows, int cols, COLORREF* lpcr )
  hdc = GetDC(hwnd);\r
  if (hdc)\r
  {\r
-  FillRect(hdc, &rect, (HBRUSH)GetClassLongA(hwnd, GCL_HBRBACKGROUND) );\r
+  FillRect(hdc, &rect, (HBRUSH)GetClassLongPtrW(hwnd, GCLP_HBRBACKGROUND) );\r
   for (j = 0; j < rows; j++)\r
   {\r
    for (i = 0; i < cols; i++)\r
@@ -842,7 +842,7 @@ LONG CC_WMInitDialog( HWND hDlg, WPARAM wParam, LPARAM lParam )
        return FALSE;\r
    }\r
 \r
-   SetWindowLongA(hDlg, DWL_USER, (LONG)lpp);\r
+   SetWindowLongPtrW(hDlg, DWLP_USER, (LONG_PTR)lpp);\r
 \r
    if (!(lpp->lpcc->Flags & CC_SHOWHELP))\r
       ShowWindow( GetDlgItem(hDlg,0x40e), SW_HIDE);\r
@@ -936,7 +936,7 @@ LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notifyCode,
     UINT cokmsg;\r
     HDC hdc;\r
     COLORREF *cr;\r
-    LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);\r
+    LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);\r
     TRACE("CC_WMCommand wParam=%x lParam=%lx\n", wParam, lParam);\r
     switch (wParam)\r
     {\r
@@ -1058,7 +1058,7 @@ LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notifyCode,
 LRESULT CC_WMPaint( HWND hDlg, WPARAM wParam, LPARAM lParam )\r
 {\r
     PAINTSTRUCT ps;\r
-    LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);\r
+    LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);\r
 \r
     BeginPaint(hDlg, &ps);\r
     /* we have to paint dialog children except text and buttons */\r
@@ -1079,7 +1079,7 @@ LRESULT CC_WMPaint( HWND hDlg, WPARAM wParam, LPARAM lParam )
  */\r
 LRESULT CC_WMLButtonUp( HWND hDlg, WPARAM wParam, LPARAM lParam )\r
 {\r
-   LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);\r
+   LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);\r
    if (lpp->capturedGraph)\r
    {\r
        lpp->capturedGraph = 0;\r
@@ -1095,7 +1095,7 @@ LRESULT CC_WMLButtonUp( HWND hDlg, WPARAM wParam, LPARAM lParam )
  */\r
 LRESULT CC_WMMouseMove( HWND hDlg, LPARAM lParam )\r
 {\r
-   LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);\r
+   LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);\r
    int r, g, b;\r
 \r
    if (lpp->capturedGraph)\r
@@ -1133,7 +1133,7 @@ LRESULT CC_WMMouseMove( HWND hDlg, LPARAM lParam )
  */\r
 LRESULT CC_WMLButtonDown( HWND hDlg, WPARAM wParam, LPARAM lParam )\r
 {\r
-   LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);\r
+   LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);\r
    int r, g, b, i;\r
    i = 0;\r
 \r
@@ -1192,7 +1192,7 @@ static INT_PTR CALLBACK ColorDlgProc( HWND hDlg, UINT message,
 {\r
 \r
  int res;\r
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);\r
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);\r
  if (message != WM_INITDIALOG)\r
  {\r
   if (!lpp)\r
@@ -1217,7 +1217,7 @@ static INT_PTR CALLBACK ColorDlgProc( HWND hDlg, UINT message,
                        DeleteDC(lpp->hdcMem);\r
                        DeleteObject(lpp->hbmMem);\r
                         HeapFree(GetProcessHeap(), 0, lpp);\r
-                       SetWindowLongA(hDlg, DWL_USER, 0L); /* we don't need it anymore */\r
+                       SetWindowLongPtrW(hDlg, DWLP_USER, 0); /* we don't need it anymore */\r
                        break;\r
          case WM_COMMAND:\r
                        if (CC_WMCommand( hDlg, wParam, lParam, HIWORD(wParam), (HWND) lParam))\r
index eb8d30c..fb6f172 100644 (file)
@@ -102,7 +102,7 @@ LONG CC_WMInitDialog16( HWND hDlg, WPARAM wParam, LPARAM lParam )
    ch32->lpfnHook = (LPCCHOOKPROC) ch16->lpfnHook; /* only used as flag */\r
    ch32->Flags = ch16->Flags;\r
 \r
-   SetWindowLongA(hDlg, DWL_USER, (LONG)lpp);\r
+   SetWindowLongPtrW(hDlg, DWLP_USER, (LONG_PTR)lpp);\r
 \r
    if (!(lpp->lpcc->Flags & CC_SHOWHELP))\r
       ShowWindow( GetDlgItem(hDlg,0x40e), SW_HIDE);\r
@@ -196,7 +196,7 @@ LRESULT CC_WMCommand16( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notifyCode
     UINT cokmsg;\r
     HDC hdc;\r
     COLORREF *cr;\r
-    LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);\r
+    LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);\r
     TRACE("CC_WMCommand wParam=%x lParam=%lx\n", wParam, lParam);\r
     switch (wParam)\r
     {\r
@@ -334,7 +334,7 @@ BOOL16 CALLBACK ColorDlgProc16( HWND16 hDlg16, UINT16 message,
     BOOL16 res;\r
     HWND hDlg = HWND_32(hDlg16);\r
 \r
-    LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);\r
+    LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);\r
     if (message != WM_INITDIALOG)\r
     {\r
         if (!lpp)\r
@@ -360,7 +360,7 @@ BOOL16 CALLBACK ColorDlgProc16( HWND16 hDlg16, UINT16 message,
                        DeleteObject(lpp->hbmMem);\r
                         HeapFree(GetProcessHeap(), 0, lpp->lpcc);\r
                         HeapFree(GetProcessHeap(), 0, lpp);\r
-                       SetWindowLongA(hDlg, DWL_USER, 0L); /* we don't need it anymore */\r
+                       SetWindowLongPtrW(hDlg, DWLP_USER, 0); /* we don't need it anymore */\r
                        break;\r
          case WM_COMMAND:\r
                        if (CC_WMCommand16(hDlg, wParam, lParam,\r
index 86b6635..926bf9c 100644 (file)
@@ -1528,7 +1528,7 @@ static LRESULT FILEDLG95_OnWMGetIShellBrowser(HWND hwnd)
 \r
   TRACE("\n");\r
 \r
-  SetWindowLongA(hwnd,DWL_MSGRESULT,(LONG)fodInfos->Shell.FOIShellBrowser);\r
+  SetWindowLongPtrW(hwnd,DWLP_MSGRESULT,(LONG_PTR)fodInfos->Shell.FOIShellBrowser);\r
 \r
   return TRUE;\r
 }\r
@@ -1551,7 +1551,7 @@ static BOOL FILEDLG95_SendFileOK( HWND hwnd, FileOpenDlgInfos *fodInfos )
         TRACE("---\n");\r
         /* First send CDN_FILEOK as MSDN doc says */\r
         SendCustomDlgNotificationMessage(hwnd,CDN_FILEOK);\r
-        if (GetWindowLongW(fodInfos->DlgInfos.hwndCustomDlg, DWL_MSGRESULT))\r
+        if (GetWindowLongPtrW(fodInfos->DlgInfos.hwndCustomDlg, DWLP_MSGRESULT))\r
         {\r
             TRACE("canceled\n");\r
             return FALSE;\r
@@ -1560,7 +1560,7 @@ static BOOL FILEDLG95_SendFileOK( HWND hwnd, FileOpenDlgInfos *fodInfos )
         /* fodInfos->ofnInfos points to an ASCII or UNICODE structure as appropriate */\r
         SendMessageW(fodInfos->DlgInfos.hwndCustomDlg,\r
                      fodInfos->HookMsg.fileokstring, 0, (LPARAM)fodInfos->ofnInfos);\r
-        if (GetWindowLongW(fodInfos->DlgInfos.hwndCustomDlg, DWL_MSGRESULT))\r
+        if (GetWindowLongPtrW(fodInfos->DlgInfos.hwndCustomDlg, DWLP_MSGRESULT))\r
         {\r
             TRACE("canceled\n");\r
             return FALSE;\r
index a5cceb9..b59c841 100644 (file)
@@ -230,7 +230,7 @@ HWND16 WINAPI ReplaceText16( SEGPTR find )
 static LRESULT FINDDLG_WMInitDialog(HWND hWnd, LPARAM lParam, LPDWORD lpFlags,\r
                                     LPSTR lpstrFindWhat, BOOL fUnicode)\r
 {\r
-    SetWindowLongA(hWnd, DWL_USER, lParam);\r
+    SetWindowLongPtrW(hWnd, DWLP_USER, lParam);\r
     *lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);\r
     /*\r
      * FIXME : If the initial FindWhat string is empty, we should disable the\r
@@ -295,14 +295,14 @@ static LRESULT FINDDLG_WMCommand(HWND hWnd, WPARAM wParam,
                else *lpFlags &= ~FR_MATCHCASE;\r
             *lpFlags &= ~(FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);\r
            *lpFlags |= FR_FINDNEXT;\r
-           SendMessageA(hwndOwner, uFindReplaceMessage, 0,\r
-                          GetWindowLongA(hWnd, DWL_USER) );\r
+           SendMessageW( hwndOwner, uFindReplaceMessage, 0,\r
+                          GetWindowLongPtrW(hWnd, DWLP_USER) );\r
            return TRUE;\r
        case IDCANCEL:\r
             *lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL);\r
            *lpFlags |= FR_DIALOGTERM;\r
-           SendMessageA(hwndOwner, uFindReplaceMessage, 0,\r
-                          GetWindowLongA(hWnd, DWL_USER) );\r
+           SendMessageW( hwndOwner, uFindReplaceMessage, 0,\r
+                          GetWindowLongPtrW(hWnd, DWLP_USER) );\r
            DestroyWindow(hWnd);\r
            return TRUE;\r
        case pshHelp:\r
@@ -328,7 +328,7 @@ BOOL16 CALLBACK FindTextDlgProc16(HWND16 hWnd16, UINT16 wMsg, WPARAM16 wParam,
            return FINDDLG_WMInitDialog(hWnd, lParam, &(lpfr->Flags),\r
                MapSL(lpfr->lpstrFindWhat), FALSE);\r
        case WM_COMMAND:\r
-           lpfr=MapSL(GetWindowLongA(hWnd, DWL_USER));\r
+           lpfr=MapSL(GetWindowLongPtrW(hWnd, DWLP_USER));\r
            return FINDDLG_WMCommand(hWnd, wParam, HWND_32(lpfr->hwndOwner),\r
                &lpfr->Flags, MapSL(lpfr->lpstrFindWhat),\r
                lpfr->wFindWhatLen, FALSE);\r
@@ -344,7 +344,7 @@ static LRESULT REPLACEDLG_WMInitDialog(HWND hWnd, LPARAM lParam,
                    LPDWORD lpFlags, LPSTR lpstrFindWhat,\r
                    LPSTR lpstrReplaceWith, BOOL fUnicode)\r
 {\r
-    SetWindowLongA(hWnd, DWL_USER, lParam);\r
+    SetWindowLongPtrW(hWnd, DWLP_USER, lParam);\r
     *lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);\r
     /*\r
      * FIXME : If the initial FindWhat string is empty, we should disable the FinNext /\r
@@ -410,14 +410,14 @@ static LRESULT REPLACEDLG_WMCommand(HWND hWnd, WPARAM16 wParam,
                else *lpFlags &= ~FR_MATCHCASE;\r
             *lpFlags &= ~(FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);\r
            *lpFlags |= FR_FINDNEXT;\r
-           SendMessageA(hwndOwner, uFindReplaceMessage, 0,\r
-                          GetWindowLongA(hWnd, DWL_USER) );\r
+           SendMessageW( hwndOwner, uFindReplaceMessage, 0,\r
+                          GetWindowLongPtrW(hWnd, DWLP_USER) );\r
            return TRUE;\r
        case IDCANCEL:\r
             *lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL);\r
            *lpFlags |= FR_DIALOGTERM;\r
-           SendMessageA(hwndOwner, uFindReplaceMessage, 0,\r
-                          GetWindowLongA(hWnd, DWL_USER) );\r
+           SendMessageW( hwndOwner, uFindReplaceMessage, 0,\r
+                          GetWindowLongPtrW(hWnd, DWLP_USER) );\r
            DestroyWindow(hWnd);\r
            return TRUE;\r
        case psh1:\r
@@ -438,8 +438,8 @@ static LRESULT REPLACEDLG_WMCommand(HWND hWnd, WPARAM16 wParam,
                else *lpFlags &= ~FR_MATCHCASE;\r
             *lpFlags &= ~(FR_FINDNEXT | FR_REPLACEALL | FR_DIALOGTERM);\r
            *lpFlags |= FR_REPLACE;\r
-           SendMessageA(hwndOwner, uFindReplaceMessage, 0,\r
-                          GetWindowLongA(hWnd, DWL_USER) );\r
+           SendMessageW( hwndOwner, uFindReplaceMessage, 0,\r
+                          GetWindowLongPtrW(hWnd, DWLP_USER) );\r
            return TRUE;\r
        case psh2:\r
            if (fUnicode)\r
@@ -459,8 +459,8 @@ static LRESULT REPLACEDLG_WMCommand(HWND hWnd, WPARAM16 wParam,
                else *lpFlags &= ~FR_MATCHCASE;\r
             *lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_DIALOGTERM);\r
            *lpFlags |= FR_REPLACEALL;\r
-           SendMessageA(hwndOwner, uFindReplaceMessage, 0,\r
-                          GetWindowLongA(hWnd, DWL_USER) );\r
+           SendMessageW( hwndOwner, uFindReplaceMessage, 0,\r
+                          GetWindowLongPtrW(hWnd, DWLP_USER) );\r
            return TRUE;\r
        case pshHelp:\r
            /* FIXME : should lpfr structure be passed as an argument ??? */\r
@@ -486,7 +486,7 @@ BOOL16 CALLBACK ReplaceTextDlgProc16(HWND16 hWnd16, UINT16 wMsg, WPARAM16 wParam
                    MapSL(lpfr->lpstrFindWhat),\r
                    MapSL(lpfr->lpstrReplaceWith), FALSE);\r
        case WM_COMMAND:\r
-           lpfr=MapSL(GetWindowLongA(hWnd, DWL_USER));\r
+           lpfr=MapSL(GetWindowLongPtrW(hWnd, DWLP_USER));\r
            return REPLACEDLG_WMCommand(hWnd, wParam, HWND_32(lpfr->hwndOwner),\r
                    &lpfr->Flags, MapSL(lpfr->lpstrFindWhat),\r
                    lpfr->wFindWhatLen, MapSL(lpfr->lpstrReplaceWith),\r
index 37acc27..8237f1e 100644 (file)
@@ -590,7 +590,7 @@ LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
     HCURSOR hcursor=SetCursor(LoadCursorW(0,(LPWSTR)IDC_WAIT));\r
     static const WCHAR strColorName[] = {'[','c','o','l','o','r',' ','n','a','m','e',']',0};\r
 \r
-    SetPropW(hDlg, strWineFontData, (HANDLE)lParam);\r
+    SetPropW(hDlg, strWineFontData, (HANDLE)lpcf);\r
     lpxx=lpcf->lpLogFont;\r
     TRACE("WM_INITDIALOG lParam=%08lX\n", lParam);\r
 \r
@@ -697,7 +697,7 @@ LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
         SendMessageW(hDlg, WM_COMMAND, MAKEWPARAM(cmb1, CBN_SELCHANGE),\r
                 (LPARAM)GetDlgItem(hDlg,cmb1));\r
     }\r
-    if (lpcf->Flags & CF_USESTYLE && lpcf->lpszStyle)\r
+    if ((lpcf->Flags & CF_USESTYLE) && lpcf->lpszStyle)\r
     {\r
         j=SendDlgItemMessageW(hDlg,cmb2,CB_FINDSTRING,-1,(LONG)lpcf->lpszStyle);\r
         if (j!=CB_ERR)\r
@@ -1041,7 +1041,7 @@ LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam, LPCHOOSEFONTW lpc
     WideCharToMultiByte(CP_ACP, 0, lpcfw->lpLogFont->lfFaceName,\r
                         LF_FACESIZE, lpcfa->lpLogFont->lfFaceName, LF_FACESIZE, 0, 0);\r
 \r
-    if(lpcfw->lpszStyle)  {\r
+    if((lpcfw->Flags & CF_USESTYLE) && lpcfw->lpszStyle) {\r
         len = WideCharToMultiByte(CP_ACP, 0, lpcfw->lpszStyle, -1, NULL, -1, 0, 0);\r
         WideCharToMultiByte(CP_ACP, 0, lpcfw->lpszStyle, -1, lpcfa->lpszStyle, len, 0, 0);\r
         HeapFree(GetProcessHeap(), 0, lpcfw->lpszStyle);\r
@@ -1135,13 +1135,13 @@ INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam,
         MultiByteToWideChar(CP_ACP, 0, lpcfa->lpLogFont->lfFaceName,\r
                             LF_FACESIZE, lpcfw->lpLogFont->lfFaceName, LF_FACESIZE);\r
 \r
-        if(lpcfa->lpszStyle)  {\r
+        if((lpcfa->Flags & CF_USESTYLE) && lpcfa->lpszStyle)  {\r
             len = MultiByteToWideChar(CP_ACP, 0, lpcfa->lpszStyle, -1, NULL, 0);\r
             lpcfw->lpszStyle = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));\r
             MultiByteToWideChar(CP_ACP, 0, lpcfa->lpszStyle, -1, lpcfw->lpszStyle, len);\r
         }\r
 \r
-        if(lpcfa->lpTemplateName)  {\r
+        if((lpcfa->Flags & CF_ENABLETEMPLATE) && lpcfa->lpTemplateName) {\r
             len = MultiByteToWideChar(CP_ACP, 0, lpcfa->lpTemplateName, -1, NULL, 0);\r
             lpcfw->lpTemplateName = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));\r
             MultiByteToWideChar(CP_ACP, 0, lpcfa->lpTemplateName,\r
index 5a04ccd..9bfcb77 100644 (file)
@@ -122,7 +122,7 @@ INT16 WINAPI FontFamilyEnumProc16( SEGPTR logfont, SEGPTR metrics,
 {\r
   HWND hwnd=HWND_32(LOWORD(lParam));\r
   HWND hDlg=GetParent(hwnd);\r
-  LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);\r
+  LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongPtrW(hDlg, DWLP_USER);\r
   LOGFONT16 *lplf = MapSL( logfont );\r
   TEXTMETRIC16 *lpmtrx16 = MapSL(metrics);\r
   ENUMLOGFONTEXW elf32w;\r
@@ -142,7 +142,7 @@ INT16 WINAPI FontStyleEnumProc16( SEGPTR logfont, SEGPTR metrics,
   HWND hcmb2=HWND_32(LOWORD(lParam));\r
   HWND hcmb3=HWND_32(HIWORD(lParam));\r
   HWND hDlg=GetParent(hcmb3);\r
-  LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);\r
+  LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongPtrW(hDlg, DWLP_USER);\r
   LOGFONT16 *lplf = MapSL(logfont);\r
   TEXTMETRIC16 *lpmtrx16 = MapSL(metrics);\r
   ENUMLOGFONTEXW elf32w;\r
@@ -300,7 +300,7 @@ BOOL16 CALLBACK FormatCharDlgProc16(HWND16 hDlg16, UINT16 message,
   BOOL16 res=0;\r
   if (message!=WM_INITDIALOG)\r
   {\r
-   lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);\r
+   lpcf=(LPCHOOSEFONT16)GetWindowLongPtrW(hDlg, DWLP_USER);\r
    if (!lpcf && message != WM_MEASUREITEM)\r
       return FALSE;\r
    if (CFn_HookCallChk(lpcf))\r