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
September 2007
----- 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
7 participants
787 discussions
Start a n
N
ew thread
Lionel Debroux : setupapi: Fix HeapFree of wrong pointer (found by Smatch).
by Alexandre Julliard
12 Sep '07
12 Sep '07
Module: wine Branch: master Commit: d7abb09b465097f1bd5b063d78f8d3fcc57c669f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d7abb09b465097f1bd5b063d7…
Author: Lionel Debroux <lionel_debroux(a)yahoo.fr> Date: Thu Sep 6 11:32:44 2007 +0200 setupapi: Fix HeapFree of wrong pointer (found by Smatch). --- dlls/setupapi/stringtable.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/setupapi/stringtable.c b/dlls/setupapi/stringtable.c index 7be6b18..985e777 100644 --- a/dlls/setupapi/stringtable.c +++ b/dlls/setupapi/stringtable.c @@ -86,7 +86,7 @@ StringTableInitialize(VOID) pStringTable->pSlots = MyMalloc(sizeof(TABLE_SLOT) * TABLE_DEFAULT_SIZE); if (pStringTable->pSlots == NULL) { - MyFree(pStringTable->pSlots); + MyFree(pStringTable); return NULL; } @@ -131,7 +131,7 @@ StringTableInitializeEx(DWORD dwMaxExtraDataSize, pStringTable->pSlots = MyMalloc(sizeof(TABLE_SLOT) * TABLE_DEFAULT_SIZE); if (pStringTable->pSlots == NULL) { - MyFree(pStringTable->pSlots); + MyFree(pStringTable); return NULL; }
1
0
0
0
Rob Shearman : mshtml: Implement IDM_HYPERLINK.
by Alexandre Julliard
12 Sep '07
12 Sep '07
Module: wine Branch: master Commit: 1fbedd92d453bb5547f03e307cfdd767fcd3f8f3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1fbedd92d453bb5547f03e307…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Wed Sep 12 10:41:49 2007 +0100 mshtml: Implement IDM_HYPERLINK. --- dlls/mshtml/En.rc | 14 +++ dlls/mshtml/editor.c | 216 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/mshtml/nsiface.idl | 66 ++++++++++++++ dlls/mshtml/resource.h | 6 ++ 4 files changed, 302 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=1fbedd92d453bb5547f03…
1
0
0
0
Rob Shearman : mshtml: Implement PersistStreamInit_IsDirty when in edit mode.
by Alexandre Julliard
12 Sep '07
12 Sep '07
Module: wine Branch: master Commit: 41a3b734f9468b4c3a3516eca9b8bc3d50db1d0b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=41a3b734f9468b4c3a3516eca…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Wed Sep 12 10:42:01 2007 +0100 mshtml: Implement PersistStreamInit_IsDirty when in edit mode. --- dlls/mshtml/editor.c | 12 ++++++++++++ dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/persist.c | 2 +- 3 files changed, 14 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c index 43c8b38..6f202e0 100644 --- a/dlls/mshtml/editor.c +++ b/dlls/mshtml/editor.c @@ -1163,3 +1163,15 @@ void init_editor(HTMLDocument *This) set_ns_fontname(This->nscontainer, "Times New Roman"); } + +HRESULT editor_is_dirty(HTMLDocument *This) +{ + PRBool modified; + + if(!This->nscontainer || !This->nscontainer->editor) + return S_FALSE; + + nsIEditor_GetDocumentModified(This->nscontainer->editor, &modified); + + return modified ? S_OK : S_FALSE; +} diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 1719714..79935a8 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -456,6 +456,7 @@ HRESULT editor_exec_copy(HTMLDocument*,DWORD,VARIANT*,VARIANT*); HRESULT editor_exec_cut(HTMLDocument*,DWORD,VARIANT*,VARIANT*); HRESULT editor_exec_paste(HTMLDocument*,DWORD,VARIANT*,VARIANT*); void handle_edit_load(HTMLDocument *This); +HRESULT editor_is_dirty(HTMLDocument*); extern DWORD mshtml_tls; diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index 3b606d6..9f74c91 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -600,7 +600,7 @@ static HRESULT WINAPI PersistStreamInit_IsDirty(IPersistStreamInit *iface) TRACE("(%p)\n", This); if(This->usermode == EDITMODE) - FIXME("Unimplemented in edit mode\n"); + return editor_is_dirty(This); return S_FALSE; }
1
0
0
0
Rob Shearman : mshtml: Store the nsIEditor interface in the NSContainer object for use in implementing editor commands .
by Alexandre Julliard
12 Sep '07
12 Sep '07
Module: wine Branch: master Commit: 006d9f940d6893ebb9ff00a41433291c7bea91fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=006d9f940d6893ebb9ff00a41…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Wed Sep 12 10:41:36 2007 +0100 mshtml: Store the nsIEditor interface in the NSContainer object for use in implementing editor commands. --- dlls/mshtml/editor.c | 2 +- dlls/mshtml/mshtml_private.h | 3 +- dlls/mshtml/nsembed.c | 36 ++++++++++------ dlls/mshtml/nsiface.idl | 94 +++++++++++++++++++++++++++++++++++++++++- 4 files changed, 119 insertions(+), 16 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=006d9f940d6893ebb9ff0…
1
0
0
0
Rob Shearman : ole32: Fix the default unload delay to depend on the threading model of the component loaded .
by Alexandre Julliard
12 Sep '07
12 Sep '07
Module: wine Branch: master Commit: 97f389451da03e9f6d0cbb9facdda0327a66380d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=97f389451da03e9f6d0cbb9fa…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Wed Sep 12 10:03:35 2007 +0100 ole32: Fix the default unload delay to depend on the threading model of the component loaded. --- dlls/ole32/compobj.c | 40 ++++++++++++++++++++++++++++------------ 1 files changed, 28 insertions(+), 12 deletions(-) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index e0bcea8..b4022e7 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -182,12 +182,14 @@ struct apartment_loaded_dll struct list entry; OpenDll *dll; DWORD unload_time; + BOOL multi_threaded; }; static const WCHAR wszAptWinClass[] = {'O','l','e','M','a','i','n','T','h','r','e','a','d','W','n','d','C','l','a','s','s',' ', '0','x','#','#','#','#','#','#','#','#',' ',0}; static LRESULT CALLBACK apartment_wndproc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); static HRESULT apartment_getclassobject(struct apartment *apt, LPCWSTR dllpath, + BOOL apartment_threaded, REFCLSID rclsid, REFIID riid, void **ppv); static void apartment_freeunusedlibraries(struct apartment *apt, DWORD delay); @@ -501,6 +503,7 @@ struct host_object_params HANDLE event; /* event signalling when ready for multi-threaded case */ HRESULT hr; /* result for multi-threaded case */ IStream *stream; /* stream that the object will be marshaled into */ + BOOL apartment_threaded; /* is the component purely apartment-threaded? */ }; static HRESULT apartment_hostobject(struct apartment *apt, @@ -520,7 +523,8 @@ static HRESULT apartment_hostobject(struct apartment *apt, return REGDB_E_CLASSNOTREG; } - hr = apartment_getclassobject(apt, dllpath, ¶ms->clsid, ¶ms->iid, (void **)&object); + hr = apartment_getclassobject(apt, dllpath, params->apartment_threaded, + ¶ms->clsid, ¶ms->iid, (void **)&object); if (FAILED(hr)) return hr; @@ -678,6 +682,7 @@ static HRESULT apartment_hostobject_in_hostapt(struct apartment *apt, BOOL multi hr = CreateStreamOnHGlobal(NULL, TRUE, ¶ms.stream); if (FAILED(hr)) return hr; + params.apartment_threaded = !multi_threaded; if (multi_threaded) { params.hr = S_OK; @@ -743,6 +748,7 @@ void apartment_joinmta(void) } static HRESULT apartment_getclassobject(struct apartment *apt, LPCWSTR dllpath, + BOOL apartment_threaded, REFCLSID rclsid, REFIID riid, void **ppv) { static const WCHAR wszOle32[] = {'o','l','e','3','2','.','d','l','l',0}; @@ -781,6 +787,7 @@ static HRESULT apartment_getclassobject(struct apartment *apt, LPCWSTR dllpath, if (SUCCEEDED(hr)) { apartment_loaded_dll->unload_time = 0; + apartment_loaded_dll->multi_threaded = FALSE; hr = COMPOBJ_DllList_Add( dllpath, &apartment_loaded_dll->dll ); if (FAILED(hr)) HeapFree(GetProcessHeap(), 0, apartment_loaded_dll); @@ -796,6 +803,11 @@ static HRESULT apartment_getclassobject(struct apartment *apt, LPCWSTR dllpath, if (SUCCEEDED(hr)) { + /* one component being multi-threaded overrides any number of + * apartment-threaded components */ + if (!apartment_threaded) + apartment_loaded_dll->multi_threaded = TRUE; + TRACE("calling DllGetClassObject %p\n", apartment_loaded_dll->dll->DllGetClassObject); /* OK: get the ClassObject */ hr = apartment_loaded_dll->dll->DllGetClassObject(rclsid, riid, ppv); @@ -815,14 +827,24 @@ static void apartment_freeunusedlibraries(struct apartment *apt, DWORD delay) { if (entry->dll->DllCanUnloadNow && (entry->dll->DllCanUnloadNow() == S_OK)) { - if (!delay || (entry->unload_time && (entry->unload_time < GetTickCount()))) + DWORD real_delay = delay; + + if (real_delay == INFINITE) + { + if (entry->multi_threaded) + real_delay = 10 * 60 * 1000; /* 10 minutes */ + else + real_delay = 0; + } + + if (!real_delay || (entry->unload_time && (entry->unload_time < GetTickCount()))) { list_remove(&entry->entry); COMPOBJ_DllList_ReleaseRef(entry->dll, TRUE); HeapFree(GetProcessHeap(), 0, entry); } else - entry->unload_time = GetTickCount() + delay; + entry->unload_time = GetTickCount() + real_delay; } else if (entry->unload_time) entry->unload_time = 0; @@ -2085,7 +2107,9 @@ static HRESULT get_inproc_class_object(APARTMENT *apt, HKEY hkeydll, return REGDB_E_CLASSNOTREG; } - return apartment_getclassobject(apt, dllpath, rclsid, riid, ppv); + return apartment_getclassobject(apt, dllpath, + !strcmpiW(threading_model, wszApartment), + rclsid, riid, ppv); } /*********************************************************************** @@ -2517,14 +2541,6 @@ void WINAPI CoFreeUnusedLibrariesEx(DWORD dwUnloadDelay, DWORD dwReserved) return; } - if (dwUnloadDelay == INFINITE) - { - if (apt->multi_threaded) - dwUnloadDelay = 10 * 60 * 1000; /* 10 minutes */ - else - dwUnloadDelay = 0; - } - apartment_freeunusedlibraries(apt, dwUnloadDelay); }
1
0
0
0
Rob Shearman : ole32: Implement CoFreeUnusedLibrariesEx.
by Alexandre Julliard
12 Sep '07
12 Sep '07
Module: wine Branch: master Commit: 5ffe867dc7194b7741fa9fd1aed3eb859d3a8257 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ffe867dc7194b7741fa9fd1a…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Wed Sep 12 10:02:08 2007 +0100 ole32: Implement CoFreeUnusedLibrariesEx. Fix CoFreeUnusedLibraries to use a delay of 10 minutes when used with multi-threaded apartments. --- dlls/ole32/compobj.c | 64 +++++++++++++++++++++++++++++++++++++++---------- dlls/ole32/ole32.spec | 1 + include/objbase.h | 1 + 3 files changed, 53 insertions(+), 13 deletions(-) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 662b42a..e0bcea8 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -181,6 +181,7 @@ struct apartment_loaded_dll { struct list entry; OpenDll *dll; + DWORD unload_time; }; static const WCHAR wszAptWinClass[] = {'O','l','e','M','a','i','n','T','h','r','e','a','d','W','n','d','C','l','a','s','s',' ', @@ -188,7 +189,7 @@ static const WCHAR wszAptWinClass[] = {'O','l','e','M','a','i','n','T','h','r',' static LRESULT CALLBACK apartment_wndproc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); static HRESULT apartment_getclassobject(struct apartment *apt, LPCWSTR dllpath, REFCLSID rclsid, REFIID riid, void **ppv); -static void apartment_freeunusedlibraries(struct apartment *apt); +static void apartment_freeunusedlibraries(struct apartment *apt, DWORD delay); static HRESULT COMPOBJ_DllList_Add(LPCWSTR library_name, OpenDll **ret); static OpenDll *COMPOBJ_DllList_Get(LPCWSTR library_name); @@ -403,7 +404,7 @@ DWORD apartment_release(struct apartment *apt) if (apt->filter) IUnknown_Release(apt->filter); /* free as many unused libraries as possible... */ - apartment_freeunusedlibraries(apt); + apartment_freeunusedlibraries(apt, 0); /* ... and free the memory for the apartment loaded dll entry and * release the dll list reference without freeing the library for the @@ -779,6 +780,7 @@ static HRESULT apartment_getclassobject(struct apartment *apt, LPCWSTR dllpath, hr = E_OUTOFMEMORY; if (SUCCEEDED(hr)) { + apartment_loaded_dll->unload_time = 0; hr = COMPOBJ_DllList_Add( dllpath, &apartment_loaded_dll->dll ); if (FAILED(hr)) HeapFree(GetProcessHeap(), 0, apartment_loaded_dll); @@ -805,7 +807,7 @@ static HRESULT apartment_getclassobject(struct apartment *apt, LPCWSTR dllpath, return hr; } -static void apartment_freeunusedlibraries(struct apartment *apt) +static void apartment_freeunusedlibraries(struct apartment *apt, DWORD delay) { struct apartment_loaded_dll *entry, *next; EnterCriticalSection(&apt->cs); @@ -813,10 +815,17 @@ static void apartment_freeunusedlibraries(struct apartment *apt) { if (entry->dll->DllCanUnloadNow && (entry->dll->DllCanUnloadNow() == S_OK)) { - list_remove(&entry->entry); - COMPOBJ_DllList_ReleaseRef(entry->dll, TRUE); - HeapFree(GetProcessHeap(), 0, entry); + if (!delay || (entry->unload_time && (entry->unload_time < GetTickCount()))) + { + list_remove(&entry->entry); + COMPOBJ_DllList_ReleaseRef(entry->dll, TRUE); + HeapFree(GetProcessHeap(), 0, entry); + } + else + entry->unload_time = GetTickCount() + delay; } + else if (entry->unload_time) + entry->unload_time = 0; } LeaveCriticalSection(&apt->cs); } @@ -2482,13 +2491,16 @@ void WINAPI CoFreeAllLibraries(void) /* NOP */ } - /*********************************************************************** - * CoFreeUnusedLibraries [OLE32.@] - * CoFreeUnusedLibraries [COMPOBJ.17] + * CoFreeUnusedLibrariesEx [OLE32.@] * - * Frees any unused libraries. Unused are identified as those that return - * S_OK from their DllCanUnloadNow function. + * Frees any previously unused libraries whose delay has expired and marks + * currently unused libraries for unloading. Unused are identified as those that + * return S_OK from their DllCanUnloadNow function. + * + * PARAMS + * dwUnloadDelay [I] Unload delay in milliseconds. + * dwReserved [I] Reserved. Set to 0. * * RETURNS * Nothing. @@ -2496,7 +2508,7 @@ void WINAPI CoFreeAllLibraries(void) * SEE ALSO * CoLoadLibrary, CoFreeAllLibraries, CoFreeLibrary */ -void WINAPI CoFreeUnusedLibraries(void) +void WINAPI CoFreeUnusedLibrariesEx(DWORD dwUnloadDelay, DWORD dwReserved) { struct apartment *apt = COM_CurrentApt(); if (!apt) @@ -2505,7 +2517,33 @@ void WINAPI CoFreeUnusedLibraries(void) return; } - apartment_freeunusedlibraries(apt); + if (dwUnloadDelay == INFINITE) + { + if (apt->multi_threaded) + dwUnloadDelay = 10 * 60 * 1000; /* 10 minutes */ + else + dwUnloadDelay = 0; + } + + apartment_freeunusedlibraries(apt, dwUnloadDelay); +} + +/*********************************************************************** + * CoFreeUnusedLibraries [OLE32.@] + * CoFreeUnusedLibraries [COMPOBJ.17] + * + * Frees any unused libraries. Unused are identified as those that return + * S_OK from their DllCanUnloadNow function. + * + * RETURNS + * Nothing. + * + * SEE ALSO + * CoLoadLibrary, CoFreeAllLibraries, CoFreeLibrary + */ +void WINAPI CoFreeUnusedLibraries(void) +{ + CoFreeUnusedLibrariesEx(INFINITE, 0); } /*********************************************************************** diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index e018b0f..0b62995 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -20,6 +20,7 @@ @ stdcall CoFreeAllLibraries() @ stdcall CoFreeLibrary(long) @ stdcall CoFreeUnusedLibraries() +@ stdcall CoFreeUnusedLibrariesEx(long long) @ stdcall CoGetCallContext(ptr ptr) @ stub CoGetCallerTID @ stdcall CoGetClassObject(ptr long ptr ptr ptr) diff --git a/include/objbase.h b/include/objbase.h index 4d94c05..33fe4c9 100644 --- a/include/objbase.h +++ b/include/objbase.h @@ -329,6 +329,7 @@ HINSTANCE WINAPI CoLoadLibrary(LPOLESTR lpszLibName, BOOL bAutoFree); void WINAPI CoFreeAllLibraries(void); void WINAPI CoFreeLibrary(HINSTANCE hLibrary); void WINAPI CoFreeUnusedLibraries(void); +void WINAPI CoFreeUnusedLibrariesEx(DWORD dwUnloadDelay, DWORD dwReserved); HRESULT WINAPI CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv); HRESULT WINAPI CoCreateInstanceEx(REFCLSID rclsid,
1
0
0
0
Alexander Nicolaysen Sørnes : wordpad: Add initial print preview support.
by Alexandre Julliard
12 Sep '07
12 Sep '07
Module: wine Branch: master Commit: cd64bf8e4d6880605dd096714dbb9e8dbc4deb65 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cd64bf8e4d6880605dd096714…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Thu Aug 23 15:09:49 2007 +0200 wordpad: Add initial print preview support. --- programs/wordpad/De.rc | 9 ++ programs/wordpad/En.rc | 9 ++ programs/wordpad/Fr.rc | 9 ++ programs/wordpad/Hu.rc | 9 ++ programs/wordpad/Ko.rc | 9 ++ programs/wordpad/Nl.rc | 9 ++ programs/wordpad/No.rc | 9 ++ programs/wordpad/Pl.rc | 9 ++ programs/wordpad/Ru.rc | 9 ++ programs/wordpad/Tr.rc | 9 ++ programs/wordpad/resource.h | 17 +++- programs/wordpad/wordpad.c | 298 ++++++++++++++++++++++++++++++++++++++++-- 12 files changed, 389 insertions(+), 16 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=cd64bf8e4d6880605dd09…
1
0
0
0
Alexander Nicolaysen Sørnes : wordpad: Add view options dialog.
by Alexandre Julliard
12 Sep '07
12 Sep '07
Module: wine Branch: master Commit: 7fa0590e5a7d61dc8d3035c86c266ac6da9d9603 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7fa0590e5a7d61dc8d3035c86…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Thu Aug 23 15:08:41 2007 +0200 wordpad: Add view options dialog. --- programs/wordpad/De.rc | 24 ++++ programs/wordpad/En.rc | 23 +++ programs/wordpad/Fr.rc | 24 ++++ programs/wordpad/Hu.rc | 24 ++++ programs/wordpad/Ko.rc | 24 ++++ programs/wordpad/Nl.rc | 24 ++++ programs/wordpad/No.rc | 24 ++++ programs/wordpad/Pl.rc | 24 ++++ programs/wordpad/Ru.rc | 24 ++++ programs/wordpad/Tr.rc | 24 ++++ programs/wordpad/resource.h | 19 +++- programs/wordpad/wordpad.c | 310 +++++++++++++++++++++++++++++++++++-------- 12 files changed, 514 insertions(+), 54 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=7fa0590e5a7d61dc8d303…
1
0
0
0
Alexander Nicolaysen Sørnes : wordpad: Add about window.
by Alexandre Julliard
12 Sep '07
12 Sep '07
Module: wine Branch: master Commit: dfb29f4d15dde9e959dcb9acc586cc34462ce80a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dfb29f4d15dde9e959dcb9acc…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Thu Aug 23 15:05:40 2007 +0200 wordpad: Add about window. --- programs/wordpad/De.rc | 4 ++++ programs/wordpad/En.rc | 4 ++++ programs/wordpad/Fr.rc | 4 ++++ programs/wordpad/Hu.rc | 4 ++++ programs/wordpad/Ko.rc | 4 ++++ programs/wordpad/Nl.rc | 4 ++++ programs/wordpad/No.rc | 4 ++++ programs/wordpad/Pl.rc | 4 ++++ programs/wordpad/Ru.rc | 4 ++++ programs/wordpad/Tr.rc | 4 ++++ programs/wordpad/resource.h | 2 ++ programs/wordpad/wordpad.c | 11 +++++++++++ 12 files changed, 53 insertions(+), 0 deletions(-) diff --git a/programs/wordpad/De.rc b/programs/wordpad/De.rc index d25a034..2ea2a75 100644 --- a/programs/wordpad/De.rc +++ b/programs/wordpad/De.rc @@ -79,6 +79,10 @@ BEGIN MENUITEM "&PostIt-Notiz\tCtrl+2", ID_BACK_2 END END + POPUP "&Help" + BEGIN + MENUITEM "&About Wine Wordpad" ID_ABOUT + END END IDM_POPUP MENU DISCARDABLE diff --git a/programs/wordpad/En.rc b/programs/wordpad/En.rc index 2ac43e3..b6f971e 100644 --- a/programs/wordpad/En.rc +++ b/programs/wordpad/En.rc @@ -79,6 +79,10 @@ BEGIN MENUITEM "&PostThat yellowish\tCtrl+2", ID_BACK_2 END END + POPUP "&Help" + BEGIN + MENUITEM "&About Wine Wordpad" ID_ABOUT + END END IDM_POPUP MENU DISCARDABLE diff --git a/programs/wordpad/Fr.rc b/programs/wordpad/Fr.rc index b343de7..c2802d5 100644 --- a/programs/wordpad/Fr.rc +++ b/programs/wordpad/Fr.rc @@ -79,6 +79,10 @@ BEGIN MENUITEM "&Jaunasse\tCtrl+2", ID_BACK_2 END END + POPUP "&Help" + BEGIN + MENUITEM "&About Wine Wordpad" ID_ABOUT + END END IDM_POPUP MENU DISCARDABLE diff --git a/programs/wordpad/Hu.rc b/programs/wordpad/Hu.rc index 142efee..f31f6bb 100644 --- a/programs/wordpad/Hu.rc +++ b/programs/wordpad/Hu.rc @@ -79,6 +79,10 @@ BEGIN MENUITEM "&S�rg�ban k�rem\tCtrl+2", ID_BACK_2 END END + POPUP "&Help" + BEGIN + MENUITEM "&About Wine Wordpad" ID_ABOUT + END END IDM_POPUP MENU DISCARDABLE diff --git a/programs/wordpad/Ko.rc b/programs/wordpad/Ko.rc index b3edd53..fbfb8b0 100644 --- a/programs/wordpad/Ko.rc +++ b/programs/wordpad/Ko.rc @@ -80,6 +80,10 @@ BEGIN MENUITEM "���������(&P)\tCtrl+2", ID_BACK_2 END END + POPUP "&Help" + BEGIN + MENUITEM "&About Wine Wordpad" ID_ABOUT + END END IDM_POPUP MENU DISCARDABLE diff --git a/programs/wordpad/Nl.rc b/programs/wordpad/Nl.rc index 58193ef..86cae2c 100644 --- a/programs/wordpad/Nl.rc +++ b/programs/wordpad/Nl.rc @@ -79,6 +79,10 @@ BEGIN MENUITEM "&Geeltje\tCtrl+2", ID_BACK_2 END END + POPUP "&Help" + BEGIN + MENUITEM "&About Wine Wordpad" ID_ABOUT + END END IDM_POPUP MENU DISCARDABLE diff --git a/programs/wordpad/No.rc b/programs/wordpad/No.rc index a135909..5632559 100644 --- a/programs/wordpad/No.rc +++ b/programs/wordpad/No.rc @@ -79,6 +79,10 @@ BEGIN MENUITEM "Merkela&pp-gult\tCtrl+2", ID_BACK_2 END END + POPUP "&Hjelp" + BEGIN + MENUITEM "&Om Wine Wordpad" ID_ABOUT + END END IDM_POPUP MENU DISCARDABLE diff --git a/programs/wordpad/Pl.rc b/programs/wordpad/Pl.rc index 7232aaa..9fe6121 100644 --- a/programs/wordpad/Pl.rc +++ b/programs/wordpad/Pl.rc @@ -80,6 +80,10 @@ BEGIN MENUITEM "&PostThat (��ty)\tCtrl+2", ID_BACK_2 END END + POPUP "&Help" + BEGIN + MENUITEM "&About Wine Wordpad" ID_ABOUT + END END IDM_POPUP MENU DISCARDABLE diff --git a/programs/wordpad/Ru.rc b/programs/wordpad/Ru.rc index 78d2212..8c44f94 100644 --- a/programs/wordpad/Ru.rc +++ b/programs/wordpad/Ru.rc @@ -78,6 +78,10 @@ BEGIN MENUITEM "&���������� PostThat\tCtrl+2", ID_BACK_2 END END + POPUP "&Help" + BEGIN + MENUITEM "&About Wine Wordpad" ID_ABOUT + END END IDM_POPUP MENU DISCARDABLE diff --git a/programs/wordpad/Tr.rc b/programs/wordpad/Tr.rc index b5e0c5e..9b4c454 100644 --- a/programs/wordpad/Tr.rc +++ b/programs/wordpad/Tr.rc @@ -82,6 +82,10 @@ BEGIN MENUITEM "&Sar�mt�rak\tCtrl+2", ID_BACK_2 END END + POPUP "&Help" + BEGIN + MENUITEM "&About Wine Wordpad" ID_ABOUT + END END IDM_POPUP MENU DISCARDABLE diff --git a/programs/wordpad/resource.h b/programs/wordpad/resource.h index 75a18e5..d742339 100644 --- a/programs/wordpad/resource.h +++ b/programs/wordpad/resource.h @@ -85,6 +85,8 @@ #define ID_PARAFORMAT 1601 #define ID_TABSTOPS 1602 +#define ID_ABOUT 1603 + #define IDC_STATUSBAR 2000 #define IDC_EDITOR 2001 #define IDC_TOOLBAR 2002 diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c index 8b0ca5a..8c3d2a2 100644 --- a/programs/wordpad/wordpad.c +++ b/programs/wordpad/wordpad.c @@ -1095,6 +1095,13 @@ static void dialog_print(void) } } +static void dialog_about(void) +{ + HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtr(hMainWnd, GWLP_HINSTANCE); + HICON icon = LoadIconW(hInstance, MAKEINTRESOURCEW(IDI_WORDPAD)); + ShellAboutW(hMainWnd, wszAppTitle, 0, icon); +} + static void HandleCommandLine(LPWSTR cmdline) { WCHAR delimiter; @@ -2197,6 +2204,10 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam) } break; + case ID_ABOUT: + dialog_about(); + break; + default: SendMessageW(hwndEditor, WM_COMMAND, wParam, lParam); break;
1
0
0
0
Alexander Nicolaysen Sørnes : wordpad: Add context menu.
by Alexandre Julliard
12 Sep '07
12 Sep '07
Module: wine Branch: master Commit: 5bc0dfc28c5b8c023710bb57a277a51fb1edf3cb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5bc0dfc28c5b8c023710bb57a…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Thu Aug 23 15:05:23 2007 +0200 wordpad: Add context menu. --- programs/wordpad/De.rc | 13 +++++++++++++ programs/wordpad/En.rc | 13 +++++++++++++ programs/wordpad/Fr.rc | 13 +++++++++++++ programs/wordpad/Hu.rc | 13 +++++++++++++ programs/wordpad/Ko.rc | 13 +++++++++++++ programs/wordpad/Nl.rc | 13 +++++++++++++ programs/wordpad/No.rc | 13 +++++++++++++ programs/wordpad/Pl.rc | 13 +++++++++++++ programs/wordpad/Ru.rc | 14 ++++++++++++++ programs/wordpad/Tr.rc | 13 +++++++++++++ programs/wordpad/resource.h | 2 ++ programs/wordpad/wordpad.c | 31 +++++++++++++++++++++++++++++++ 12 files changed, 164 insertions(+), 0 deletions(-) diff --git a/programs/wordpad/De.rc b/programs/wordpad/De.rc index 39ff38f..d25a034 100644 --- a/programs/wordpad/De.rc +++ b/programs/wordpad/De.rc @@ -81,6 +81,19 @@ BEGIN END END +IDM_POPUP MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "Aus&schneiden", ID_EDIT_CUT + MENUITEM "&Kopieren", ID_EDIT_COPY + MENUITEM "&Einf�gen", ID_EDIT_PASTE + MENUITEM SEPARATOR + MENUITEM "&Bullet points" ID_BULLET + MENUITEM "&Paragraph . . ." ID_PARAFORMAT + END +END + IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Date and time" diff --git a/programs/wordpad/En.rc b/programs/wordpad/En.rc index 835cb01..2ac43e3 100644 --- a/programs/wordpad/En.rc +++ b/programs/wordpad/En.rc @@ -81,6 +81,19 @@ BEGIN END END +IDM_POPUP MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "Cu&t", ID_EDIT_CUT + MENUITEM "&Copy", ID_EDIT_COPY + MENUITEM "&Paste", ID_EDIT_PASTE + MENUITEM SEPARATOR + MENUITEM "&Bullet points" ID_BULLET + MENUITEM "&Paragraph . . ." ID_PARAFORMAT + END +END + IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Date and time" diff --git a/programs/wordpad/Fr.rc b/programs/wordpad/Fr.rc index 1a0d6a2..b343de7 100644 --- a/programs/wordpad/Fr.rc +++ b/programs/wordpad/Fr.rc @@ -81,6 +81,19 @@ BEGIN END END +IDM_POPUP MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "&Couper", ID_EDIT_CUT + MENUITEM "Co&pier", ID_EDIT_COPY + MENUITEM "C&oller", ID_EDIT_PASTE + MENUITEM SEPARATOR + MENUITEM "&Bullet points" ID_BULLET + MENUITEM "&Paragraph . . ." ID_PARAFORMAT + END +END + IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Date and time" diff --git a/programs/wordpad/Hu.rc b/programs/wordpad/Hu.rc index e2ac6e5..142efee 100644 --- a/programs/wordpad/Hu.rc +++ b/programs/wordpad/Hu.rc @@ -81,6 +81,19 @@ BEGIN END END +IDM_POPUP MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "Kiv&�g�s\tCtrl+X", ID_EDIT_CUT + MENUITEM "M�&sol�s\tCtrl+C", ID_EDIT_COPY + MENUITEM "&Beilleszt�s\tCtrl+V", ID_EDIT_PASTE + MENUITEM SEPARATOR + MENUITEM "&Bullet points" ID_BULLET + MENUITEM "&Paragraph . . ." ID_PARAFORMAT + END +END + IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Date and time" diff --git a/programs/wordpad/Ko.rc b/programs/wordpad/Ko.rc index f51a8da..b3edd53 100644 --- a/programs/wordpad/Ko.rc +++ b/programs/wordpad/Ko.rc @@ -82,6 +82,19 @@ BEGIN END END +IDM_POPUP MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "�߶�(&T)", ID_EDIT_CUT + MENUITEM "����(&C)", ID_EDIT_COPY + MENUITEM "�ٿ��ֱ�(&P)", ID_EDIT_PASTE + MENUITEM SEPARATOR + MENUITEM "&Bullet points" ID_BULLET + MENUITEM "&Paragraph . . ." ID_PARAFORMAT + END +END + IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "��¥�� �ð�" diff --git a/programs/wordpad/Nl.rc b/programs/wordpad/Nl.rc index 6416322..58193ef 100644 --- a/programs/wordpad/Nl.rc +++ b/programs/wordpad/Nl.rc @@ -81,6 +81,19 @@ BEGIN END END +IDM_POPUP MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "K&nippen", ID_EDIT_CUT + MENUITEM "&Kopieren", ID_EDIT_COPY + MENUITEM "&Plakken", ID_EDIT_PASTE + MENUITEM SEPARATOR + MENUITEM "&Bullet points" ID_BULLET + MENUITEM "&Paragraph . . ." ID_PARAFORMAT + END +END + IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Date and time" diff --git a/programs/wordpad/No.rc b/programs/wordpad/No.rc index 5c980ce..a135909 100644 --- a/programs/wordpad/No.rc +++ b/programs/wordpad/No.rc @@ -81,6 +81,19 @@ BEGIN END END +IDM_POPUP MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "Klipp u&t" ID_EDIT_CUT + MENUITEM "&Kopier" ID_EDIT_COPY + MENUITEM "&Lim inn" ID_EDIT_PASTE + MENUITEM SEPARATOR + MENUITEM "&Punktmerking" ID_BULLET + MENUITEM "&Avsnitt . . ." ID_PARAFORMAT + END +END + IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Dato og klokkeslett" diff --git a/programs/wordpad/Pl.rc b/programs/wordpad/Pl.rc index 7812a79..7232aaa 100644 --- a/programs/wordpad/Pl.rc +++ b/programs/wordpad/Pl.rc @@ -82,6 +82,19 @@ BEGIN END END +IDM_POPUP MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "Wy&tnij", ID_EDIT_CUT + MENUITEM "&Kopiuj", ID_EDIT_COPY + MENUITEM "Wkl&ej", ID_EDIT_PASTE + MENUITEM SEPARATOR + MENUITEM "&Bullet points" ID_BULLET + MENUITEM "&Paragraph . . ." ID_PARAFORMAT + END +END + IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Date and time" diff --git a/programs/wordpad/Ru.rc b/programs/wordpad/Ru.rc index ae43e35..78d2212 100644 --- a/programs/wordpad/Ru.rc +++ b/programs/wordpad/Ru.rc @@ -40,6 +40,7 @@ BEGIN MENUITEM SEPARATOR MENUITEM "&��������\tCtrl+X", ID_EDIT_CUT MENUITEM "&����������\tCtrl+C", ID_EDIT_COPY + MENUITEM "&Paste\tCtrl+V", ID_EDIT_PASTE MENUITEM SEPARATOR MENUITEM "&Find . . .\tCrtl+F", ID_FIND MENUITEM "Find &next\tF3", ID_FIND_NEXT @@ -79,6 +80,19 @@ BEGIN END END +IDM_POPUP MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "&��������\tCtrl+X", ID_EDIT_CUT + MENUITEM "&����������\tCtrl+C", ID_EDIT_COPY + MENUITEM "&Paste", ID_EDIT_PASTE + MENUITEM SEPARATOR + MENUITEM "&Bullet points" ID_BULLET + MENUITEM "&Paragraph . . ." ID_PARAFORMAT + END +END + IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Date and time" diff --git a/programs/wordpad/Tr.rc b/programs/wordpad/Tr.rc index 2cd1edf..b5e0c5e 100644 --- a/programs/wordpad/Tr.rc +++ b/programs/wordpad/Tr.rc @@ -84,6 +84,19 @@ BEGIN END END +IDM_POPUP MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "Ke&s", ID_EDIT_CUT + MENUITEM "&Kopyala", ID_EDIT_COPY + MENUITEM "Ya&p��t�r", ID_EDIT_PASTE + MENUITEM SEPARATOR + MENUITEM "&Bullet points" ID_BULLET + MENUITEM "&Paragraph . . ." ID_PARAFORMAT + END +END + IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Date and time" diff --git a/programs/wordpad/resource.h b/programs/wordpad/resource.h index 9264cd8..75a18e5 100644 --- a/programs/wordpad/resource.h +++ b/programs/wordpad/resource.h @@ -104,6 +104,8 @@ #define IDD_PARAFORMAT 2102 #define IDD_TABSTOPS 2103 +#define IDM_POPUP 2200 + #define IDB_TOOLBAR 100 #define IDB_FORMATBAR 101 diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c index 03f9391..8b0ca5a 100644 --- a/programs/wordpad/wordpad.c +++ b/programs/wordpad/wordpad.c @@ -61,6 +61,7 @@ static const WCHAR var_pagemargin[] = {'P','a','g','e','M','a','r','g','i','n',0 static HWND hMainWnd; static HWND hEditorWnd; static HWND hFindWnd; +static HMENU hPopupMenu; static UINT ID_FINDMSGSTRING; @@ -1657,6 +1658,29 @@ static INT_PTR CALLBACK tabstops_proc(HWND hWnd, UINT message, WPARAM wParam, LP return FALSE; } +static int context_menu(LPARAM lParam) +{ + int x = (int)(short)LOWORD(lParam); + int y = (int)(short)HIWORD(lParam); + HMENU hPop = GetSubMenu(hPopupMenu, 0); + + if(x == -1) + { + int from = 0, to = 0; + POINTL pt; + SendMessageW(hEditorWnd, EM_GETSEL, (WPARAM)&from, (LPARAM)&to); + SendMessageW(hEditorWnd, EM_POSFROMCHAR, (WPARAM)&pt, (LPARAM)to); + ClientToScreen(hEditorWnd, (POINT*)&pt); + x = pt.x; + y = pt.y; + } + + TrackPopupMenu(hPop, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RIGHTBUTTON, + x, y, 0, hMainWnd, 0); + + return 0; +} + static LRESULT OnCreate( HWND hWnd, WPARAM wParam, LPARAM lParam) { HWND hToolBarWnd, hFormatBarWnd, hReBarWnd; @@ -2330,6 +2354,12 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara case WM_SIZE: return OnSize( hWnd, wParam, lParam ); + case WM_CONTEXTMENU: + if((HWND)wParam == hEditorWnd) + return context_menu(lParam); + else + return DefWindowProcW(hWnd, msg, wParam, lParam); + case WM_DROPFILES: { WCHAR file[MAX_PATH]; @@ -2381,6 +2411,7 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdPar set_caption(NULL); set_bar_states(); + hPopupMenu = LoadMenuW(hInstance, MAKEINTRESOURCEW(IDM_POPUP)); HandleCommandLine(GetCommandLineW());
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
79
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
Results per page:
10
25
50
100
200