Follow windows' control IDs in "Open/save file" dialogs
Andrey Turkin
pancha at mail.nnov.ru
Wed Feb 8 03:11:46 CST 2006
Peter Oberndorfer wrote:
> On Tuesday 07 February 2006 20:44, you wrote:
>> Hi,
> Hello,
>> This patch changes Explorer-like common dialogs components control ids
>> to mimic Windows control ids.
>> The patch fixes Macromedia Director "import" problem.
> i can't comment on the change of the IDs but i have 2 comments:
> Please use unified diff (-u) as stated on
> http://winehq.org/site/sending_patches
>
OK. Fixed :)
>> + /* Set view window control id to 5002 */
>> + SetWindowLongA(hwndView, GWLP_ID, lst2);
> From what i have seen in MSDN GWLP_ is to be used with SetWindowLongPtr ?
Yes, you're right. Fixed (btw I've seen many of
SetWindowLongPtr(...,GWL_SOMETHING,...) too.
#define SetWindowLongPtr SetWindowLong is masking such errors.
> Also i think you can use the W version.
I think A/W doesn't matter here. lst2 is just a number and not a string.
Well, if you insist...
>> ChangeLog:
>>
>> IShellBrowser sets IShellView window's control id to 5002
>> IShellView list's control id should be 1, not 2000
>>
>> The patch is generated against wine 0.9.7 because I have no CVS access.
> Greetings Peter
>
-------------- next part --------------
diff -urN wine-0.9.7/dlls/commdlg/filedlgbrowser.c wine-0.9.7-p/dlls/commdlg/filedlgbrowser.c
--- wine-0.9.7/dlls/commdlg/filedlgbrowser.c 2006-02-02 17:55:46.000000000 +0300
+++ wine-0.9.7-p/dlls/commdlg/filedlgbrowser.c 2006-02-08 11:36:31.000000000 +0300
@@ -472,6 +472,9 @@
fodInfos->ShellInfos.hwndView = hwndView;
+ /* Set view window control id to 5002 */
+ SetWindowLongPtrW(hwndView, GWLP_ID, lst2);
+
/* Select the new folder in the Look In combo box of the Open file dialog */
FILEDLG95_LOOKIN_SelectItem(fodInfos->DlgInfos.hwndLookInCB,fodInfos->ShellInfos.pidlAbsCurrent);
diff -urN wine-0.9.7/dlls/shell32/shlview.c wine-0.9.7-p/dlls/shell32/shlview.c
--- wine-0.9.7/dlls/shell32/shlview.c 2006-02-02 17:56:02.000000000 +0300
+++ wine-0.9.7-p/dlls/shell32/shlview.c 2006-02-08 11:19:47.000000000 +0300
@@ -146,7 +146,7 @@
#define IDM_VIEW_IDW (FCIDM_SHVIEWFIRST + 0x501)
#define IDM_MYFILEITEM (FCIDM_SHVIEWFIRST + 0x502)
-#define ID_LISTVIEW 2000
+#define ID_LISTVIEW 1
#define SHV_CHANGE_NOTIFY WM_USER + 0x1111
More information about the wine-patches
mailing list