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
October 2006
----- 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
1032 discussions
Start a n
N
ew thread
Detlef Riekenberg : localspl/tests: Get function pointers from the monitor.
by Alexandre Julliard
20 Oct '06
20 Oct '06
Module: wine Branch: master Commit: c4b67816159201e26770790ff015465ff66c1723 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c4b67816159201e26770790ff…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Fri Oct 20 00:12:35 2006 +0200 localspl/tests: Get function pointers from the monitor. --- dlls/localspl/tests/localmon.c | 50 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 50 insertions(+), 0 deletions(-) diff --git a/dlls/localspl/tests/localmon.c b/dlls/localspl/tests/localmon.c index 60d07b7..ca5ee97 100644 --- a/dlls/localspl/tests/localmon.c +++ b/dlls/localspl/tests/localmon.c @@ -39,6 +39,23 @@ static HMODULE hdll; static LPMONITOREX (WINAPI *pInitializePrintMonitor)(LPWSTR); static LPMONITOREX pm; +static BOOL (WINAPI *pEnumPorts)(LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD, LPDWORD); +static BOOL (WINAPI *pOpenPort)(LPWSTR, PHANDLE); +static BOOL (WINAPI *pOpenPortEx)(LPWSTR, LPWSTR, PHANDLE, struct _MONITOR *); +static BOOL (WINAPI *pStartDocPort)(HANDLE, LPWSTR, DWORD, DWORD, LPBYTE); +static BOOL (WINAPI *pWritePort)(HANDLE hPort, LPBYTE, DWORD, LPDWORD); +static BOOL (WINAPI *pReadPort)(HANDLE hPort, LPBYTE, DWORD, LPDWORD); +static BOOL (WINAPI *pEndDocPort)(HANDLE); +static BOOL (WINAPI *pClosePort)(HANDLE); +static BOOL (WINAPI *pAddPort)(LPWSTR, HWND, LPWSTR); +static BOOL (WINAPI *pAddPortEx)(LPWSTR, DWORD, LPBYTE, LPWSTR); +static BOOL (WINAPI *pConfigurePort)(LPWSTR, HWND, LPWSTR); +static BOOL (WINAPI *pDeletePort)(LPWSTR, HWND, LPWSTR); +static BOOL (WINAPI *pGetPrinterDataFromPort)(HANDLE, DWORD, LPWSTR, LPWSTR, DWORD, LPWSTR, DWORD, LPDWORD); +static BOOL (WINAPI *pSetPortTimeOuts)(HANDLE, LPCOMMTIMEOUTS, DWORD); +static BOOL (WINAPI *pXcvOpenPort)(HANDLE, LPCWSTR, ACCESS_MASK, PHANDLE phXcv); +static DWORD (WINAPI *pXcvDataPort)(HANDLE, LPCWSTR, PBYTE, DWORD, PBYTE, DWORD, PDWORD); +static BOOL (WINAPI *pXcvClosePort)(HANDLE); static WCHAR emptyW[] = {0}; static WCHAR Monitors_LocalPortW[] = { \ @@ -74,6 +91,14 @@ static void test_InitializePrintMonitor( "returned %p with %d (expected %p)\n", res, GetLastError(), pm); } +/* ########################### */ + +#define GET_MONITOR_FUNC(name) \ + if(numentries > 0) { \ + numentries--; \ + p##name = (void *) pm->Monitor.pfn##name ; \ + } + START_TEST(localmon) { @@ -89,5 +114,30 @@ START_TEST(localmon) b) upto w2k: Section "Ports" in win.ini or InitializePrintMonitor fails. */ pm = pInitializePrintMonitor(Monitors_LocalPortW); + if (pm) { + DWORD numentries; + numentries = (pm->dwMonitorSize ) / sizeof(VOID *); + /* NT4: 14, since w2k: 17 */ + ok( numentries == 14 || numentries == 17, + "dwMonitorSize (%d) => %d Functions\n", pm->dwMonitorSize, numentries); + + GET_MONITOR_FUNC(EnumPorts); + GET_MONITOR_FUNC(OpenPort); + GET_MONITOR_FUNC(OpenPortEx); + GET_MONITOR_FUNC(StartDocPort); + GET_MONITOR_FUNC(WritePort); + GET_MONITOR_FUNC(ReadPort); + GET_MONITOR_FUNC(EndDocPort); + GET_MONITOR_FUNC(ClosePort); + GET_MONITOR_FUNC(AddPort); + GET_MONITOR_FUNC(AddPortEx); + GET_MONITOR_FUNC(ConfigurePort); + GET_MONITOR_FUNC(DeletePort); + GET_MONITOR_FUNC(GetPrinterDataFromPort); + GET_MONITOR_FUNC(SetPortTimeOuts); + GET_MONITOR_FUNC(XcvOpenPort); + GET_MONITOR_FUNC(XcvDataPort); + GET_MONITOR_FUNC(XcvClosePort); + } test_InitializePrintMonitor(); }
1
0
0
0
Detlef Riekenberg : localspl/tests: Another test for InitializePrintMonitor .
by Alexandre Julliard
20 Oct '06
20 Oct '06
Module: wine Branch: master Commit: ef78da2d5a08c4e68b8d29d030a5b15bd63c268c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef78da2d5a08c4e68b8d29d03…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Thu Oct 19 23:27:28 2006 +0200 localspl/tests: Another test for InitializePrintMonitor. --- dlls/localspl/tests/localmon.c | 33 +++++++++++++++++++++++++++------ 1 files changed, 27 insertions(+), 6 deletions(-) diff --git a/dlls/localspl/tests/localmon.c b/dlls/localspl/tests/localmon.c index 72a7048..60d07b7 100644 --- a/dlls/localspl/tests/localmon.c +++ b/dlls/localspl/tests/localmon.c @@ -35,19 +35,26 @@ #include "wine/test.h" /* ##### */ -static HANDLE hdll; +static HMODULE hdll; static LPMONITOREX (WINAPI *pInitializePrintMonitor)(LPWSTR); -static const WCHAR emptyW[] = {0}; - +static LPMONITOREX pm; + +static WCHAR emptyW[] = {0}; +static WCHAR Monitors_LocalPortW[] = { \ + 'S','y','s','t','e','m','\\', + 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', + 'C','o','n','t','r','o','l','\\', + 'P','r','i','n','t','\\', + 'M','o','n','i','t','o','r','s','\\', + 'L','o','c','a','l',' ','P','o','r','t',0}; + /* ##### */ static void test_InitializePrintMonitor(void) { LPMONITOREX res; - if (!pInitializePrintMonitor) return; - SetLastError(0xdeadbeef); res = pInitializePrintMonitor(NULL); ok( (res == NULL) && (GetLastError() == ERROR_INVALID_PARAMETER), @@ -55,18 +62,32 @@ static void test_InitializePrintMonitor( "ERROR_INVALID_PARAMETER)\n", res, GetLastError()); SetLastError(0xdeadbeef); - res = pInitializePrintMonitor((LPWSTR) emptyW); + res = pInitializePrintMonitor(emptyW); ok( (res == NULL) && (GetLastError() == ERROR_INVALID_PARAMETER), "returned %p with %d\n (expected NULL with " \ "ERROR_INVALID_PARAMETER)\n", res, GetLastError()); + + /* Every call with a non-empty string returns the same Pointer */ + SetLastError(0xdeadbeef); + res = pInitializePrintMonitor(Monitors_LocalPortW); + ok( res == pm, + "returned %p with %d (expected %p)\n", res, GetLastError(), pm); } START_TEST(localmon) { + /* This DLL does not exists on Win9x */ hdll = LoadLibraryA("localspl.dll"); if (!hdll) return; pInitializePrintMonitor = (void *) GetProcAddress(hdll, "InitializePrintMonitor"); + if (!pInitializePrintMonitor) return; + + /* Native localmon.dll / localspl.dll need a vaild Port-Entry in: + a) since xp: HKLM\Software\Microsoft\Windows NT\CurrentVersion\Ports + b) upto w2k: Section "Ports" in win.ini + or InitializePrintMonitor fails. */ + pm = pInitializePrintMonitor(Monitors_LocalPortW); test_InitializePrintMonitor(); }
1
0
0
0
Huw Davies : oledlg: Remove the structure window property when we quit.
by Alexandre Julliard
20 Oct '06
20 Oct '06
Module: wine Branch: master Commit: 04662b8c453a0e9236aefd2083e95b3e8cbb9cc1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=04662b8c453a0e9236aefd208…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Oct 19 12:44:43 2006 +0100 oledlg: Remove the structure window property when we quit. --- dlls/oledlg/pastespl.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/oledlg/pastespl.c b/dlls/oledlg/pastespl.c index 7bb7435..ccfceca 100644 --- a/dlls/oledlg/pastespl.c +++ b/dlls/oledlg/pastespl.c @@ -615,6 +615,8 @@ static INT_PTR CALLBACK ps_dlg_proc(HWND if(wp == IDOK) update_structure(hdlg, ps_struct); EndDialog(hdlg, wp); + /* native does its cleanup in WM_DESTROY */ + RemovePropW(hdlg, prop_name); free_structure(ps_struct); return TRUE; }
1
0
0
0
Huw Davies : oledlg: Return the appropiate value after the dialog is closed .
by Alexandre Julliard
20 Oct '06
20 Oct '06
Module: wine Branch: master Commit: 5f71b16d07c1b989c1854fab0787ceb4a8bd0f07 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5f71b16d07c1b989c1854fab0…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Oct 19 12:11:51 2006 +0100 oledlg: Return the appropiate value after the dialog is closed. --- dlls/oledlg/pastespl.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/oledlg/pastespl.c b/dlls/oledlg/pastespl.c index 08b7f95..7bb7435 100644 --- a/dlls/oledlg/pastespl.c +++ b/dlls/oledlg/pastespl.c @@ -687,6 +687,7 @@ UINT WINAPI OleUIPasteSpecialA(LPOLEUIPA UINT WINAPI OleUIPasteSpecialW(LPOLEUIPASTESPECIALW ps) { LPCDLGTEMPLATEW dlg_templ = (LPCDLGTEMPLATEW)ps->hResource; + UINT ret; TRACE("(%p)\n", ps); @@ -708,8 +709,7 @@ UINT WINAPI OleUIPasteSpecialW(LPOLEUIPA if(!dlg_templ) return OLEUI_ERR_LOADTEMPLATEFAILURE; } - DialogBoxIndirectParamW(OLEDLG_hInstance, dlg_templ, ps->hWndOwner, ps_dlg_proc, (LPARAM)ps); + ret = DialogBoxIndirectParamW(OLEDLG_hInstance, dlg_templ, ps->hWndOwner, ps_dlg_proc, (LPARAM)ps); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return OLEUI_FALSE; + return ret; }
1
0
0
0
Huw Davies : oledlg: Update the source text.
by Alexandre Julliard
20 Oct '06
20 Oct '06
Module: wine Branch: master Commit: feeaf9c238d7de41139f671695235bd0a1cee48c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=feeaf9c238d7de41139f67169…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Oct 19 11:45:24 2006 +0100 oledlg: Update the source text. --- dlls/oledlg/pastespl.c | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/dlls/oledlg/pastespl.c b/dlls/oledlg/pastespl.c index b4d5f97..08b7f95 100644 --- a/dlls/oledlg/pastespl.c +++ b/dlls/oledlg/pastespl.c @@ -364,6 +364,29 @@ static void init_lists(HWND hdlg, ps_str EnableWindow(GetDlgItem(hdlg, IDOK), 0); } +static void update_src_text(HWND hdlg, ps_struct_t *ps_struct) +{ + WCHAR *str; + + if(ps_struct->flags & PSF_SELECTPASTE) + { + if(ps_struct->source_name) + str = ps_struct->source_name; + else + str = ps_struct->link_source_name; + + } + else + { + if(ps_struct->link_source_name) + str = ps_struct->link_source_name; + else + str = ps_struct->source_name; + + } + SetDlgItemTextW(hdlg, IDC_PS_SOURCETEXT, str); +} + static void update_as_icon(HWND hdlg, ps_struct_t *ps_struct) { HWND icon_display = GetDlgItem(hdlg, IDC_PS_ICONDISPLAY); @@ -449,6 +472,7 @@ static void mode_change(HWND hdlg, ps_st ps_struct->flags |= PSF_SELECTPASTELINK; } + update_src_text(hdlg, ps_struct); update_display_list(hdlg, id == IDC_PS_PASTE ? IDC_PS_PASTELIST : IDC_PS_PASTELINKLIST); selection_change(hdlg, ps_struct); } @@ -537,6 +561,8 @@ static INT_PTR CALLBACK ps_dlg_proc(HWND init_lists(hdlg, ps_struct); + update_src_text(hdlg, ps_struct); + selection_change(hdlg, ps_struct); SetFocus(GetDlgItem(hdlg, IDC_PS_DISPLAYLIST));
1
0
0
0
Huw Davies : oledlg: Set nSelectedIndex on exit.
by Alexandre Julliard
20 Oct '06
20 Oct '06
Module: wine Branch: master Commit: 8711d5e6b1900a62238498d1f51996406dd4d3c5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8711d5e6b1900a62238498d1f…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Oct 19 11:42:03 2006 +0100 oledlg: Set nSelectedIndex on exit. --- dlls/oledlg/pastespl.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dlls/oledlg/pastespl.c b/dlls/oledlg/pastespl.c index ff3a8b5..b4d5f97 100644 --- a/dlls/oledlg/pastespl.c +++ b/dlls/oledlg/pastespl.c @@ -236,7 +236,7 @@ static DWORD init_pastelist(HWND hdlg, O DWORD src_fmt, req_fmt; for(req_fmt = 0; req_fmt < ps->cPasteEntries; req_fmt++) { - /* This is used by update_struct() to set nSelectedIndex on exit */ + /* This is used by update_structure() to set nSelectedIndex on exit */ ps->arrPasteEntries[req_fmt].dwScratchSpace = req_fmt; TRACE("req_fmt %x\n", ps->arrPasteEntries[req_fmt].fmtetc.cfFormat); for(src_fmt = 0; src_fmt < fetched; src_fmt++) @@ -465,6 +465,13 @@ static void send_end_dialog_msg(HWND hdl static void update_structure(HWND hdlg, ps_struct_t *ps_struct) { + LONG cur_sel = SendMessageW(GetDlgItem(hdlg, IDC_PS_DISPLAYLIST), LB_GETCURSEL, 0, 0); + if(cur_sel != -1) + { + OLEUIPASTEENTRYW *pent; + pent = (OLEUIPASTEENTRYW *)SendMessageW(GetDlgItem(hdlg, IDC_PS_DISPLAYLIST), LB_GETITEMDATA, cur_sel, 0); + ps_struct->ps->nSelectedIndex = pent->dwScratchSpace; + } ps_struct->ps->dwFlags = ps_struct->flags; ps_struct->ps->fLink = (ps_struct->flags & PSF_SELECTPASTELINK) ? TRUE : FALSE; }
1
0
0
0
Huw Davies : oledlg: Retrieve names from the OBJECTDESCRIPTOR structure.
by Alexandre Julliard
20 Oct '06
20 Oct '06
Module: wine Branch: master Commit: 39131cf5450af8c88148197af359d43df9126e75 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=39131cf5450af8c88148197af…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Oct 19 11:40:54 2006 +0100 oledlg: Retrieve names from the OBJECTDESCRIPTOR structure. --- dlls/oledlg/pastespl.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 86 insertions(+), 0 deletions(-) diff --git a/dlls/oledlg/pastespl.c b/dlls/oledlg/pastespl.c index d4cdadc..ff3a8b5 100644 --- a/dlls/oledlg/pastespl.c +++ b/dlls/oledlg/pastespl.c @@ -20,6 +20,8 @@ #define COM_NO_WINDOWS_H #define COBJMACROS +#define NONAMELESSSTRUCT +#define NONAMELESSUNION #include <stdarg.h> @@ -43,6 +45,11 @@ typedef struct { OLEUIPASTESPECIALW *ps; DWORD flags; + WCHAR *source_name; + WCHAR *link_source_name; + WCHAR *type_name; + WCHAR *link_type_name; + LPOLESTR app_name; } ps_struct_t; static const struct ps_flag @@ -120,6 +127,73 @@ static inline WCHAR *strdupAtoW(const ch return ret; } +static inline WCHAR *strdupW(const WCHAR *str) +{ + DWORD len; + WCHAR *ret; + if(!str) return NULL; + len = lstrlenW(str) + 1; + ret = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + memcpy(ret, str, len * sizeof(WCHAR)); + return ret; +} + +static void get_descriptors(HWND hdlg, ps_struct_t *ps_struct) +{ + FORMATETC fmtetc; + STGMEDIUM stg; + + fmtetc.tymed = TYMED_HGLOBAL; + fmtetc.dwAspect = DVASPECT_CONTENT; + fmtetc.ptd = NULL; + fmtetc.lindex = -1; + + fmtetc.cfFormat = cf_object_descriptor; + if(IDataObject_GetData(ps_struct->ps->lpSrcDataObj, &fmtetc, &stg) == S_OK) + { + OBJECTDESCRIPTOR *obj_desc = GlobalLock(stg.u.hGlobal); + if(obj_desc->dwSrcOfCopy) + ps_struct->source_name = strdupW((WCHAR*)((char*)obj_desc + obj_desc->dwSrcOfCopy)); + if(obj_desc->dwFullUserTypeName) + ps_struct->type_name = strdupW((WCHAR*)((char*)obj_desc + obj_desc->dwFullUserTypeName)); + OleRegGetUserType(&obj_desc->clsid, USERCLASSTYPE_APPNAME, &ps_struct->app_name); + /* Get the icon here. If dwDrawAspect & DVASCPECT_ICON call GetData(CF_METAFILEPICT), otherwise + native calls OleGetIconFromClass(obj_desc->clsid) */ + GlobalUnlock(stg.u.hGlobal); + GlobalFree(stg.u.hGlobal); + } + else + { + /* Try to get some data using some of the other clipboard formats */ + } + + fmtetc.cfFormat = cf_link_src_descriptor; + if(IDataObject_GetData(ps_struct->ps->lpSrcDataObj, &fmtetc, &stg) == S_OK) + { + OBJECTDESCRIPTOR *obj_desc = GlobalLock(stg.u.hGlobal); + if(obj_desc->dwSrcOfCopy) + ps_struct->link_source_name = strdupW((WCHAR*)((char*)obj_desc + obj_desc->dwSrcOfCopy)); + if(obj_desc->dwFullUserTypeName) + ps_struct->link_type_name = strdupW((WCHAR*)((char*)obj_desc + obj_desc->dwFullUserTypeName)); + GlobalUnlock(stg.u.hGlobal); + GlobalFree(stg.u.hGlobal); + } + + if(ps_struct->source_name == NULL && ps_struct->link_source_name == NULL) + { + WCHAR buf[200]; + LoadStringW(OLEDLG_hInstance, IDS_PS_UNKNOWN_SRC, buf, sizeof(buf)/sizeof(WCHAR)); + ps_struct->source_name = strdupW(buf); + } + + if(ps_struct->type_name == NULL && ps_struct->link_type_name == NULL) + { + WCHAR buf[200]; + LoadStringW(OLEDLG_hInstance, IDS_PS_UNKNOWN_TYPE, buf, sizeof(buf)/sizeof(WCHAR)); + ps_struct->type_name = strdupW(buf); + } +} + static BOOL add_entry_to_lb(HWND hdlg, UINT id, OLEUIPASTEENTRYW *pe) { HWND hwnd = GetDlgItem(hdlg, id); @@ -397,6 +471,11 @@ static void update_structure(HWND hdlg, static void free_structure(ps_struct_t *ps_struct) { + HeapFree(GetProcessHeap(), 0, ps_struct->type_name); + HeapFree(GetProcessHeap(), 0, ps_struct->source_name); + HeapFree(GetProcessHeap(), 0, ps_struct->link_type_name); + HeapFree(GetProcessHeap(), 0, ps_struct->link_source_name); + CoTaskMemFree(ps_struct->app_name); HeapFree(GetProcessHeap(), 0, ps_struct); } @@ -429,6 +508,11 @@ static INT_PTR CALLBACK ps_dlg_proc(HWND { ps_struct = HeapAlloc(GetProcessHeap(), 0, sizeof(*ps_struct)); ps_struct->ps = (OLEUIPASTESPECIALW*)lp; + ps_struct->type_name = NULL; + ps_struct->source_name = NULL; + ps_struct->link_type_name = NULL; + ps_struct->link_source_name = NULL; + ps_struct->app_name = NULL; ps_struct->flags = ps_struct->ps->dwFlags; SetPropW(hdlg, prop_name, ps_struct); @@ -442,6 +526,8 @@ static INT_PTR CALLBACK ps_dlg_proc(HWND if(ps_struct->ps->lpszCaption) SetWindowTextW(hdlg, ps_struct->ps->lpszCaption); + get_descriptors(hdlg, ps_struct); + init_lists(hdlg, ps_struct); selection_change(hdlg, ps_struct);
1
0
0
0
Huw Davies : oledlg: Call the hook proc if present.
by Alexandre Julliard
20 Oct '06
20 Oct '06
Module: wine Branch: master Commit: ddaa4801a952bf1ac3478d5dbacd65d76145bbdd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ddaa4801a952bf1ac3478d5db…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Oct 19 11:27:07 2006 +0100 oledlg: Call the hook proc if present. --- dlls/oledlg/pastespl.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/oledlg/pastespl.c b/dlls/oledlg/pastespl.c index ece44fd..d4cdadc 100644 --- a/dlls/oledlg/pastespl.c +++ b/dlls/oledlg/pastespl.c @@ -415,6 +415,12 @@ static INT_PTR CALLBACK ps_dlg_proc(HWND { if(!ps_struct) return 0; + + if(ps_struct->ps->lpfnHook) + { + INT_PTR ret = ps_struct->ps->lpfnHook(hdlg, msg, wp, lp); + if(ret) return ret; + } } switch(msg) @@ -442,6 +448,8 @@ static INT_PTR CALLBACK ps_dlg_proc(HWND SetFocus(GetDlgItem(hdlg, IDC_PS_DISPLAYLIST)); + if(ps_struct->ps->lpfnHook) + ps_struct->ps->lpfnHook(hdlg, msg, 0, 0); return FALSE; /* use new focus */ } case WM_COMMAND:
1
0
0
0
Huw Davies : oledlg: Set initial focus to the display list.
by Alexandre Julliard
20 Oct '06
20 Oct '06
Module: wine Branch: master Commit: e898890241b9d617239423d36e22cad3d9e11fc3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e898890241b9d617239423d36…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Oct 19 11:24:17 2006 +0100 oledlg: Set initial focus to the display list. --- dlls/oledlg/pastespl.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/oledlg/pastespl.c b/dlls/oledlg/pastespl.c index d0c0e4c..ece44fd 100644 --- a/dlls/oledlg/pastespl.c +++ b/dlls/oledlg/pastespl.c @@ -440,7 +440,9 @@ static INT_PTR CALLBACK ps_dlg_proc(HWND selection_change(hdlg, ps_struct); - return TRUE; /* use default focus */ + SetFocus(GetDlgItem(hdlg, IDC_PS_DISPLAYLIST)); + + return FALSE; /* use new focus */ } case WM_COMMAND: switch(LOWORD(wp))
1
0
0
0
Huw Davies : oledlg: Handle paste / link mode change.
by Alexandre Julliard
20 Oct '06
20 Oct '06
Module: wine Branch: master Commit: 1d9e48c77e575b7f968785f252e7358e981187fa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1d9e48c77e575b7f968785f25…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Oct 19 11:21:38 2006 +0100 oledlg: Handle paste / link mode change. --- dlls/oledlg/pastespl.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/dlls/oledlg/pastespl.c b/dlls/oledlg/pastespl.c index 26f91e8..d0c0e4c 100644 --- a/dlls/oledlg/pastespl.c +++ b/dlls/oledlg/pastespl.c @@ -362,6 +362,23 @@ static void selection_change(HWND hdlg, update_result_text(hdlg, ps_struct); } +static void mode_change(HWND hdlg, ps_struct_t *ps_struct, UINT id) +{ + if(id == IDC_PS_PASTE) + { + ps_struct->flags &= ~PSF_SELECTPASTELINK; + ps_struct->flags |= PSF_SELECTPASTE; + } + else + { + ps_struct->flags &= ~PSF_SELECTPASTE; + ps_struct->flags |= PSF_SELECTPASTELINK; + } + + update_display_list(hdlg, id == IDC_PS_PASTE ? IDC_PS_PASTELIST : IDC_PS_PASTELINKLIST); + selection_change(hdlg, ps_struct); +} + static void post_help_msg(HWND hdlg, ps_struct_t *ps_struct) { PostMessageW(ps_struct->ps->hWndOwner, oleui_msg_help, (WPARAM)hdlg, IDD_PASTESPECIAL); @@ -437,6 +454,17 @@ static INT_PTR CALLBACK ps_dlg_proc(HWND default: return FALSE; } + case IDC_PS_PASTE: + case IDC_PS_PASTELINK: + switch(HIWORD(wp)) + { + case BN_CLICKED: + mode_change(hdlg, ps_struct, LOWORD(wp)); + return FALSE; + + default: + return FALSE; + } case IDC_OLEUIHELP: switch(HIWORD(wp)) {
1
0
0
0
← Newer
1
...
31
32
33
34
35
36
37
...
104
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
96
97
98
99
100
101
102
103
104
Results per page:
10
25
50
100
200