winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2008
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
944 discussions
Start a n
N
ew thread
Jon Griffiths : include/basetsd.h: Ignore cpu checks whn __midl is defined.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: 97709148c3fc545db988265f9df70ba94770a73d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=97709148c3fc545db988265f9…
Author: Jon Griffiths <jon_p_griffiths(a)yahoo.com> Date: Sat Jun 28 04:25:54 2008 -0700 include/basetsd.h: Ignore cpu checks whn __midl is defined. --- include/basetsd.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/basetsd.h b/include/basetsd.h index 440112a..8f853a4 100644 --- a/include/basetsd.h +++ b/include/basetsd.h @@ -267,7 +267,7 @@ typedef ULONG_PTR KAFFINITY, *PKAFFINITY; # undef WORDS_BIGENDIAN # undef BITFIELDS_BIGENDIAN # undef ALLOW_UNALIGNED_ACCESS -#elif !defined(RC_INVOKED) && !defined(__WIDL__) +#elif !defined(RC_INVOKED) && !defined(__WIDL__) && !defined(__midl) # error Unknown CPU architecture! #endif
1
0
0
0
Zachary Brown : winhttp: Build an import library.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: 927335ef158e622b8af36b3d06d93c88eda9555d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=927335ef158e622b8af36b3d0…
Author: Zachary Brown <zbrown(a)miami.edu> Date: Sat Jun 28 17:35:48 2008 -0700 winhttp: Build an import library. --- .gitignore | 1 + dlls/Makefile.in | 4 ++++ dlls/winhttp/Makefile.in | 1 + 3 files changed, 6 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index 75698d9..d0f13ec 100644 --- a/.gitignore +++ b/.gitignore @@ -452,6 +452,7 @@ dlls/winedos/libwinedos.def dlls/wineps16.drv16 dlls/wing.dll16 dlls/winhelp.exe16 +dlls/winhttp/libwinhttp.def dlls/wininet/libwininet.def dlls/wininet/tests/*.ok dlls/wininet/tests/testlist.c diff --git a/dlls/Makefile.in b/dlls/Makefile.in index 9470561..42ea59d 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -661,6 +661,7 @@ IMPORT_LIBS = \ version/libversion.$(IMPLIBEXT) \ wined3d/libwined3d.$(IMPLIBEXT) \ winedos/libwinedos.$(IMPLIBEXT) \ + winhttp/libwinhttp.$(IMPLIBEXT) \ wininet/libwininet.$(IMPLIBEXT) \ winmm/libwinmm.$(IMPLIBEXT) \ winnls32/libwinnls32.$(IMPLIBEXT) \ @@ -1039,6 +1040,9 @@ wined3d/libwined3d.$(IMPLIBEXT): wined3d/wined3d.spec $(WINEBUILD) winedos/libwinedos.$(IMPLIBEXT): winedos/winedos.spec $(WINEBUILD) @cd winedos && $(MAKE) libwinedos.$(IMPLIBEXT) +winhttp/libwinhttp.$(IMPLIBEXT): winhttp/winhttp.spec $(WINEBUILD) + @cd winhttp && $(MAKE) libwinhttp.$(IMPLIBEXT) + wininet/libwininet.$(IMPLIBEXT): wininet/wininet.spec $(WINEBUILD) @cd wininet && $(MAKE) libwininet.$(IMPLIBEXT) diff --git a/dlls/winhttp/Makefile.in b/dlls/winhttp/Makefile.in index 893c990..e69b137 100644 --- a/dlls/winhttp/Makefile.in +++ b/dlls/winhttp/Makefile.in @@ -3,6 +3,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = winhttp.dll +IMPORTLIB = winhttp IMPORTS = kernel32 C_SRCS = main.c
1
0
0
0
Eric Pouech : winhelp: Let CtrlC do something useful thanks to richedit.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: 21b9cb0783acfc2d64c2f31e784599a35d4f988b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21b9cb0783acfc2d64c2f31e7…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Fri Jun 27 21:29:07 2008 +0200 winhelp: Let CtrlC do something useful thanks to richedit. --- programs/winhlp32/winhelp.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/programs/winhlp32/winhelp.c b/programs/winhlp32/winhelp.c index 8307f61..effa0bd 100644 --- a/programs/winhlp32/winhelp.c +++ b/programs/winhlp32/winhelp.c @@ -864,7 +864,9 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, case MNID_FILE_EXIT: MACRO_Exit(); break; /* Menu EDIT */ - case MNID_EDIT_COPYDLG: MACRO_CopyDialog(); break; + case MNID_EDIT_COPYDLG: + SendMessage(GetDlgItem(hWnd, CTL_ID_TEXT), WM_COPY, 0, 0); + break; case MNID_EDIT_ANNOTATE:MACRO_Annotate(); break; /* Menu Bookmark */ @@ -936,6 +938,14 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, case WM_COPYDATA: return WINHELP_HandleCommand((HWND)wParam, lParam); + case WM_CHAR: + if (wParam == 3) + { + SendMessage(GetDlgItem(hWnd, CTL_ID_TEXT), WM_COPY, 0, 0); + return 0; + } + break; + case WM_KEYDOWN: keyDelta = 0;
1
0
0
0
Eric Pouech : winhelp: Start implementing a prop sheet for all lookup needs .
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: cec4ee8648809530b666e0473788fc8533eb2691 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cec4ee8648809530b666e0473…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Fri Jun 27 21:28:44 2008 +0200 winhelp: Start implementing a prop sheet for all lookup needs. --- programs/winhlp32/Bg.rc | 1 + programs/winhlp32/Cs.rc | 1 + programs/winhlp32/Da.rc | 1 + programs/winhlp32/De.rc | 1 + programs/winhlp32/En.rc | 1 + programs/winhlp32/Eo.rc | 1 + programs/winhlp32/Es.rc | 1 + programs/winhlp32/Fi.rc | 1 + programs/winhlp32/Fr.rc | 1 + programs/winhlp32/Hu.rc | 1 + programs/winhlp32/It.rc | 1 + programs/winhlp32/Ko.rc | 1 + programs/winhlp32/Makefile.in | 3 +- programs/winhlp32/Nl.rc | 1 + programs/winhlp32/No.rc | 1 + programs/winhlp32/Pl.rc | 1 + programs/winhlp32/Pt.rc | 2 + programs/winhlp32/Rm.rc | 1 + programs/winhlp32/Ru.rc | 1 + programs/winhlp32/Si.rc | 1 + programs/winhlp32/Sk.rc | 1 + programs/winhlp32/Sv.rc | 1 + programs/winhlp32/Tr.rc | 1 + programs/winhlp32/Wa.rc | 1 + programs/winhlp32/Zh.rc | 1 + programs/winhlp32/winhelp.c | 94 +++++++++++++++++++++++++++------------ programs/winhlp32/winhelp_res.h | 1 + 27 files changed, 94 insertions(+), 29 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=cec4ee8648809530b666e…
1
0
0
0
Mikołaj Zalewski : shlwapi: UrlCanonicalize should strip all the characters <= 32 from the end of the string.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: 9c030d4660780363f5dcda9b33ee6bb4daeef822 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9c030d4660780363f5dcda9b3…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Fri Jun 27 23:08:39 2008 +0200 shlwapi: UrlCanonicalize should strip all the characters <= 32 from the end of the string. --- dlls/shlwapi/tests/url.c | 16 ++++++++++++++++ dlls/shlwapi/url.c | 2 +- dlls/wininet/tests/internet.c | 6 ++++++ 3 files changed, 23 insertions(+), 1 deletions(-) diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c index 37c0111..970b7fb 100644 --- a/dlls/shlwapi/tests/url.c +++ b/dlls/shlwapi/tests/url.c @@ -579,6 +579,7 @@ static void test_UrlCanonicalizeW(void) DWORD dwSize; DWORD urllen; HRESULT hr; + int i; if (!pUrlCanonicalizeW) { @@ -628,6 +629,21 @@ static void test_UrlCanonicalizeW(void) "got 0x%x with %u and size %u for %u (expected 'S_OK' and size %u)\n", hr, GetLastError(), dwSize, lstrlenW(szReturnUrl), urllen); + /* check that the characters 1..32 are chopped from the end of the string */ + for (i = 1; i < 65536; i++) + { + WCHAR szUrl[128]; + BOOL choped; + int pos; + + MultiByteToWideChar(CP_UTF8, 0, "
http://www.winehq.org/X
", -1, szUrl, 128); + pos = lstrlenW(szUrl) - 1; + szUrl[pos] = i; + urllen = INTERNET_MAX_URL_LENGTH; + pUrlCanonicalizeW(szUrl, szReturnUrl, &urllen, 0); + choped = lstrlenW(szReturnUrl) < lstrlenW(szUrl); + ok(choped == (i <= 32), "Incorrect char chopping for char %d\n", i); + } } /* ########################### */ diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c index 16031e8..2efe386 100644 --- a/dlls/shlwapi/url.c +++ b/dlls/shlwapi/url.c @@ -502,7 +502,7 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized, debugstr_w(pszUrl), debugstr_w(lpszUrlCpy)); } nLen = lstrlenW(lpszUrlCpy); - while ((nLen > 0) && ((lpszUrlCpy[nLen-1] == '\r')||(lpszUrlCpy[nLen-1] == '\n'))) + while ((nLen > 0) && ((lpszUrlCpy[nLen-1] <= ' '))) lpszUrlCpy[--nLen]=0; if(dwFlags & (URL_UNESCAPE | URL_FILE_USE_PATHURL)) diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index 9f08b77..0f1e845 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -113,6 +113,12 @@ static void test_InternetCanonicalizeUrlA(void) "got %u and %u with size %u for '%s' (%d)\n", res, GetLastError(), dwSize, buffer, lstrlenA(buffer)); + /* test with trailing space */ + dwSize = 256; + res = InternetCanonicalizeUrlA("
http://www.winehq.org/index.php?x=
", buffer, &dwSize, ICU_BROWSER_MODE); + ok(res == 1, "InternetCanonicalizeUrlA failed\n"); + ok(!strcmp(buffer, "
http://www.winehq.org/index.php?x=
"), "Trailing space should have been stripped even in ICU_BROWSER_MODE (%s)\n", buffer); + res = InternetSetOptionA(NULL, 0xdeadbeef, buffer, sizeof(buffer)); ok(!res, "InternetSetOptionA succeeded\n"); ok(GetLastError() == ERROR_INTERNET_INVALID_OPTION,
1
0
0
0
Mikołaj Zalewski : taskmgr: Move Run dialog caption to resources, use the standard text.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: f8a104f4a5fba966ac726db05d18c7f6dcb5f6e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f8a104f4a5fba966ac726db05…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Fri Jun 27 19:25:55 2008 +0200 taskmgr: Move Run dialog caption to resources, use the standard text. --- programs/taskmgr/Da.rc | 1 + programs/taskmgr/De.rc | 1 + programs/taskmgr/En.rc | 1 + programs/taskmgr/Fr.rc | 1 + programs/taskmgr/Ja.rc | 1 + programs/taskmgr/Ko.rc | 1 + programs/taskmgr/Nl.rc | 1 + programs/taskmgr/No.rc | 1 + programs/taskmgr/Pl.rc | 1 + programs/taskmgr/Ru.rc | 1 + programs/taskmgr/Si.rc | 1 + programs/taskmgr/Tr.rc | 1 + programs/taskmgr/resource.h | 6 ++++-- programs/taskmgr/run.c | 16 ++++++++-------- 14 files changed, 24 insertions(+), 10 deletions(-) diff --git a/programs/taskmgr/Da.rc b/programs/taskmgr/Da.rc index 1d2e6f4..54ee078 100644 --- a/programs/taskmgr/Da.rc +++ b/programs/taskmgr/Da.rc @@ -433,6 +433,7 @@ STRINGTABLE DISCARDABLE BEGIN IDS_APP_TITLE "Opgavebehandler" IDC_TASKMGR "Opgavebehandler" + IDS_RUNDLG_CAPTION "Create New Task" END STRINGTABLE DISCARDABLE diff --git a/programs/taskmgr/De.rc b/programs/taskmgr/De.rc index 8821fac..c2886be 100644 --- a/programs/taskmgr/De.rc +++ b/programs/taskmgr/De.rc @@ -428,6 +428,7 @@ STRINGTABLE DISCARDABLE BEGIN IDS_APP_TITLE "Task-Manager" IDC_TASKMGR "Task-Manager" + IDS_RUNDLG_CAPTION "Create New Task" END STRINGTABLE DISCARDABLE diff --git a/programs/taskmgr/En.rc b/programs/taskmgr/En.rc index 4d1c3dc..bc160e3 100644 --- a/programs/taskmgr/En.rc +++ b/programs/taskmgr/En.rc @@ -433,6 +433,7 @@ STRINGTABLE DISCARDABLE BEGIN IDS_APP_TITLE "Task Manager" IDC_TASKMGR "Task Manager" + IDS_RUNDLG_CAPTION "Create New Task" END STRINGTABLE DISCARDABLE diff --git a/programs/taskmgr/Fr.rc b/programs/taskmgr/Fr.rc index e191ceb..4a9bf3d 100644 --- a/programs/taskmgr/Fr.rc +++ b/programs/taskmgr/Fr.rc @@ -434,6 +434,7 @@ STRINGTABLE DISCARDABLE BEGIN IDS_APP_TITLE "Gestionnaire des t�ches" IDC_TASKMGR "Gestionnaire des t�ches" + IDS_RUNDLG_CAPTION "Create New Task" END STRINGTABLE DISCARDABLE diff --git a/programs/taskmgr/Ja.rc b/programs/taskmgr/Ja.rc index 66915f7..d630269 100644 --- a/programs/taskmgr/Ja.rc +++ b/programs/taskmgr/Ja.rc @@ -434,6 +434,7 @@ STRINGTABLE DISCARDABLE BEGIN IDS_APP_TITLE "�^�X�N �}�l�[�W��" IDC_TASKMGR "�^�X�N �}�l�[�W��" + IDS_RUNDLG_CAPTION "Create New Task" END STRINGTABLE DISCARDABLE diff --git a/programs/taskmgr/Ko.rc b/programs/taskmgr/Ko.rc index 08fd7b9..14070a2 100644 --- a/programs/taskmgr/Ko.rc +++ b/programs/taskmgr/Ko.rc @@ -433,6 +433,7 @@ STRINGTABLE DISCARDABLE BEGIN IDS_APP_TITLE "�۾� ������" IDC_TASKMGR "�۾� ������" + IDS_RUNDLG_CAPTION "Create New Task" END STRINGTABLE DISCARDABLE diff --git a/programs/taskmgr/Nl.rc b/programs/taskmgr/Nl.rc index debedb5..e498d25 100644 --- a/programs/taskmgr/Nl.rc +++ b/programs/taskmgr/Nl.rc @@ -428,6 +428,7 @@ STRINGTABLE DISCARDABLE BEGIN IDS_APP_TITLE "Task Manager" IDC_TASKMGR "Task Manager" + IDS_RUNDLG_CAPTION "Create New Task" END STRINGTABLE DISCARDABLE diff --git a/programs/taskmgr/No.rc b/programs/taskmgr/No.rc index 9aa190d..006be94 100644 --- a/programs/taskmgr/No.rc +++ b/programs/taskmgr/No.rc @@ -433,6 +433,7 @@ STRINGTABLE DISCARDABLE BEGIN IDS_APP_TITLE "Oppgavebehandler" IDC_TASKMGR "Oppgavebehandler" + IDS_RUNDLG_CAPTION "Create New Task" END STRINGTABLE DISCARDABLE diff --git a/programs/taskmgr/Pl.rc b/programs/taskmgr/Pl.rc index 5a6fb9c..1d827f5 100644 --- a/programs/taskmgr/Pl.rc +++ b/programs/taskmgr/Pl.rc @@ -433,6 +433,7 @@ STRINGTABLE DISCARDABLE BEGIN IDS_APP_TITLE "Mened�er zada�" IDC_TASKMGR "Mened�er zada�" + IDS_RUNDLG_CAPTION "Utw�rz nowe zadanie" END STRINGTABLE DISCARDABLE diff --git a/programs/taskmgr/Ru.rc b/programs/taskmgr/Ru.rc index 0534f75..10b8cae 100644 --- a/programs/taskmgr/Ru.rc +++ b/programs/taskmgr/Ru.rc @@ -433,6 +433,7 @@ STRINGTABLE DISCARDABLE BEGIN IDS_APP_TITLE "��������� �����" IDC_TASKMGR "��������� �����" + IDS_RUNDLG_CAPTION "Create New Task" END STRINGTABLE DISCARDABLE diff --git a/programs/taskmgr/Si.rc b/programs/taskmgr/Si.rc index 6fb8616..ff7ed9b 100644 --- a/programs/taskmgr/Si.rc +++ b/programs/taskmgr/Si.rc @@ -435,6 +435,7 @@ STRINGTABLE DISCARDABLE BEGIN IDS_APP_TITLE "Upravitelj opravil" IDC_TASKMGR "Upravitelj opravil" + IDS_RUNDLG_CAPTION "Create New Task" END STRINGTABLE DISCARDABLE diff --git a/programs/taskmgr/Tr.rc b/programs/taskmgr/Tr.rc index b30d641..7677cd3 100644 --- a/programs/taskmgr/Tr.rc +++ b/programs/taskmgr/Tr.rc @@ -433,6 +433,7 @@ STRINGTABLE DISCARDABLE BEGIN IDS_APP_TITLE "G�rev Y�neticisi" IDC_TASKMGR "G�rev Y�neticisi" + IDS_RUNDLG_CAPTION "Create New Task" END STRINGTABLE DISCARDABLE diff --git a/programs/taskmgr/resource.h b/programs/taskmgr/resource.h index 27add7d..4ff4427 100644 --- a/programs/taskmgr/resource.h +++ b/programs/taskmgr/resource.h @@ -4,15 +4,17 @@ * Used by taskmgr.rc * */ +#define IDS_APP_TITLE 103 +#define IDC_TASKMGR 109 +#define IDS_RUNDLG_CAPTION 110 + #define IDD_TASKMGR_DIALOG 102 #define IDD_ABOUTBOX 103 -#define IDS_APP_TITLE 103 #define IDM_ABOUT 104 #define IDM_EXIT 105 #define IDD_APPLICATION_PAGE 106 #define IDI_TASKMGR 107 #define IDI_SMALL 108 -#define IDC_TASKMGR 109 #define IDR_MAINFRAME 128 #define IDR_TASKMANAGER 130 #define IDD_PROCESS_PAGE 133 diff --git a/programs/taskmgr/run.c b/programs/taskmgr/run.c index 5aedc32..efb9fb0 100644 --- a/programs/taskmgr/run.c +++ b/programs/taskmgr/run.c @@ -54,10 +54,6 @@ void TaskManager_OnFileNew(void) HMODULE hShell32; RUNFILEDLG RunFileDlg; OSVERSIONINFO versionInfo; - WCHAR wTitle[40]; - WCHAR wText[256]; - char szTitle[40] = "Create New Task"; - char szText[256] = "Type the name of a program, folder, document, or Internet resource, and Task Manager will open it for you."; hShell32 = LoadLibrary(_T("SHELL32.DLL")); RunFileDlg = (RUNFILEDLG)(FARPROC)GetProcAddress(hShell32, (char*)((long)0x3D)); @@ -70,12 +66,16 @@ void TaskManager_OnFileNew(void) if (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT) { - MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, szTitle, -1, wTitle, 40); - MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, szText, -1, wText, 256); - RunFileDlg(hMainWnd, 0, NULL, (LPCSTR)wTitle, (LPCSTR)wText, RFF_CALCDIRECTORY); + WCHAR wTitle[64]; + LoadStringW(GetModuleHandleW(NULL), IDS_RUNDLG_CAPTION, wTitle, 64); + RunFileDlg(hMainWnd, 0, NULL, (LPCSTR)wTitle, NULL, RFF_CALCDIRECTORY); } else - RunFileDlg(hMainWnd, 0, NULL, szTitle, szText, RFF_CALCDIRECTORY); + { + char szTitle[64]; + LoadStringA(GetModuleHandleW(NULL), IDS_RUNDLG_CAPTION, szTitle, 64); + RunFileDlg(hMainWnd, 0, NULL, szTitle, NULL, RFF_CALCDIRECTORY); + } } FreeLibrary(hShell32);
1
0
0
0
Mikołaj Zalewski : shell32: RunFileDlg: use the parameters.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: 225086547c31616cb1b019190f45ff1ec6ea35e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=225086547c31616cb1b019190…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Fri Jun 27 19:03:24 2008 +0200 shell32: RunFileDlg: use the parameters. Implements the customizations that are required by the parameters. The icon and one flag are still not implemented. --- dlls/shell32/dialogs.c | 49 +++++++++++++++++++++++++++++++++---------- dlls/shell32/shell32_En.rc | 6 ++-- dlls/shell32/shresdef.h | 3 ++ 3 files changed, 43 insertions(+), 15 deletions(-) diff --git a/dlls/shell32/dialogs.c b/dlls/shell32/dialogs.c index 7941a3e..0e858b8 100644 --- a/dlls/shell32/dialogs.c +++ b/dlls/shell32/dialogs.c @@ -53,7 +53,7 @@ typedef BOOL (*WINAPI LPFNOFN) (OPENFILENAMEW *) ; WINE_DEFAULT_DEBUG_CHANNEL(shell); static INT_PTR CALLBACK RunDlgProc (HWND, UINT, WPARAM, LPARAM) ; -static void FillList (HWND, char *) ; +static void FillList (HWND, char *, BOOL) ; /************************************************************************* @@ -116,17 +116,33 @@ void WINAPI RunFileDlgW( /* Dialog procedure for RunFileDlg */ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { - static RUNFILEDLGPARAMS *prfdp = NULL ; + RUNFILEDLGPARAMS *prfdp = (RUNFILEDLGPARAMS *)GetWindowLongPtrW(hwnd, DWLP_USER); switch (message) { case WM_INITDIALOG : prfdp = (RUNFILEDLGPARAMS *)lParam ; - SetWindowTextW (hwnd, prfdp->lpstrTitle) ; + SetWindowLongPtrW(hwnd, DWLP_USER, (LONG_PTR)prfdp); + + if (prfdp->lpstrTitle) + SetWindowTextW(hwnd, prfdp->lpstrTitle); + if (prfdp->lpstrDescription) + SetWindowTextW(GetDlgItem(hwnd, IDC_RUNDLG_DESCRIPTION), prfdp->lpstrDescription); + if (prfdp->uFlags & RFF_NOBROWSE) + { + HWND browse = GetDlgItem(hwnd, IDC_RUNDLG_BROWSE); + ShowWindow(browse, SW_HIDE); + EnableWindow(browse, FALSE); + } + if (prfdp->uFlags & RFF_NOLABEL) + ShowWindow(GetDlgItem(hwnd, IDC_RUNDLG_LABEL), SW_HIDE); + if (prfdp->uFlags & RFF_CALCDIRECTORY) + FIXME("RFF_CALCDIRECTORY not supported\n"); + SetClassLongPtrW (hwnd, GCLP_HICON, (LPARAM)prfdp->hIcon) ; - SendMessageW (GetDlgItem (hwnd, 12297), STM_SETICON, + SendMessageW (GetDlgItem (hwnd, IDC_RUNDLG_ICON), STM_SETICON, (WPARAM)LoadIconW (NULL, (LPCWSTR)IDI_WINLOGO), 0); - FillList (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), NULL) ; + FillList (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), NULL, (prfdp->uFlags & RFF_NODEFAULT) == 0) ; SetFocus (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH)) ; return TRUE ; @@ -143,7 +159,10 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR psz = HeapAlloc( GetProcessHeap(), 0, (ic + 1)*sizeof(WCHAR) ); GetWindowTextW (htxt, psz, ic + 1) ; - if (ShellExecuteW(NULL, NULL, psz, NULL, NULL, SW_SHOWNORMAL) < (HINSTANCE)33) + /* according to
http://www.codeproject.com/KB/shell/runfiledlg.aspx
we should send a + * WM_NOTIFY before execution */ + + if (ShellExecuteW(hwnd, NULL, psz, NULL, prfdp->lpstrDirectory, SW_SHOWNORMAL) < (HINSTANCE)33) { char *pszSysMsg = NULL ; char szMsg[256]; @@ -166,7 +185,7 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR /* FillList is still ANSI */ GetWindowTextA (htxt, (LPSTR)psz, ic + 1) ; - FillList (htxt, (LPSTR)psz) ; + FillList (htxt, (LPSTR)psz, FALSE) ; HeapFree(GetProcessHeap(), 0, psz); EndDialog (hwnd, 0) ; @@ -197,6 +216,7 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR ofn.nMaxFile = 1023; ofn.lpstrTitle = szCaption; ofn.Flags = OFN_ENABLESIZING | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST; + ofn.lpstrInitialDir = prfdp->lpstrDirectory; if (NULL == (hComdlg = LoadLibraryExW (comdlg32W, NULL, 0)) || NULL == (ofnProc = (LPFNOFN)GetProcAddress (hComdlg, "GetOpenFileNameW"))) @@ -209,8 +229,8 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR if (ofnProc(&ofn)) { SetFocus (GetDlgItem (hwnd, IDOK)) ; - SetWindowTextW (GetDlgItem (hwnd, 12298), szFName) ; - SendMessageW (GetDlgItem (hwnd, 12298), CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; + SetWindowTextW (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), szFName) ; + SendMessageW (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; SetFocus (GetDlgItem (hwnd, IDOK)) ; } @@ -225,7 +245,8 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR } /* This grabs the MRU list from the registry and fills the combo for the "Run" dialog above */ -static void FillList (HWND hCb, char *pszLatest) +/* fShowDefault ignored if pszLatest != NULL */ +static void FillList (HWND hCb, char *pszLatest, BOOL fShowDefault) { HKEY hkey ; /* char szDbgMsg[256] = "" ; */ @@ -297,7 +318,7 @@ static void FillList (HWND hCb, char *pszLatest) MessageBoxA (hCb, szDbgMsg, "Nix", MB_OK) ; */ SendMessageA (hCb, CB_ADDSTRING, 0, (LPARAM)pszCmd) ; - if (!Nix) + if (!Nix && fShowDefault) { SetWindowTextA (hCb, pszCmd) ; SendMessageA (hCb, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; @@ -376,7 +397,11 @@ void WINAPI RunFileDlgA( if (!MultiByteToWideChar(CP_ACP, 0, lpstrDirectory, -1, directory, MAX_PATH)) directory[0] = 0; - RunFileDlgW(hwndOwner, hIcon, directory, title, description, uFlags); + RunFileDlgW(hwndOwner, hIcon, + lpstrDirectory ? directory : NULL, + lpstrTitle ? title : NULL, + lpstrDescription ? description : NULL, + uFlags); } /************************************************************************* diff --git a/dlls/shell32/shell32_En.rc b/dlls/shell32/shell32_En.rc index 1d44742..732490b 100644 --- a/dlls/shell32/shell32_En.rc +++ b/dlls/shell32/shell32_En.rc @@ -156,9 +156,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "" FONT 8, "MS Shell Dlg" { - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and Wine will open it for you.", 12289, 36, 11, 182, 18 - LTEXT "&Open:", 12305, 7, 39, 24, 10 + ICON "", IDC_RUNDLG_ICON, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and Wine will open it for you.", IDC_RUNDLG_DESCRIPTION, 36, 11, 182, 18 + LTEXT "&Open:", IDC_RUNDLG_LABEL, 7, 39, 24, 10 CONTROL "", IDC_RUNDLG_EDITPATH, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP diff --git a/dlls/shell32/shresdef.h b/dlls/shell32/shresdef.h index 0d71beb..90b1c76 100644 --- a/dlls/shell32/shresdef.h +++ b/dlls/shell32/shresdef.h @@ -178,7 +178,10 @@ FIXME: Need to add them, but for now just let them use the same: searching.avi #define IDC_ABOUT_STATIC_TEXT3 102 /* run dialog */ +#define IDC_RUNDLG_DESCRIPTION 12289 #define IDC_RUNDLG_BROWSE 12288 +#define IDC_RUNDLG_ICON 12297 #define IDC_RUNDLG_EDITPATH 12298 +#define IDC_RUNDLG_LABEL 12305 #endif
1
0
0
0
Mikołaj Zalewski : shell32: RunFileDlg: move strings to resources.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: 0e2b5c76055db9527fefafbb082c456ea974e6d9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0e2b5c76055db9527fefafbb0…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Fri Jun 27 18:16:47 2008 +0200 shell32: RunFileDlg: move strings to resources. --- dlls/shell32/dialogs.c | 15 +++++++-------- dlls/shell32/shell32_En.rc | 6 ++++++ dlls/shell32/shell32_Pl.rc | 8 +++++++- dlls/shell32/shresdef.h | 5 +++++ 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/dlls/shell32/dialogs.c b/dlls/shell32/dialogs.c index 367a40a..7941a3e 100644 --- a/dlls/shell32/dialogs.c +++ b/dlls/shell32/dialogs.c @@ -104,7 +104,7 @@ void WINAPI RunFileDlgW( !(template = LoadResource(shell32_hInstance, hRes))) { ERR("Couldn't load SHELL_RUN_DLG resource\n"); - MessageBoxA(hwndOwner, "Unable to display Run File dialog box (internal error)", NULL, MB_OK | MB_ICONERROR); + ShellMessageBoxW(shell32_hInstance, hwndOwner, MAKEINTRESOURCEW(IDS_RUNDLG_ERROR), NULL, MB_OK | MB_ICONERROR); return; } @@ -183,16 +183,16 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR LPFNOFN ofnProc = NULL ; static const WCHAR comdlg32W[] = {'c','o','m','d','l','g','3','2',0}; WCHAR szFName[1024] = {0}; - WCHAR szFilter[MAX_PATH], szCaption[MAX_PATH]; - static const char ansiFilter[] = "Executable Files\0*.exe\0All Files\0*.*\0\0\0\0"; + WCHAR *pszFilter, szCaption[MAX_PATH]; OPENFILENAMEW ofn; - MultiByteToWideChar(CP_UTF8, 0, ansiFilter, sizeof(ansiFilter), szFilter, MAX_PATH); - MultiByteToWideChar(CP_UTF8, 0, "Browse", -1, szCaption, MAX_PATH); + LoadStringW(shell32_hInstance, IDS_RUNDLG_BROWSE_FILTER, (LPWSTR)&pszFilter, 0); + LoadStringW(shell32_hInstance, IDS_RUNDLG_BROWSE_CAPTION, szCaption, MAX_PATH); + ZeroMemory(&ofn, sizeof(ofn)); ofn.lStructSize = sizeof(OPENFILENAMEW); ofn.hwndOwner = hwnd; - ofn.lpstrFilter = szFilter; + ofn.lpstrFilter = pszFilter; ofn.lpstrFile = szFName; ofn.nMaxFile = 1023; ofn.lpstrTitle = szCaption; @@ -202,13 +202,12 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR NULL == (ofnProc = (LPFNOFN)GetProcAddress (hComdlg, "GetOpenFileNameW"))) { ERR("Couldn't get GetOpenFileName function entry (lib=%p, proc=%p)\n", hComdlg, ofnProc); - MessageBoxA(hwnd, "Unable to display Browse dialog box (internal error)", NULL, MB_OK | MB_ICONERROR); + ShellMessageBoxW(shell32_hInstance, hwnd, MAKEINTRESOURCEW(IDS_RUNDLG_BROWSE_ERROR), NULL, MB_OK | MB_ICONERROR); return TRUE ; } if (ofnProc(&ofn)) { - SetFocus (GetDlgItem (hwnd, IDOK)) ; SetWindowTextW (GetDlgItem (hwnd, 12298), szFName) ; SendMessageW (GetDlgItem (hwnd, 12298), CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; diff --git a/dlls/shell32/shell32_En.rc b/dlls/shell32/shell32_En.rc index 4fa268d..1d44742 100644 --- a/dlls/shell32/shell32_En.rc +++ b/dlls/shell32/shell32_En.rc @@ -220,6 +220,12 @@ STRINGTABLE IDS_SHUTDOWN_TITLE "Shutdown" IDS_SHUTDOWN_PROMPT "Do you want to shutdown your Wine session?" + /* Run File dialog */ + IDS_RUNDLG_ERROR "Unable to display Run File dialog box (internal error)" + IDS_RUNDLG_BROWSE_ERROR "Unable to display Browse dialog box (internal error)" + IDS_RUNDLG_BROWSE_CAPTION "Browse" + IDS_RUNDLG_BROWSE_FILTER "Executable Files\0*.exe\0All Files\0*.*\0\0" + /* shell folder path default values */ IDS_PROGRAMS "Start Menu\\Programs" IDS_PERSONAL "My Documents" diff --git a/dlls/shell32/shell32_Pl.rc b/dlls/shell32/shell32_Pl.rc index 6b9afdd..8099ab5 100644 --- a/dlls/shell32/shell32_Pl.rc +++ b/dlls/shell32/shell32_Pl.rc @@ -158,7 +158,7 @@ CAPTION "" FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Wpisz nazw� programu, katalogu, dokumentu, a Wine otworzy go dla ciebie.", 12289, 36, 11, 182, 18 + LTEXT "Wpisz nazw� programu, katalogu lub dokumentu, a Wine otworzy go dla ciebie.", 12289, 36, 11, 182, 18 LTEXT "&Otw�rz:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP @@ -221,6 +221,12 @@ STRINGTABLE IDS_SHUTDOWN_TITLE "Wy��cz" IDS_SHUTDOWN_PROMPT "Czy chcesz wy��czy� sesj� Wine'a?" + /* Run File dialog */ + IDS_RUNDLG_ERROR "Nie mo�na wy�wietli� okna dialogowego Uruchom (b��d wewn�trzny)" + IDS_RUNDLG_BROWSE_ERROR "Nie mo�na wy�wietli� okna dialogowego Przegl�daj (b��d wewn�trzny)" + IDS_RUNDLG_BROWSE_CAPTION "Przegl�daj" + IDS_RUNDLG_BROWSE_FILTER "Pliki wykonywalne\0*.exe\0Wszystkie pliki\0*.*\0\0" + /* shell folder path default values */ IDS_PROGRAMS "Menu Start\\Programy" IDS_PERSONAL "Moje dokumenty" diff --git a/dlls/shell32/shresdef.h b/dlls/shell32/shresdef.h index be404e2..0d71beb 100644 --- a/dlls/shell32/shresdef.h +++ b/dlls/shell32/shresdef.h @@ -97,6 +97,11 @@ #define IDS_NEWFOLDER 142 +#define IDS_RUNDLG_ERROR 160 +#define IDS_RUNDLG_BROWSE_ERROR 161 +#define IDS_RUNDLG_BROWSE_CAPTION 162 +#define IDS_RUNDLG_BROWSE_FILTER 163 + #define IDS_LICENSE 256 #define IDS_LICENSE_CAPTION 257
1
0
0
0
Mikołaj Zalewski : shell32: RunFileDlg: make the error messages easier to understand for the user.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: adc72977f7fa76eabee0e33dac91d38ef454bfda URL:
http://source.winehq.org/git/wine.git/?a=commit;h=adc72977f7fa76eabee0e33da…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Fri Jun 27 17:55:48 2008 +0200 shell32: RunFileDlg: make the error messages easier to understand for the user. --- dlls/shell32/dialogs.c | 32 +++++++++++++------------------- 1 files changed, 13 insertions(+), 19 deletions(-) diff --git a/dlls/shell32/dialogs.c b/dlls/shell32/dialogs.c index 4359289..367a40a 100644 --- a/dlls/shell32/dialogs.c +++ b/dlls/shell32/dialogs.c @@ -100,16 +100,13 @@ void WINAPI RunFileDlgW( rfdp.lpstrDescription = lpstrDescription; rfdp.uFlags = uFlags; - if(!(hRes = FindResourceW(shell32_hInstance, resnameW, (LPWSTR)RT_DIALOG))) - { - MessageBoxA (hwndOwner, "Couldn't find dialog.", "Nix", MB_OK) ; - return; - } - if(!(template = LoadResource(shell32_hInstance, hRes))) - { - MessageBoxA (hwndOwner, "Couldn't load dialog.", "Nix", MB_OK) ; + if (!(hRes = FindResourceW(shell32_hInstance, resnameW, (LPWSTR)RT_DIALOG)) || + !(template = LoadResource(shell32_hInstance, hRes))) + { + ERR("Couldn't load SHELL_RUN_DLG resource\n"); + MessageBoxA(hwndOwner, "Unable to display Run File dialog box (internal error)", NULL, MB_OK | MB_ICONERROR); return; - } + } DialogBoxIndirectParamW(shell32_hInstance, template, hwndOwner, RunDlgProc, (LPARAM)&rfdp); @@ -184,6 +181,7 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR { HMODULE hComdlg = NULL ; LPFNOFN ofnProc = NULL ; + static const WCHAR comdlg32W[] = {'c','o','m','d','l','g','3','2',0}; WCHAR szFName[1024] = {0}; WCHAR szFilter[MAX_PATH], szCaption[MAX_PATH]; static const char ansiFilter[] = "Executable Files\0*.exe\0All Files\0*.*\0\0\0\0"; @@ -200,17 +198,13 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR ofn.lpstrTitle = szCaption; ofn.Flags = OFN_ENABLESIZING | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST; - if (NULL == (hComdlg = LoadLibraryExA ("comdlg32", NULL, 0))) - { - MessageBoxA (hwnd, "Unable to display dialog box (LoadLibraryEx) !", "Nix", MB_OK | MB_ICONEXCLAMATION) ; - return TRUE ; - } - - if (NULL == (ofnProc = (LPFNOFN)GetProcAddress (hComdlg, "GetOpenFileNameW"))) - { - MessageBoxA (hwnd, "Unable to display dialog box (GetProcAddress) !", "Nix", MB_OK | MB_ICONEXCLAMATION) ; + if (NULL == (hComdlg = LoadLibraryExW (comdlg32W, NULL, 0)) || + NULL == (ofnProc = (LPFNOFN)GetProcAddress (hComdlg, "GetOpenFileNameW"))) + { + ERR("Couldn't get GetOpenFileName function entry (lib=%p, proc=%p)\n", hComdlg, ofnProc); + MessageBoxA(hwnd, "Unable to display Browse dialog box (internal error)", NULL, MB_OK | MB_ICONERROR); return TRUE ; - } + } if (ofnProc(&ofn)) {
1
0
0
0
Mikołaj Zalewski : shell32: RunFileDlg: allow the user to cancel the Browse dialog, remove some unneeded parameters.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: ebb41a64ab2775d7fcb5baf79e29f97183ae4574 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ebb41a64ab2775d7fcb5baf79…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Fri Jun 27 17:45:10 2008 +0200 shell32: RunFileDlg: allow the user to cancel the Browse dialog, remove some unneeded parameters. --- dlls/shell32/dialogs.c | 47 +++++++++++++++++------------------------------ 1 files changed, 17 insertions(+), 30 deletions(-) diff --git a/dlls/shell32/dialogs.c b/dlls/shell32/dialogs.c index 034768f..4359289 100644 --- a/dlls/shell32/dialogs.c +++ b/dlls/shell32/dialogs.c @@ -184,36 +184,21 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR { HMODULE hComdlg = NULL ; LPFNOFN ofnProc = NULL ; - WCHAR szFName[1024] = {0}, szFileTitle[256] = {0}, szInitDir[768] = {0} ; + WCHAR szFName[1024] = {0}; WCHAR szFilter[MAX_PATH], szCaption[MAX_PATH]; static const char ansiFilter[] = "Executable Files\0*.exe\0All Files\0*.*\0\0\0\0"; - OPENFILENAMEW ofn = - { - sizeof (OPENFILENAMEW), - NULL, - NULL, - szFilter, - NULL, - 0, - 0, - szFName, - 1023, - szFileTitle, - 255, - szInitDir, - szCaption, - OFN_ENABLESIZING | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST, - 0, - 0, - NULL, - 0, - (LPOFNHOOKPROC)NULL, - NULL - } ; + OPENFILENAMEW ofn; MultiByteToWideChar(CP_UTF8, 0, ansiFilter, sizeof(ansiFilter), szFilter, MAX_PATH); MultiByteToWideChar(CP_UTF8, 0, "Browse", -1, szCaption, MAX_PATH); - ofn.hwndOwner = hwnd ; + ZeroMemory(&ofn, sizeof(ofn)); + ofn.lStructSize = sizeof(OPENFILENAMEW); + ofn.hwndOwner = hwnd; + ofn.lpstrFilter = szFilter; + ofn.lpstrFile = szFName; + ofn.nMaxFile = 1023; + ofn.lpstrTitle = szCaption; + ofn.Flags = OFN_ENABLESIZING | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST; if (NULL == (hComdlg = LoadLibraryExA ("comdlg32", NULL, 0))) { @@ -227,12 +212,14 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR return TRUE ; } - ofnProc (&ofn) ; + if (ofnProc(&ofn)) + { - SetFocus (GetDlgItem (hwnd, IDOK)) ; - SetWindowTextW (GetDlgItem (hwnd, 12298), szFName) ; - SendMessageW (GetDlgItem (hwnd, 12298), CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; - SetFocus (GetDlgItem (hwnd, IDOK)) ; + SetFocus (GetDlgItem (hwnd, IDOK)) ; + SetWindowTextW (GetDlgItem (hwnd, 12298), szFName) ; + SendMessageW (GetDlgItem (hwnd, 12298), CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; + SetFocus (GetDlgItem (hwnd, IDOK)) ; + } FreeLibrary (hComdlg) ;
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
95
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Results per page:
10
25
50
100
200