ReactOS.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
2024
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
List overview
Download
Ros-diffs
April 2007
----- 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
ros-diffs@reactos.org
19 participants
380 discussions
Start a n
N
ew thread
[janderwald] 26473: - update polish translation by Groblewicz (xxrogers@users.sourceforge.net) See issue #2194 for more details.
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Apr 23 19:22:38 2007 New Revision: 26473 URL:
http://svn.reactos.org/svn/reactos?rev=26473&view=rev
Log: - update polish translation by Groblewicz (xxrogers(a)users.sourceforge.net) See issue #2194 for more details. Modified: trunk/reactos/dll/cpl/main/lang/pl-PL.rc Modified: trunk/reactos/dll/cpl/main/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/pl-PL.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/pl-PL.rc (original) +++ trunk/reactos/dll/cpl/main/lang/pl-PL.rc Mon Apr 23 19:22:38 2007 @@ -1,5 +1,5 @@ /* - * translated by xrogers + * translation by xrogers * xxrogers(a)users.sourceforge.net *
https://sourceforge.net/projects/reactospl
*/ @@ -13,7 +13,7 @@ BEGIN GROUPBOX "Powtarzanie znaku", -1, 5, 5, 230, 130 ICON -1, IDC_ICON_REPEAT_DELAY, 15, 15, 15, 15 - LTEXT "&opónienie powtarzania:", -1, 40, 15, 50, 10 + LTEXT "&Opónienie powtarzania:", -1, 40, 15, 50, 10 LTEXT "Du¿e", -1, 40, 30, 20, 10 LTEXT "Ma³e", -1, 200, 30, 20, 10 CONTROL "",IDC_SLIDER_REPEAT_DELAY, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 65, 30, 130, 17 @@ -167,10 +167,10 @@ IDS_HAND "Wybór ³¹cza" IDS_NONE "(Brak)" IDS_SYSTEM_SCHEME "(schemat systemu)" - IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" - IDS_BROWSE_TITLE "Browse" - IDS_REMOVE_TITLE "Confirm Scheme Removal" - IDS_REMOVE_TEXT "Are you sure you want to remove the cursor scheme '%s'?" - IDS_OVERWRITE_TITLE "Confirm Cursor Scheme Overwrite" - IDS_OVERWRITE_TEXT "The cursor scheme name you chose is already in use. Do you want to overwrite the existing cursor scheme?" + IDS_BROWSE_FILTER "Kursory (*.ani, *.cur)\0*.ani;*.cur\Animowane kusory (*.ani)\0*.ani\0Kursory statyczne (*.cur)\0*.cur\0Wszystkie pliki\0*.*\0\0" + IDS_BROWSE_TITLE "Przegl¹daj" + IDS_REMOVE_TITLE "Potwierd usuniêcie schematu" + IDS_REMOVE_TEXT "Czy na pewno chcesz usun¹æ schemat kursorów '%s'?" + IDS_OVERWRITE_TITLE "Potwierd nadpisanie schematu kursorów" + IDS_OVERWRITE_TEXT "Wybrana nazwa schematu kursorów jest ju¿ w u¿ytku. Czy chcesz nadpisaæ istniej¹cy schemat?" END
17 years, 4 months
1
0
0
0
[tkreuzer] 26472: GetObject rewrite part one (gdi32) - use switch/case instead of if - SetLastError() only in the correct cases - add additional object types - restructure the code - change to @implemented Before someone reverts everything: I have testcases. 129/132 tests pass now (this is without EXTLOGPEN tests)
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Apr 23 18:31:08 2007 New Revision: 26472 URL:
http://svn.reactos.org/svn/reactos?rev=26472&view=rev
Log: GetObject rewrite part one (gdi32) - use switch/case instead of if - SetLastError() only in the correct cases - add additional object types - restructure the code - change to @implemented Before someone reverts everything: I have testcases. 129/132 tests pass now (this is without EXTLOGPEN tests) Modified: trunk/reactos/dll/win32/gdi32/objects/dc.c Modified: trunk/reactos/dll/win32/gdi32/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/dc…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/dc.c (original) +++ trunk/reactos/dll/win32/gdi32/objects/dc.c Mon Apr 23 18:31:08 2007 @@ -395,125 +395,159 @@ int -GetNonFontObject(HGDIOBJ Handle, int Size, LPVOID Buffer) -{ - INT Type = GDI_HANDLE_GET_TYPE(Handle); - - if (Type == GDI_OBJECT_TYPE_REGION) // Not on the check list, so bye. +GetNonFontObject(HGDIOBJ hGdiObj, int cbSize, LPVOID lpBuffer) +{ + INT dwType = GDI_HANDLE_GET_TYPE(hGdiObj); + + switch(dwType) { - SetLastError(ERROR_INVALID_HANDLE); - return 0; + case GDI_OBJECT_TYPE_DC: + case GDI_OBJECT_TYPE_REGION: + case GDI_OBJECT_TYPE_METAFILE: + case GDI_OBJECT_TYPE_ENHMETAFILE: + case GDI_OBJECT_TYPE_EMF: + SetLastError(ERROR_INVALID_HANDLE); + return 0; + + case GDI_OBJECT_TYPE_COLORSPACE: + SetLastError(ERROR_NOT_SUPPORTED); + return 0; + + case GDI_OBJECT_TYPE_PEN: + case GDI_OBJECT_TYPE_BRUSH: + case GDI_OBJECT_TYPE_BITMAP: + case GDI_OBJECT_TYPE_PALETTE: + case GDI_OBJECT_TYPE_METADC: + if (!lpBuffer) + { + switch(dwType) + { + case GDI_OBJECT_TYPE_PEN: + return sizeof(LOGPEN); + case GDI_OBJECT_TYPE_BRUSH: + return sizeof(LOGBRUSH); + case GDI_OBJECT_TYPE_BITMAP: + return sizeof(BITMAP); + case GDI_OBJECT_TYPE_PALETTE: + return sizeof(WORD); + case GDI_OBJECT_TYPE_METADC: + /* Windows does not SetLastError() in this case, more investigation needed */ + return 0; + case GDI_OBJECT_TYPE_COLORSPACE: /* yes, windows acts like this */ + SetLastError(ERROR_INSUFFICIENT_BUFFER); + return 60; // FIXME: what structure is this? */ + case GDI_OBJECT_TYPE_EXTPEN: /* we don't know the size, ask win32k */ + break; + default: + /* Other invalid handle type, windows does not SetLastError() */ + return 0; + } + } + //Handle = GdiFixUpHandle(hGdiObj); new system is not ready + return NtGdiExtGetObjectW(hGdiObj, cbSize, lpBuffer); } - - if (Buffer == NULL) - { - if (Type == GDI_OBJECT_TYPE_PEN) return sizeof(LOGPEN); - else if (Type == GDI_OBJECT_TYPE_REGION) return sizeof(LOGBRUSH); - } - - //Handle = GdiFixUpHandle(Handle); new system is not ready - - return NtGdiExtGetObjectW(Handle, Size, Buffer); -} - - -/* - * @unimplemented + return 0; +} + + +/* + * @implemented */ int STDCALL -GetObjectA(HGDIOBJ Handle, int Size, LPVOID Buffer) +GetObjectA(HGDIOBJ hGdiObj, int cbSize, LPVOID lpBuffer) { EXTLOGFONTW ExtLogFontW; - DWORD Type; + LOGFONTA LogFontA; + + DWORD dwType; int Result = 0; - Type = GDI_HANDLE_GET_TYPE(Handle); - - if((Type == GDI_OBJECT_TYPE_DC) || - (Type == GDI_OBJECT_TYPE_METAFILE) || - (Type == GDI_OBJECT_TYPE_ENHMETAFILE)) + dwType = GDI_HANDLE_GET_TYPE(hGdiObj);; + + if (dwType == GDI_OBJECT_TYPE_FONT) { - SetLastError(ERROR_INVALID_HANDLE); - return 0; - } - - if(Type == GDI_OBJECT_TYPE_COLORSPACE) - { - SetLastError(ERROR_NOT_SUPPORTED); - return 0; - } - - if (Type == GDI_OBJECT_TYPE_FONT) - { - if ( Buffer == NULL) return sizeof(LOGFONTA); - - if (Size < (int)sizeof(LOGFONTA)) - { - SetLastError(ERROR_BUFFER_OVERFLOW); - return 0; - } - Result = NtGdiExtGetObjectW(Handle, sizeof(EXTLOGFONTW), &ExtLogFontW); - if (0 == Result) - { - return 0; - } + if (!lpBuffer) + { + return sizeof(LOGFONTA); + } + if (cbSize == 0) + { + /* Windows does not SetLastError() */ + return 0; + } + Result = NtGdiExtGetObjectW(hGdiObj, sizeof(EXTLOGFONTW), &ExtLogFontW); + if (0 == Result) + { + return 0; + } + LogFontW2A(&LogFontA, &ExtLogFontW.elfLogFont); + + /* FIXME: windows writes up to 260 bytes */ + /* What structure is that? */ + if ((UINT)cbSize > 260) + { + cbSize = 260; + } + memcpy(lpBuffer, &LogFontA, cbSize); /* During testing of font objects, I passed ENUM/EXT/LOGFONT/EX/W to NtGdiExtGetObjectW. I think it likes EXTLOGFONTW. So,,, How do we handle the rest when a caller wants to use E/E/L/E/A structures. Check for size? More research~ */ - LogFontW2A((LPLOGFONTA) Buffer, &ExtLogFontW.elfLogFont); - Result = sizeof(LOGFONTA); - } - else - { - Result = GetNonFontObject(Handle, Size, Buffer); - } - - return Result; -} - - -/* - * @unimplemented + return cbSize; + } + + return GetNonFontObject(hGdiObj, cbSize, lpBuffer); +} + + +/* + * @implemented */ int STDCALL -GetObjectW(HGDIOBJ Handle, int Size, LPVOID Buffer) -{ - - INT Type = GDI_HANDLE_GET_TYPE(Handle); +GetObjectW(HGDIOBJ hGdiObj, int cbSize, LPVOID lpBuffer) +{ + DWORD dwType = GDI_HANDLE_GET_TYPE(hGdiObj); + EXTLOGFONTW ExtLogFontW; + int Result = 0; + /* Check List: MSDN, "This can be a handle to one of the following: logical bitmap, a brush, a font, a palette, a pen, or a device independent bitmap created by calling the CreateDIBSection function." */ - if((Type == GDI_OBJECT_TYPE_DC) || // Yes, can not pass a normal DC! - (Type == GDI_OBJECT_TYPE_METAFILE) || - (Type == GDI_OBJECT_TYPE_ENHMETAFILE)) + + if (dwType == GDI_OBJECT_TYPE_FONT) { - SetLastError(ERROR_INVALID_HANDLE); - return 0; + if (!lpBuffer) + { + return sizeof(LOGFONTW); + } + if (cbSize == 0) + { + /* Windows does not SetLastError() */ + return 0; + } + Result = NtGdiExtGetObjectW(hGdiObj, sizeof(EXTLOGFONTW), &ExtLogFontW); + if (0 == Result) + { + return 0; + } + /* FIXME: windows writes up to 356 bytes */ + /* What structure is that? */ + if ((UINT)cbSize > 356) + { + /* windows seems to delete the font in this case, more investigation needed */ + cbSize = 356; + } + memcpy(lpBuffer, &ExtLogFontW.elfLogFont, cbSize); + return cbSize; } - if(Type == GDI_OBJECT_TYPE_COLORSPACE) - { - SetLastError(ERROR_NOT_SUPPORTED); // Not supported yet. - return 0; - } - - if(Type == GDI_OBJECT_TYPE_FONT) - { - if(Buffer == NULL) return sizeof(LOGFONTW); - - if(Size > sizeof(EXTLOGFONTW)) Size = sizeof(EXTLOGFONTW); - - return NtGdiExtGetObjectW(Handle, Size, Buffer); - } - else - return GetNonFontObject(Handle, Size, Buffer); + return GetNonFontObject(hGdiObj, cbSize, lpBuffer); }
17 years, 4 months
1
0
0
0
[ekohl] 26471: - Enable the "Apply" button when a change to the current cursor scheme has been made. - Support any cursor size.
by ekohl@svn.reactos.org
Author: ekohl Date: Mon Apr 23 13:21:13 2007 New Revision: 26471 URL:
http://svn.reactos.org/svn/reactos?rev=26471&view=rev
Log: - Enable the "Apply" button when a change to the current cursor scheme has been made. - Support any cursor size. Modified: trunk/reactos/dll/cpl/main/mouse.c Modified: trunk/reactos/dll/cpl/main/mouse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/mouse.c?rev=2…
============================================================================== --- trunk/reactos/dll/cpl/main/mouse.c (original) +++ trunk/reactos/dll/cpl/main/mouse.c Mon Apr 23 13:21:13 2007 @@ -78,6 +78,8 @@ BOOL bDropShadow; BOOL bOrigDropShadow; + INT cxCursor; + INT cyCursor; } POINTER_DATA, *PPOINTER_DATA; @@ -881,7 +883,8 @@ static VOID OnDrawItem(UINT idCtl, - LPDRAWITEMSTRUCT lpdis) + LPDRAWITEMSTRUCT lpdis, + PPOINTER_DATA pPointerData) { RECT rc; @@ -919,7 +922,7 @@ if (g_CursorData[lpdis->itemData].hCursor != NULL) { DrawIcon(lpdis->hDC, - lpdis->rcItem.right - 32 - 4, + lpdis->rcItem.right - pPointerData->cxCursor - 4, lpdis->rcItem.top + 2, g_CursorData[lpdis->itemData].hCursor); } @@ -993,6 +996,9 @@ pPointerData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(POINTER_DATA)); SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pPointerData); + pPointerData->cxCursor = GetSystemMetrics(SM_CXCURSOR); + pPointerData->cyCursor = GetSystemMetrics(SM_CYCURSOR); + EnumerateCursorSchemes(hwndDlg); LoadNewCursorScheme(hwndDlg, TRUE); @@ -1013,12 +1019,12 @@ return FALSE; case WM_MEASUREITEM: - ((LPMEASUREITEMSTRUCT)lParam)->itemHeight = 32 + 4; + ((LPMEASUREITEMSTRUCT)lParam)->itemHeight = GetSystemMetrics(SM_CYCURSOR) + 4; break; case WM_DRAWITEM: if (wParam == IDC_LISTBOX_CURSOR) - OnDrawItem((UINT)wParam, (LPDRAWITEMSTRUCT)lParam); + OnDrawItem((UINT)wParam, (LPDRAWITEMSTRUCT)lParam, pPointerData); return TRUE; case WM_DESTROY: @@ -1048,7 +1054,11 @@ { case IDC_COMBO_CURSOR_SCHEME: if (HIWORD(wParam) == CBN_SELENDOK) + { LoadNewCursorScheme(hwndDlg, FALSE); + + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + } break; case IDC_LISTBOX_CURSOR: @@ -1071,16 +1081,15 @@ /* Enable the "Set Default" button */ EnableWindow(GetDlgItem(hwndDlg,IDC_BUTTON_USE_DEFAULT_CURSOR), TRUE); + + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); } break; } break; case IDC_BUTTON_SAVEAS_SCHEME: - if (SaveCursorScheme(hwndDlg)) - { - - } + SaveCursorScheme(hwndDlg); break; case IDC_BUTTON_USE_DEFAULT_CURSOR: @@ -1096,6 +1105,8 @@ /* Disable the "Set Default" button */ EnableWindow(GetDlgItem(hwndDlg,IDC_BUTTON_USE_DEFAULT_CURSOR), FALSE); + + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); } break; @@ -1108,6 +1119,8 @@ /* Enable the "Set Default" button */ EnableWindow(GetDlgItem(hwndDlg,IDC_BUTTON_USE_DEFAULT_CURSOR), TRUE); + + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); } break;
17 years, 4 months
1
0
0
0
[dgorbachev] 26470: Do not wait so long for drive reset.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Mon Apr 23 08:54:13 2007 New Revision: 26470 URL:
http://svn.reactos.org/svn/reactos?rev=26470&view=rev
Log: Do not wait so long for drive reset. Modified: trunk/reactos/drivers/storage/ide/atapi/atapi.h Modified: trunk/reactos/drivers/storage/ide/atapi/atapi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/atapi/…
============================================================================== --- trunk/reactos/drivers/storage/ide/atapi/atapi.h (original) +++ trunk/reactos/drivers/storage/ide/atapi/atapi.h Mon Apr 23 08:54:13 2007 @@ -418,10 +418,12 @@ #define AtapiSoftReset(BaseIoAddress,DeviceNumber) \ {\ UCHAR statusByte; \ + ULONG i = 1000*1000;\ ScsiPortWritePortUchar(&BaseIoAddress->DriveSelect,(UCHAR)(((DeviceNumber & 0x1) << 4) | 0xA0)); \ ScsiPortStallExecution(500);\ ScsiPortWritePortUchar(&BaseIoAddress->Command, IDE_COMMAND_ATAPI_RESET); \ - ScsiPortStallExecution(1000*1000);\ + while ((ScsiPortReadPortUchar(&BaseIoAddress->Command) & IDE_STATUS_BUSY) && i--)\ + ScsiPortStallExecution(30);\ ScsiPortWritePortUchar(&BaseIoAddress->DriveSelect,(UCHAR)((DeviceNumber << 4) | 0xA0)); \ WaitOnBusy( ((PIDE_REGISTERS_2)((PUCHAR)BaseIoAddress + 0x206)), statusByte); \ ScsiPortStallExecution(500);\
17 years, 4 months
1
0
0
0
[ekohl] 26469: Use WS_EX_CLIENTEDGE to make the main windows look a little nicer.
by ekohl@svn.reactos.org
Author: ekohl Date: Mon Apr 23 03:09:45 2007 New Revision: 26469 URL:
http://svn.reactos.org/svn/reactos?rev=26469&view=rev
Log: Use WS_EX_CLIENTEDGE to make the main windows look a little nicer. Modified: trunk/reactos/base/applications/mscutils/devmgmt/mainwnd.c trunk/reactos/base/applications/mscutils/servman/mainwnd.c Modified: trunk/reactos/base/applications/mscutils/devmgmt/mainwnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/devmgmt/mainwnd.c (original) +++ trunk/reactos/base/applications/mscutils/devmgmt/mainwnd.c Mon Apr 23 03:09:45 2007 @@ -154,7 +154,7 @@ static BOOL CreateTreeView(PMAIN_WND_INFO Info) { - Info->hTreeView = CreateWindowEx(0, + Info->hTreeView = CreateWindowEx(WS_EX_CLIENTEDGE, WC_TREEVIEW, NULL, WS_CHILD | WS_VISIBLE | WS_BORDER | TVS_HASLINES | Modified: trunk/reactos/base/applications/mscutils/servman/mainwnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/mainwnd.c (original) +++ trunk/reactos/base/applications/mscutils/servman/mainwnd.c Mon Apr 23 03:09:45 2007 @@ -310,7 +310,7 @@ LVCOLUMN lvc = { 0 }; TCHAR szTemp[256]; - Info->hListView = CreateWindowEx(0, + Info->hListView = CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, NULL, WS_CHILD | WS_VISIBLE | LVS_REPORT | WS_BORDER |
17 years, 5 months
1
0
0
0
[greatlrd] 26468: Fixing a crash, fixed so Setcoparative pass the test, still some werid bugs after I delete all code in ddraw. anyone whant debuging this u are wellcome
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sun Apr 22 23:59:44 2007 New Revision: 26468 URL:
http://svn.reactos.org/svn/reactos?rev=26468&view=rev
Log: Fixing a crash, fixed so Setcoparative pass the test, still some werid bugs after I delete all code in ddraw. anyone whant debuging this u are wellcome Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c trunk/reactos/dll/directx/ddraw/startup.c Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main/ddr…
============================================================================== --- trunk/reactos/dll/directx/ddraw/main/ddraw_main.c (original) +++ trunk/reactos/dll/directx/ddraw/main/ddraw_main.c Sun Apr 22 23:59:44 2007 @@ -34,10 +34,13 @@ else { *obj = NULL; + DX_STUB_str("E_NOINTERFACE"); return E_NOINTERFACE; } + Main_DirectDraw_AddRef(iface); + DX_STUB_str("DD_OK"); return DD_OK; } Modified: trunk/reactos/dll/directx/ddraw/startup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/startup.…
============================================================================== --- trunk/reactos/dll/directx/ddraw/startup.c (original) +++ trunk/reactos/dll/directx/ddraw/startup.c Sun Apr 22 23:59:44 2007 @@ -41,7 +41,10 @@ This = memThis; if (This == NULL) { - if (memThis != NULL) DxHeapMemFree(memThis); + if (memThis != NULL) + DxHeapMemFree(memThis); + + DX_STUB_str("DDERR_OUTOFMEMORY"); return DDERR_OUTOFMEMORY; } } @@ -51,13 +54,18 @@ LPDDRAWI_DIRECTDRAW_INT newThis; newThis = DxHeapMemAlloc(sizeof(DDRAWI_DIRECTDRAW_INT)); if (newThis == NULL) + { + DX_STUB_str("DDERR_OUTOFMEMORY"); return DDERR_OUTOFMEMORY; + } + /* we need check the GUID lpGUID what type it is */ if (pGUID != (LPGUID)DDCREATE_HARDWAREONLY) { if (pGUID !=NULL) { This = newThis; + DX_STUB_str("DDERR_INVALIDDIRECTDRAWGUID"); return DDERR_INVALIDDIRECTDRAWGUID; } } @@ -68,15 +76,24 @@ /* Fixme release memory alloc if we fail */ This->lpLcl = DxHeapMemAlloc(sizeof(DDRAWI_DIRECTDRAW_INT)); if (This->lpLcl == NULL) + { + DX_STUB_str("DDERR_OUTOFMEMORY"); return DDERR_OUTOFMEMORY; + } + This->lpLcl->lpGbl = &ddgbl; *pIface = (LPDIRECTDRAW)This; /* Get right interface we whant */ - if (Main_DirectDraw_QueryInterface((LPDIRECTDRAW7)This, id, (void**)&pIface)) - { + if (Main_DirectDraw_QueryInterface((LPDIRECTDRAW7)This, id, (void**)&pIface) == DD_OK) + { + DX_STUB_str("Got iface"); + if (StartDirectDraw((LPDIRECTDRAW*)This, pGUID, FALSE) == DD_OK); { + DX_STUB_str("here"); + + /* RtlZeroMemory(&wnd_class, sizeof(wnd_class)); wnd_class.style = CS_HREDRAW | CS_VREDRAW; wnd_class.lpfnWndProc = DefWindowProcW; @@ -90,13 +107,17 @@ wnd_class.lpszClassName = classname; if(!RegisterClassW(&wnd_class)) { + DX_STUB_str("DDERR_GENERIC"); return DDERR_GENERIC; } - + */ + + DX_STUB_str("DD_OK"); return DD_OK; } } + DX_STUB_str("DDERR_INVALIDPARAMS"); return DDERR_INVALIDPARAMS; } @@ -121,6 +142,7 @@ * devicetypes = 3 : both hel are enable * devicetypes = 4 :loading a guid drv from the register */ + if (reenable == FALSE) @@ -141,6 +163,8 @@ } } + DX_STUB_str("here"); + if (reenable == FALSE) { if (lpGuid == NULL) @@ -248,7 +272,7 @@ This->lpLcl->hDD = This->lpLcl->lpGbl->hDD; ddgbl.hDD = This->lpLcl->lpGbl->hDD; - + DX_STUB_str("DD_OK"); return DD_OK; }
17 years, 5 months
1
0
0
0
[greatlrd] 26467: adpabte wine SetCooperativeLevel to reactis ddraw. allot test need be done, I also took DDRAWI_DIRECTDRAW_LCL->dwObsolete1 as device windows. memory leak can exists and some value I forget free as well.
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sun Apr 22 22:15:31 2007 New Revision: 26467 URL:
http://svn.reactos.org/svn/reactos?rev=26467&view=rev
Log: adpabte wine SetCooperativeLevel to reactis ddraw. allot test need be done, I also took DDRAWI_DIRECTDRAW_LCL->dwObsolete1 as device windows. memory leak can exists and some value I forget free as well. Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c trunk/reactos/dll/directx/ddraw/rosdraw.h trunk/reactos/dll/directx/ddraw/startup.c Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main/ddr…
============================================================================== --- trunk/reactos/dll/directx/ddraw/main/ddraw_main.c (original) +++ trunk/reactos/dll/directx/ddraw/main/ddraw_main.c Sun Apr 22 22:15:31 2007 @@ -3,7 +3,7 @@ * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS * FILE: lib/ddraw/main/ddraw.c - * PURPOSE: IDirectDraw7 Implementation + * PURPOSE: IDirectDraw7 Implementation * PROGRAMMER: Magnus Olsen, Maarten Bosma * */ @@ -11,19 +11,19 @@ #include "../rosdraw.h" -HRESULT -WINAPI -Main_DirectDraw_QueryInterface (LPDIRECTDRAW7 iface, - REFIID id, - LPVOID *obj) -{ +HRESULT +WINAPI +Main_DirectDraw_QueryInterface (LPDIRECTDRAW7 iface, + REFIID id, + LPVOID *obj) +{ LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; DX_WINDBG_trace(); - - /* fixme - the D3D object cab be optain from here - Direct3D7 + + /* fixme + the D3D object cab be optain from here + Direct3D7 */ if (IsEqualGUID(&IID_IDirectDraw7, id)) { @@ -38,7 +38,7 @@ } Main_DirectDraw_AddRef(iface); - return S_OK; + return DD_OK; } /* @@ -46,9 +46,9 @@ * Status ok */ ULONG -WINAPI -Main_DirectDraw_AddRef (LPDIRECTDRAW7 iface) -{ +WINAPI +Main_DirectDraw_AddRef (LPDIRECTDRAW7 iface) +{ LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; DX_WINDBG_trace(); @@ -67,10 +67,10 @@ } -ULONG -WINAPI -Main_DirectDraw_Release (LPDIRECTDRAW7 iface) -{ +ULONG +WINAPI +Main_DirectDraw_Release (LPDIRECTDRAW7 iface) +{ LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; DX_WINDBG_trace(); @@ -92,7 +92,7 @@ { ChangeDisplaySettings(NULL, 0); }*/ - + Cleanup(iface); return 0; } @@ -104,9 +104,9 @@ * IMPLEMENT * Status ok */ -HRESULT -WINAPI -Main_DirectDraw_Compact(LPDIRECTDRAW7 iface) +HRESULT +WINAPI +Main_DirectDraw_Compact(LPDIRECTDRAW7 iface) { /* MSDN say not implement but my question what does it return then */ DX_WINDBG_trace(); @@ -117,16 +117,16 @@ * IMPLEMENT * Status ok */ -HRESULT -WINAPI -Main_DirectDraw_CreateClipper(LPDIRECTDRAW7 iface, - DWORD dwFlags, - LPDIRECTDRAWCLIPPER *ppClipper, +HRESULT +WINAPI +Main_DirectDraw_CreateClipper(LPDIRECTDRAW7 iface, + DWORD dwFlags, + LPDIRECTDRAWCLIPPER *ppClipper, IUnknown *pUnkOuter) { DX_WINDBG_trace(); - DX_STUB; + DX_STUB; } HRESULT WINAPI Main_DirectDraw_CreatePalette(LPDIRECTDRAW7 iface, DWORD dwFlags, @@ -143,13 +143,13 @@ * Status not done */ HRESULT WINAPI Main_DirectDraw_CreateSurface (LPDIRECTDRAW7 iface, LPDDSURFACEDESC2 pDDSD, - LPDIRECTDRAWSURFACE7 *ppSurf, IUnknown *pUnkOuter) -{ - - DX_WINDBG_trace(); - - DX_STUB; - + LPDIRECTDRAWSURFACE7 *ppSurf, IUnknown *pUnkOuter) +{ + + DX_WINDBG_trace(); + + DX_STUB; + } @@ -158,10 +158,10 @@ * Status not done */ HRESULT WINAPI Main_DirectDraw_DuplicateSurface(LPDIRECTDRAW7 iface, LPDIRECTDRAWSURFACE7 src, - LPDIRECTDRAWSURFACE7* dst) -{ - DX_WINDBG_trace(); - DX_STUB; + LPDIRECTDRAWSURFACE7* dst) +{ + DX_WINDBG_trace(); + DX_STUB; } /* @@ -169,72 +169,72 @@ * Status ok */ HRESULT WINAPI Main_DirectDraw_EnumDisplayModes(LPDIRECTDRAW7 iface, DWORD dwFlags, - LPDDSURFACEDESC2 pDDSD, LPVOID context, LPDDENUMMODESCALLBACK2 callback) + LPDDSURFACEDESC2 pDDSD, LPVOID context, LPDDENUMMODESCALLBACK2 callback) { DX_WINDBG_trace(); - DX_STUB; + DX_STUB; } /* * stub * Status not done */ -HRESULT WINAPI +HRESULT WINAPI Main_DirectDraw_EnumSurfaces(LPDIRECTDRAW7 iface, DWORD dwFlags, LPDDSURFACEDESC2 lpDDSD2, LPVOID context, - LPDDENUMSURFACESCALLBACK7 callback) -{ - DX_WINDBG_trace(); - DX_STUB; -} - -/* - * IMPLEMENT - * Status ok - */ -HRESULT WINAPI -Main_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface) -{ - DX_WINDBG_trace(); - - DX_STUB; -} - -/* - * IMPLEMENT - * Status ok - */ -HRESULT WINAPI + LPDDENUMSURFACESCALLBACK7 callback) +{ + DX_WINDBG_trace(); + DX_STUB; +} + +/* + * IMPLEMENT + * Status ok + */ +HRESULT WINAPI +Main_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface) +{ + DX_WINDBG_trace(); + + DX_STUB; +} + +/* + * IMPLEMENT + * Status ok + */ +HRESULT WINAPI Main_DirectDraw_GetCaps(LPDIRECTDRAW7 iface, LPDDCAPS pDriverCaps, - LPDDCAPS pHELCaps) -{ - - DX_WINDBG_trace(); - - DX_STUB; -} - - -/* - * IMPLEMENT - * Status ok - */ -HRESULT WINAPI Main_DirectDraw_GetDisplayMode(LPDIRECTDRAW7 iface, LPDDSURFACEDESC2 pDDSD) -{ + LPDDCAPS pHELCaps) +{ + + DX_WINDBG_trace(); + + DX_STUB; +} + + +/* + * IMPLEMENT + * Status ok + */ +HRESULT WINAPI Main_DirectDraw_GetDisplayMode(LPDIRECTDRAW7 iface, LPDDSURFACEDESC2 pDDSD) +{ //LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; DX_WINDBG_trace(); - DX_STUB; -} - -/* - * Stub - * Status todo - */ -HRESULT WINAPI + DX_STUB; +} + +/* + * Stub + * Status todo + */ +HRESULT WINAPI Main_DirectDraw_GetFourCCCodes(LPDIRECTDRAW7 iface, LPDWORD pNumCodes, LPDWORD pCodes) { DX_WINDBG_trace(); @@ -245,8 +245,8 @@ * Stub * Status todo */ -HRESULT WINAPI -Main_DirectDraw_GetGDISurface(LPDIRECTDRAW7 iface, +HRESULT WINAPI +Main_DirectDraw_GetGDISurface(LPDIRECTDRAW7 iface, LPDIRECTDRAWSURFACE7 *lplpGDIDDSSurface) { DX_WINDBG_trace(); @@ -257,31 +257,31 @@ * IMPLEMENT * Status ok */ -HRESULT WINAPI +HRESULT WINAPI Main_DirectDraw_GetMonitorFrequency(LPDIRECTDRAW7 iface,LPDWORD freq) -{ - DX_WINDBG_trace(); - - DX_STUB; -} - -/* - * IMPLEMENT - * Status ok - */ -HRESULT WINAPI +{ + DX_WINDBG_trace(); + + DX_STUB; +} + +/* + * IMPLEMENT + * Status ok + */ +HRESULT WINAPI Main_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD lpdwScanLine) -{ - DX_WINDBG_trace(); - - DX_STUB; -} - -/* - * Stub - * Status todo - */ -HRESULT WINAPI +{ + DX_WINDBG_trace(); + + DX_STUB; +} + +/* + * Stub + * Status todo + */ +HRESULT WINAPI Main_DirectDraw_GetVerticalBlankStatus(LPDIRECTDRAW7 iface, LPBOOL lpbIsInVB) { DX_WINDBG_trace(); @@ -292,78 +292,233 @@ * IMPLEMENT * Status ok */ -HRESULT -WINAPI +HRESULT +WINAPI Main_DirectDraw_Initialize (LPDIRECTDRAW7 iface, LPGUID lpGUID) -{ - DX_WINDBG_trace(); - - DX_STUB; -} - -/* - * IMPLEMENT - * Status ok - */ -HRESULT WINAPI +{ + DX_WINDBG_trace(); + + DX_STUB; +} + +/* + * IMPLEMENT + * Status ok + */ +HRESULT WINAPI Main_DirectDraw_RestoreDisplayMode(LPDIRECTDRAW7 iface) { DX_WINDBG_trace(); - DX_STUB; + DX_STUB; return DD_OK; } /* - * IMPLEMENT - * Status ok - */ -HRESULT WINAPI + */ +HRESULT WINAPI Main_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface, HWND hwnd, DWORD cooplevel) { DX_WINDBG_trace(); - DX_STUB; -} - -/* - * IMPLEMENT - * Status ok - */ -HRESULT WINAPI -Main_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD dwHeight, +/* + * Code from wine, this functions have been cut and paste from wine 0.9.35 + * and have been modify allot and are still in devloping so it match with + * msdn document struct and flags + */ + + HWND window; + LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; + + + /* Get the old window */ + window = (HWND) This->lpLcl->hWnd; + if(!window) + { + return DDERR_NOHWND; + } + + /* Tests suggest that we need one of them: */ + if(!(cooplevel & (DDSCL_SETFOCUSWINDOW | + DDSCL_NORMAL | + DDSCL_EXCLUSIVE ))) + { + return DDERR_INVALIDPARAMS; + } + + /* Handle those levels first which set various hwnds */ + if(cooplevel & DDSCL_SETFOCUSWINDOW) + { + /* This isn't compatible with a lot of flags */ + if(cooplevel & ( DDSCL_MULTITHREADED | + DDSCL_FPUSETUP | + DDSCL_FPUPRESERVE | + DDSCL_ALLOWREBOOT | + DDSCL_ALLOWMODEX | + DDSCL_SETDEVICEWINDOW | + DDSCL_NORMAL | + DDSCL_EXCLUSIVE | + DDSCL_FULLSCREEN ) ) + { + return DDERR_INVALIDPARAMS; + } + + else if(This->lpLcl->dwLocalFlags & DDRAWILCL_SETCOOPCALLED) + { + return DDERR_HWNDALREADYSET; + } + else if( (This->lpLcl->dwLocalFlags & DDRAWILCL_ISFULLSCREEN) && window) + { + return DDERR_HWNDALREADYSET; + } + + This->lpLcl->hFocusWnd = (ULONG_PTR) hwnd; + + + /* Won't use the hwnd param for anything else */ + hwnd = NULL; + + /* Use the focus window for drawing too */ + This->lpLcl->hWnd = This->lpLcl->hFocusWnd; + + } + + /* DDSCL_NORMAL or DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE */ + if(cooplevel & DDSCL_NORMAL) + { + /* Can't coexist with fullscreen or exclusive */ + if(cooplevel & (DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE) ) + return DDERR_INVALIDPARAMS; + + + /* Switching from fullscreen? */ + if(This->lpLcl->dwLocalFlags & DDRAWILCL_ISFULLSCREEN) + { + /* Restore the display mode */ + Main_DirectDraw_RestoreDisplayMode(iface); + + This->lpLcl->dwLocalFlags &= ~DDRAWILCL_ISFULLSCREEN; + This->lpLcl->dwLocalFlags &= ~DDRAWILCL_HASEXCLUSIVEMODE; + This->lpLcl->dwLocalFlags &= ~DDRAWILCL_ALLOWMODEX; + } + + /* Don't override focus windows or private device windows */ + if( hwnd && + !(This->lpLcl->hFocusWnd) && + !(This->lpLcl->dwObsolete1) && + (hwnd != window) ) + { + This->lpLcl->hWnd = (ULONG_PTR)hwnd; + } + + /* FIXME GL + IWineD3DDevice_SetFullscreen(This->wineD3DDevice, + FALSE); + */ + } + else if(cooplevel & DDSCL_FULLSCREEN) + { + /* Needs DDSCL_EXCLUSIVE */ + if(!(cooplevel & DDSCL_EXCLUSIVE) ) + return DDERR_INVALIDPARAMS; + + /* Switch from normal to full screen mode? */ + if (!(This->lpLcl->dwLocalFlags & DDRAWILCL_HASEXCLUSIVEMODE)) + { + /* FIXME GL + IWineD3DDevice_SetFullscreen(This->wineD3DDevice, + TRUE); + */ + } + + /* Don't override focus windows or private device windows */ + if( hwnd && + !(This->lpLcl->hFocusWnd) && + !(This->lpLcl->dwObsolete1) && + (hwnd != window) ) + { + This->lpLcl->hWnd = (ULONG_PTR) hwnd; + } + } + else if(cooplevel & DDSCL_EXCLUSIVE) + { + return DDERR_INVALIDPARAMS; + } + + if(cooplevel & DDSCL_CREATEDEVICEWINDOW) + { + /* Don't create a device window if a focus window is set */ + if( !This->lpLcl->hFocusWnd) + { + HWND devicewindow = CreateWindowExW(0, classname, L"DDraw device window", + WS_POPUP, 0, 0, + GetSystemMetrics(SM_CXSCREEN), + GetSystemMetrics(SM_CYSCREEN), + NULL, NULL, GetModuleHandleW(0), NULL); + + ShowWindow(devicewindow, SW_SHOW); /* Just to be sure */ + + This->lpLcl->dwObsolete1 = (DWORD)devicewindow; + } + } + + if(cooplevel & DDSCL_MULTITHREADED && !(This->lpLcl->dwLocalFlags & DDRAWILCL_MULTITHREADED)) + { + /* FIXME GL + * IWineD3DDevice_SetMultithreaded(This->wineD3DDevice); + */ + } + + + + /* Store the cooperative_level */ + + /* FIXME GL + * This->cooperative_level |= cooplevel; + */ + + return DD_OK; + +} + +/* + * IMPLEMENT + * Status ok + */ +HRESULT WINAPI +Main_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) { DX_WINDBG_trace(); - DX_STUB; -} - -/* - * IMPLEMENT - * Status ok - */ -HRESULT WINAPI + DX_STUB; +} + +/* + * IMPLEMENT + * Status ok + */ +HRESULT WINAPI Main_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags, HANDLE h) { DX_WINDBG_trace(); - DX_STUB; -} - -/* - * IMPLEMENT - * Status ok - */ -HRESULT WINAPI + DX_STUB; +} + +/* + * IMPLEMENT + * Status ok + */ +HRESULT WINAPI Main_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps, - LPDWORD total, LPDWORD free) -{ - DX_WINDBG_trace(); - - DX_STUB; + LPDWORD total, LPDWORD free) +{ + DX_WINDBG_trace(); + + DX_STUB; } /* @@ -372,7 +527,7 @@ */ HRESULT WINAPI Main_DirectDraw_GetSurfaceFromDC(LPDIRECTDRAW7 iface, HDC hdc, LPDIRECTDRAWSURFACE7 *lpDDS) -{ +{ DX_WINDBG_trace(); DX_STUB; } @@ -391,7 +546,7 @@ * Stub * Status todo */ -HRESULT WINAPI Main_DirectDraw_TestCooperativeLevel(LPDIRECTDRAW7 iface) +HRESULT WINAPI Main_DirectDraw_TestCooperativeLevel(LPDIRECTDRAW7 iface) { DX_WINDBG_trace(); DX_STUB; @@ -403,7 +558,7 @@ */ HRESULT WINAPI Main_DirectDraw_GetDeviceIdentifier(LPDIRECTDRAW7 iface, LPDDDEVICEIDENTIFIER2 pDDDI, DWORD dwFlags) -{ +{ DX_WINDBG_trace(); DX_STUB; } @@ -424,7 +579,7 @@ * Status todo */ HRESULT WINAPI Main_DirectDraw_EvaluateMode(LPDIRECTDRAW7 iface,DWORD a,DWORD* b) -{ +{ DX_WINDBG_trace(); DX_STUB; } Modified: trunk/reactos/dll/directx/ddraw/rosdraw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/rosdraw.…
============================================================================== --- trunk/reactos/dll/directx/ddraw/rosdraw.h (original) +++ trunk/reactos/dll/directx/ddraw/rosdraw.h Sun Apr 22 22:15:31 2007 @@ -20,6 +20,8 @@ /* DirectDraw startup code only internal use */ extern DDRAWI_DIRECTDRAW_GBL ddgbl; extern DDRAWI_DDRAWSURFACE_GBL ddSurfGbl; +extern WCHAR classname[128]; +extern WNDCLASSW wnd_class; HRESULT WINAPI StartDirectDraw(LPDIRECTDRAW* iface, LPGUID pGUID, BOOL reenable); Modified: trunk/reactos/dll/directx/ddraw/startup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/startup.…
============================================================================== --- trunk/reactos/dll/directx/ddraw/startup.c (original) +++ trunk/reactos/dll/directx/ddraw/startup.c Sun Apr 22 22:15:31 2007 @@ -13,9 +13,11 @@ #include "d3dhal.h" #include "ddrawgdi.h" -#include "ddrawi.h" DDRAWI_DIRECTDRAW_GBL ddgbl; DDRAWI_DDRAWSURFACE_GBL ddSurfGbl; + +WCHAR classname[128]; +WNDCLASSW wnd_class; @@ -74,7 +76,25 @@ if (Main_DirectDraw_QueryInterface((LPDIRECTDRAW7)This, id, (void**)&pIface)) { if (StartDirectDraw((LPDIRECTDRAW*)This, pGUID, FALSE) == DD_OK); + { + RtlZeroMemory(&wnd_class, sizeof(wnd_class)); + wnd_class.style = CS_HREDRAW | CS_VREDRAW; + wnd_class.lpfnWndProc = DefWindowProcW; + wnd_class.cbClsExtra = 0; + wnd_class.cbWndExtra = 0; + wnd_class.hInstance = GetModuleHandleW(0); + wnd_class.hIcon = 0; + wnd_class.hCursor = 0; + wnd_class.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH); + wnd_class.lpszMenuName = NULL; + wnd_class.lpszClassName = classname; + if(!RegisterClassW(&wnd_class)) + { + return DDERR_GENERIC; + } + return DD_OK; + } } return DDERR_INVALIDPARAMS; @@ -91,6 +111,7 @@ DWORD dwFlags = 0; DX_WINDBG_trace(); + /* * ddgbl.dwPDevice is not longer in use in windows 2000 and higher @@ -127,7 +148,8 @@ devicetypes= 1; /* Create HDC for default, hal and hel driver */ - This->lpLcl->hDC = (ULONG_PTR) GetDC(GetActiveWindow()); + This->lpLcl->hWnd = (ULONG_PTR) GetActiveWindow(); + This->lpLcl->hDC = (ULONG_PTR) GetDC((HWND)This->lpLcl->hWnd); /* cObsolete is undoc in msdn it being use in CreateDCA */ RtlCopyMemory(&ddgbl.cObsolete,&"DISPLAY",7); @@ -138,7 +160,8 @@ { devicetypes = 2; /* Create HDC for default, hal driver */ - This->lpLcl->hDC = (ULONG_PTR) GetDC(GetActiveWindow()); + This->lpLcl->hWnd =(ULONG_PTR) GetActiveWindow(); + This->lpLcl->hDC = (ULONG_PTR) GetDC((HWND)This->lpLcl->hWnd); /* cObsolete is undoc in msdn it being use in CreateDCA */ RtlCopyMemory(&ddgbl.cObsolete,&"DISPLAY",7); @@ -150,7 +173,8 @@ devicetypes = 3; /* Create HDC for default, hal and hel driver */ - This->lpLcl->hDC = (ULONG_PTR) GetDC(GetActiveWindow()); + This->lpLcl->hWnd = (ULONG_PTR) GetActiveWindow(); + This->lpLcl->hDC = (ULONG_PTR) GetDC((HWND)This->lpLcl->hWnd); /* cObsolete is undoc in msdn it being use in CreateDCA */ RtlCopyMemory(&ddgbl.cObsolete,&"DISPLAY",7); @@ -165,6 +189,7 @@ */ devicetypes = 4; This->lpLcl->hDC = (ULONG_PTR) NULL ; + This->lpLcl->hWnd = (ULONG_PTR) GetActiveWindow(); } if ( (HDC)This->lpLcl->hDC == NULL) @@ -222,6 +247,7 @@ This->lpLcl->lpDDCB = This->lpLcl->lpGbl->lpDDCBtmp; This->lpLcl->hDD = This->lpLcl->lpGbl->hDD; ddgbl.hDD = This->lpLcl->lpGbl->hDD; + return DD_OK; } @@ -318,12 +344,12 @@ DDHAL_DDEXEBUFCALLBACKS mD3dBufferCallbacks; LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - RtlZeroMemory(&mHALInfo, sizeof(DDHALINFO)); RtlZeroMemory(&mD3dCallbacks, sizeof(D3DHAL_CALLBACKS)); RtlZeroMemory(&mD3dDriverData, sizeof(D3DHAL_GLOBALDRIVERDATA)); RtlZeroMemory(&mD3dBufferCallbacks, sizeof(DDHAL_DDEXEBUFCALLBACKS)); + if (reenable == FALSE) { ddgbl.lpDDCBtmp = DxHeapMemAlloc(sizeof(DDHAL_CALLBACKS)); @@ -345,6 +371,8 @@ DxHeapMemFree(ddgbl.lpDDCBtmp); return DD_FALSE; } + + /* Some card disable the dx after it have been created so * we are force reanble it
17 years, 5 months
1
0
0
0
[ekohl] 26466: Add message boxes to confirm the removal of user cursor schemes and the replacement of existing cursor schemes.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Apr 22 21:55:11 2007 New Revision: 26466 URL:
http://svn.reactos.org/svn/reactos?rev=26466&view=rev
Log: Add message boxes to confirm the removal of user cursor schemes and the replacement of existing cursor schemes. Modified: trunk/reactos/dll/cpl/main/lang/cs-CZ.rc trunk/reactos/dll/cpl/main/lang/de-DE.rc trunk/reactos/dll/cpl/main/lang/en-US.rc trunk/reactos/dll/cpl/main/lang/es-ES.rc trunk/reactos/dll/cpl/main/lang/fr-FR.rc trunk/reactos/dll/cpl/main/lang/hu-HU.rc trunk/reactos/dll/cpl/main/lang/id-ID.rc trunk/reactos/dll/cpl/main/lang/it-IT.rc trunk/reactos/dll/cpl/main/lang/ja-JP.rc trunk/reactos/dll/cpl/main/lang/nl-NL.rc trunk/reactos/dll/cpl/main/lang/pl-PL.rc trunk/reactos/dll/cpl/main/lang/ru-RU.rc trunk/reactos/dll/cpl/main/lang/uk-UA.rc trunk/reactos/dll/cpl/main/mouse.c trunk/reactos/dll/cpl/main/resource.h Modified: trunk/reactos/dll/cpl/main/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/cs-CZ.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/cs-CZ.rc (original) +++ trunk/reactos/dll/cpl/main/lang/cs-CZ.rc Sun Apr 22 21:55:11 2007 @@ -163,4 +163,8 @@ IDS_SYSTEM_SCHEME "(systémové schéma)" IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" IDS_BROWSE_TITLE "Browse" + IDS_REMOVE_TITLE "Confirm Scheme Removal" + IDS_REMOVE_TEXT "Are you sure you want to remove the cursor scheme '%s'?" + IDS_OVERWRITE_TITLE "Confirm Cursor Scheme Overwrite" + IDS_OVERWRITE_TEXT "The cursor scheme name you chose is already in use. Do you want to overwrite the existing cursor scheme?" END Modified: trunk/reactos/dll/cpl/main/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/de-DE.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/de-DE.rc (original) +++ trunk/reactos/dll/cpl/main/lang/de-DE.rc Sun Apr 22 21:55:11 2007 @@ -165,4 +165,9 @@ IDS_SYSTEM_SCHEME "(Systemschema)" IDS_BROWSE_FILTER "Cursor (*.ani, *.cur)\0*.ani;*.cur\0Animierte Cursor (*.ani)\0*.ani\0Statische Cursor (*.cur)\0*.cur\0Alle Dateien\0*.*\0\0" IDS_BROWSE_TITLE "Durchsuchen" + IDS_REMOVE_TITLE "Löschen des Cursorschemas bestätigen" + IDS_REMOVE_TEXT "Soll das Cursorschema '%s' wirklich gelöscht werden?" + IDS_OVERWRITE_TITLE "Cursorschema überscheiben" + IDS_OVERWRITE_TEXT "Ein Cursorschema mit diesem Namen existiert bereits. Möchen Sie das existierende Cursorschema überscheiben?" END + Modified: trunk/reactos/dll/cpl/main/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/en-US.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/en-US.rc (original) +++ trunk/reactos/dll/cpl/main/lang/en-US.rc Sun Apr 22 21:55:11 2007 @@ -163,4 +163,8 @@ IDS_SYSTEM_SCHEME "(system scheme)" IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" IDS_BROWSE_TITLE "Browse" + IDS_REMOVE_TITLE "Confirm Cursor Scheme Removal" + IDS_REMOVE_TEXT "Are you sure you want to remove the cursor scheme '%s'?" + IDS_OVERWRITE_TITLE "Confirm Cursor Scheme Overwrite" + IDS_OVERWRITE_TEXT "The cursor scheme name you chose is already in use. Do you want to overwrite the existing cursor scheme?" END Modified: trunk/reactos/dll/cpl/main/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/es-ES.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/es-ES.rc (original) +++ trunk/reactos/dll/cpl/main/lang/es-ES.rc Sun Apr 22 21:55:11 2007 @@ -164,4 +164,8 @@ IDS_SYSTEM_SCHEME "(system scheme)" IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" IDS_BROWSE_TITLE "Browse" + IDS_REMOVE_TITLE "Confirm Scheme Removal" + IDS_REMOVE_TEXT "Are you sure you want to remove the cursor scheme '%s'?" + IDS_OVERWRITE_TITLE "Confirm Cursor Scheme Overwrite" + IDS_OVERWRITE_TEXT "The cursor scheme name you chose is already in use. Do you want to overwrite the existing cursor scheme?" END Modified: trunk/reactos/dll/cpl/main/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/fr-FR.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/fr-FR.rc (original) +++ trunk/reactos/dll/cpl/main/lang/fr-FR.rc Sun Apr 22 21:55:11 2007 @@ -164,4 +164,8 @@ IDS_SYSTEM_SCHEME "(Arrangement système)" IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" IDS_BROWSE_TITLE "Browse" + IDS_REMOVE_TITLE "Confirm Scheme Removal" + IDS_REMOVE_TEXT "Are you sure you want to remove the cursor scheme '%s'?" + IDS_OVERWRITE_TITLE "Confirm Cursor Scheme Overwrite" + IDS_OVERWRITE_TEXT "The cursor scheme name you chose is already in use. Do you want to overwrite the existing cursor scheme?" END Modified: trunk/reactos/dll/cpl/main/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/hu-HU.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/hu-HU.rc (original) +++ trunk/reactos/dll/cpl/main/lang/hu-HU.rc Sun Apr 22 21:55:11 2007 @@ -164,4 +164,8 @@ IDS_SYSTEM_SCHEME "(system scheme)" IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" IDS_BROWSE_TITLE "Browse" + IDS_REMOVE_TITLE "Confirm Scheme Removal" + IDS_REMOVE_TEXT "Are you sure you want to remove the cursor scheme '%s'?" + IDS_OVERWRITE_TITLE "Confirm Cursor Scheme Overwrite" + IDS_OVERWRITE_TEXT "The cursor scheme name you chose is already in use. Do you want to overwrite the existing cursor scheme?" END Modified: trunk/reactos/dll/cpl/main/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/id-ID.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/id-ID.rc (original) +++ trunk/reactos/dll/cpl/main/lang/id-ID.rc Sun Apr 22 21:55:11 2007 @@ -163,4 +163,8 @@ IDS_SYSTEM_SCHEME "(skema sistem)" IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" IDS_BROWSE_TITLE "Browse" + IDS_REMOVE_TITLE "Confirm Scheme Removal" + IDS_REMOVE_TEXT "Are you sure you want to remove the cursor scheme '%s'?" + IDS_OVERWRITE_TITLE "Confirm Cursor Scheme Overwrite" + IDS_OVERWRITE_TEXT "The cursor scheme name you chose is already in use. Do you want to overwrite the existing cursor scheme?" END Modified: trunk/reactos/dll/cpl/main/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/it-IT.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/it-IT.rc (original) +++ trunk/reactos/dll/cpl/main/lang/it-IT.rc Sun Apr 22 21:55:11 2007 @@ -165,4 +165,8 @@ IDS_SYSTEM_SCHEME "(Schema di sistema)" IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" IDS_BROWSE_TITLE "Browse" + IDS_REMOVE_TITLE "Confirm Scheme Removal" + IDS_REMOVE_TEXT "Are you sure you want to remove the cursor scheme '%s'?" + IDS_OVERWRITE_TITLE "Confirm Cursor Scheme Overwrite" + IDS_OVERWRITE_TEXT "The cursor scheme name you chose is already in use. Do you want to overwrite the existing cursor scheme?" END Modified: trunk/reactos/dll/cpl/main/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/ja-JP.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/ja-JP.rc (original) +++ trunk/reactos/dll/cpl/main/lang/ja-JP.rc Sun Apr 22 21:55:11 2007 @@ -163,4 +163,8 @@ IDS_SYSTEM_SCHEME "(system scheme)" IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" IDS_BROWSE_TITLE "Browse" + IDS_REMOVE_TITLE "Confirm Scheme Removal" + IDS_REMOVE_TEXT "Are you sure you want to remove the cursor scheme '%s'?" + IDS_OVERWRITE_TITLE "Confirm Cursor Scheme Overwrite" + IDS_OVERWRITE_TEXT "The cursor scheme name you chose is already in use. Do you want to overwrite the existing cursor scheme?" END Modified: trunk/reactos/dll/cpl/main/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/nl-NL.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/nl-NL.rc (original) +++ trunk/reactos/dll/cpl/main/lang/nl-NL.rc Sun Apr 22 21:55:11 2007 @@ -162,4 +162,8 @@ IDS_SYSTEM_SCHEME "(system scheme)" IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" IDS_BROWSE_TITLE "Browse" + IDS_REMOVE_TITLE "Confirm Scheme Removal" + IDS_REMOVE_TEXT "Are you sure you want to remove the cursor scheme '%s'?" + IDS_OVERWRITE_TITLE "Confirm Cursor Scheme Overwrite" + IDS_OVERWRITE_TEXT "The cursor scheme name you chose is already in use. Do you want to overwrite the existing cursor scheme?" END Modified: trunk/reactos/dll/cpl/main/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/pl-PL.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/pl-PL.rc (original) +++ trunk/reactos/dll/cpl/main/lang/pl-PL.rc Sun Apr 22 21:55:11 2007 @@ -169,4 +169,8 @@ IDS_SYSTEM_SCHEME "(schemat systemu)" IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" IDS_BROWSE_TITLE "Browse" + IDS_REMOVE_TITLE "Confirm Scheme Removal" + IDS_REMOVE_TEXT "Are you sure you want to remove the cursor scheme '%s'?" + IDS_OVERWRITE_TITLE "Confirm Cursor Scheme Overwrite" + IDS_OVERWRITE_TEXT "The cursor scheme name you chose is already in use. Do you want to overwrite the existing cursor scheme?" END Modified: trunk/reactos/dll/cpl/main/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/ru-RU.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/ru-RU.rc (original) +++ trunk/reactos/dll/cpl/main/lang/ru-RU.rc Sun Apr 22 21:55:11 2007 @@ -164,4 +164,8 @@ IDS_SYSTEM_SCHEME "(system scheme)" IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" IDS_BROWSE_TITLE "Browse" + IDS_REMOVE_TITLE "Confirm Scheme Removal" + IDS_REMOVE_TEXT "Are you sure you want to remove the cursor scheme '%s'?" + IDS_OVERWRITE_TITLE "Confirm Cursor Scheme Overwrite" + IDS_OVERWRITE_TEXT "The cursor scheme name you chose is already in use. Do you want to overwrite the existing cursor scheme?" END Modified: trunk/reactos/dll/cpl/main/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/uk-UA.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/uk-UA.rc (original) +++ trunk/reactos/dll/cpl/main/lang/uk-UA.rc Sun Apr 22 21:55:11 2007 @@ -171,4 +171,8 @@ IDS_SYSTEM_SCHEME "(ñèñòåìíà ñõåìà)" IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" IDS_BROWSE_TITLE "Browse" + IDS_REMOVE_TITLE "Confirm Scheme Removal" + IDS_REMOVE_TEXT "Are you sure you want to remove the cursor scheme '%s'?" + IDS_OVERWRITE_TITLE "Confirm Cursor Scheme Overwrite" + IDS_OVERWRITE_TEXT "The cursor scheme name you chose is already in use. Do you want to overwrite the existing cursor scheme?" END Modified: trunk/reactos/dll/cpl/main/mouse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/mouse.c?rev=2…
============================================================================== --- trunk/reactos/dll/cpl/main/mouse.c (original) +++ trunk/reactos/dll/cpl/main/mouse.c Sun Apr 22 21:55:11 2007 @@ -568,6 +568,9 @@ DeleteUserCursorScheme(HWND hwndDlg) { TCHAR szSchemeName[MAX_PATH]; + TCHAR szTitle[128]; + TCHAR szRawText[256]; + TCHAR szText[256]; HWND hDlgCtrl; HKEY hCuKey; HKEY hCuCursorKey; @@ -581,6 +584,15 @@ SendMessage(hDlgCtrl, CB_GETLBTEXT, nSel, (LPARAM)szSchemeName); + LoadString(hApplet, IDS_REMOVE_TITLE, szTitle, 128); + LoadString(hApplet, IDS_REMOVE_TEXT, szRawText, 256); + + _stprintf(szText, szRawText, szSchemeName); + + /* Confirm scheme removal */ + if (MessageBox(hwndDlg, szText, szTitle, MB_YESNO | MB_ICONQUESTION) == IDNO) + return TRUE; + if (RegOpenCurrentUser(KEY_READ | KEY_SET_VALUE, &hCuKey) != ERROR_SUCCESS) return FALSE; @@ -646,12 +658,18 @@ { TCHAR szSystemScheme[MAX_PATH]; TCHAR szSchemeName[MAX_PATH]; + TCHAR szNewSchemeName[MAX_PATH]; + TCHAR szTitle[128]; + TCHAR szText[256]; INT nSel; INT index, i, nLength; LPTSTR lpSchemeData; HKEY hCuKey; HKEY hCuCursorKey; LONG lResult = ERROR_SUCCESS; + BOOL bSchemeExists; + + LoadString(hApplet, IDS_SYSTEM_SCHEME, szSystemScheme, MAX_PATH); nSel = SendDlgItemMessage(hwndDlg, IDC_COMBO_CURSOR_SCHEME, CB_GETCURSEL, 0, 0); if (nSel == CB_ERR) @@ -663,55 +681,83 @@ } else { - SendDlgItemMessage(hwndDlg, IDC_COMBO_CURSOR_SCHEME, CB_GETLBTEXT, nSel, (LPARAM)szSchemeName); - - LoadString(hApplet, IDS_SYSTEM_SCHEME, szSystemScheme, MAX_PATH); - - if (_tcsstr(szSchemeName, szSystemScheme)) + SendDlgItemMessage(hwndDlg, IDC_COMBO_CURSOR_SCHEME, CB_GETLBTEXT, nSel, (LPARAM)szNewSchemeName); + + if (_tcsstr(szNewSchemeName, szSystemScheme)) { - szSchemeName[_tcslen(szSchemeName) - _tcslen(szSystemScheme) - 1] = 0; + szNewSchemeName[_tcslen(szNewSchemeName) - _tcslen(szSystemScheme) - 1] = 0; } } - if (DialogBoxParam(hApplet, MAKEINTRESOURCE(IDD_CURSOR_SCHEME_SAVEAS), - hwndDlg, SaveSchemeProc, (LPARAM)szSchemeName)) - { - /* Save the cursor scheme */ - nLength = 0; - for (index = IDS_ARROW, i = 0; index <= IDS_HAND; index++, i++) + /* Ask for a name for the new cursor scheme */ + if (!DialogBoxParam(hApplet, MAKEINTRESOURCE(IDD_CURSOR_SCHEME_SAVEAS), + hwndDlg, SaveSchemeProc, (LPARAM)szNewSchemeName)) + return TRUE; + + /* Check all non-system schemes for the new name */ + nSel = SendDlgItemMessage(hwndDlg, IDC_COMBO_CURSOR_SCHEME, CB_GETCOUNT, 0, 0); + if (nSel == CB_ERR) + return FALSE; + + bSchemeExists = FALSE; + for (i = 0; i < nSel; i++) + { + SendDlgItemMessage(hwndDlg, IDC_COMBO_CURSOR_SCHEME, CB_GETLBTEXT, i, (LPARAM)szSchemeName); + if (_tcsstr(szSchemeName, szSystemScheme) == NULL) { - if (i > 0) - nLength++; - nLength += _tcslen(g_CursorData[i].szCursorPath); + if (_tcscmp(szSchemeName, szNewSchemeName) == 0) + { + bSchemeExists = TRUE; + break; + } } - nLength++; - - lpSchemeData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nLength * sizeof(TCHAR)); - - for (index = IDS_ARROW, i = 0; index <= IDS_HAND; index++, i++) - { - if (i > 0) - _tcscat(lpSchemeData, _T(",")); - _tcscat(lpSchemeData, g_CursorData[i].szCursorPath); - } - - if (RegOpenCurrentUser(KEY_READ | KEY_SET_VALUE, &hCuKey) != ERROR_SUCCESS) - return FALSE; - - if (RegOpenKeyEx(hCuKey, _T("Control Panel\\Cursors\\Schemes"), 0, KEY_READ | KEY_SET_VALUE, &hCuCursorKey) != ERROR_SUCCESS) - { - RegCloseKey(hCuKey); - return FALSE; - } - - lResult = RegSetValueEx(hCuCursorKey, szSchemeName, 0, REG_EXPAND_SZ, - (LPBYTE)lpSchemeData, nLength * sizeof(TCHAR)); - - RegCloseKey(hCuCursorKey); + } + + if (bSchemeExists) + { + LoadString(hApplet, IDS_OVERWRITE_TITLE, szTitle, 128); + LoadString(hApplet, IDS_OVERWRITE_TEXT, szText, 256); + + /* Confirm scheme overwrite */ + if (MessageBox(hwndDlg, szText, szTitle, MB_YESNO | MB_ICONQUESTION) == IDNO) + return TRUE; + } + + /* Save the cursor scheme */ + nLength = 0; + for (index = IDS_ARROW, i = 0; index <= IDS_HAND; index++, i++) + { + if (i > 0) + nLength++; + nLength += _tcslen(g_CursorData[i].szCursorPath); + } + nLength++; + + lpSchemeData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nLength * sizeof(TCHAR)); + + for (index = IDS_ARROW, i = 0; index <= IDS_HAND; index++, i++) + { + if (i > 0) + _tcscat(lpSchemeData, _T(",")); + _tcscat(lpSchemeData, g_CursorData[i].szCursorPath); + } + + if (RegOpenCurrentUser(KEY_READ | KEY_SET_VALUE, &hCuKey) != ERROR_SUCCESS) + return FALSE; + + if (RegOpenKeyEx(hCuKey, _T("Control Panel\\Cursors\\Schemes"), 0, KEY_READ | KEY_SET_VALUE, &hCuCursorKey) != ERROR_SUCCESS) + { RegCloseKey(hCuKey); - - HeapFree(GetProcessHeap(), 0, lpSchemeData); - } + return FALSE; + } + + lResult = RegSetValueEx(hCuCursorKey, szNewSchemeName, 0, REG_EXPAND_SZ, + (LPBYTE)lpSchemeData, nLength * sizeof(TCHAR)); + + RegCloseKey(hCuCursorKey); + RegCloseKey(hCuKey); + + HeapFree(GetProcessHeap(), 0, lpSchemeData); return (lResult == ERROR_SUCCESS); } Modified: trunk/reactos/dll/cpl/main/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/resource.h?re…
============================================================================== --- trunk/reactos/dll/cpl/main/resource.h (original) +++ trunk/reactos/dll/cpl/main/resource.h Sun Apr 22 21:55:11 2007 @@ -44,7 +44,10 @@ #define IDS_SYSTEM_SCHEME 1032 #define IDS_BROWSE_FILTER 1033 #define IDS_BROWSE_TITLE 1034 - +#define IDS_REMOVE_TITLE 1035 +#define IDS_REMOVE_TEXT 1036 +#define IDS_OVERWRITE_TITLE 1037 +#define IDS_OVERWRITE_TEXT 1038 #define IDC_SWAP_MOUSE_BUTTONS 2000 #define IDC_SLIDER_DOUBLE_CLICK_SPEED 2001
17 years, 5 months
1
0
0
0
[ekohl] 26465: Add missing strings.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Apr 22 19:16:36 2007 New Revision: 26465 URL:
http://svn.reactos.org/svn/reactos?rev=26465&view=rev
Log: Add missing strings. Modified: trunk/reactos/dll/cpl/main/lang/pl-PL.rc Modified: trunk/reactos/dll/cpl/main/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/pl-PL.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/pl-PL.rc (original) +++ trunk/reactos/dll/cpl/main/lang/pl-PL.rc Sun Apr 22 19:16:36 2007 @@ -167,4 +167,6 @@ IDS_HAND "Wybór ³¹cza" IDS_NONE "(Brak)" IDS_SYSTEM_SCHEME "(schemat systemu)" + IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" + IDS_BROWSE_TITLE "Browse" END
17 years, 5 months
1
0
0
0
[ekohl] 26464: - Add the ability to save cursor schemes. - Open the browse dialog upon double-click on a cursor in the cursor list. - Localize the filter string and the title string of the browse dialog.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Apr 22 19:11:04 2007 New Revision: 26464 URL:
http://svn.reactos.org/svn/reactos?rev=26464&view=rev
Log: - Add the ability to save cursor schemes. - Open the browse dialog upon double-click on a cursor in the cursor list. - Localize the filter string and the title string of the browse dialog. Modified: trunk/reactos/dll/cpl/main/lang/cs-CZ.rc trunk/reactos/dll/cpl/main/lang/de-DE.rc trunk/reactos/dll/cpl/main/lang/en-US.rc trunk/reactos/dll/cpl/main/lang/es-ES.rc trunk/reactos/dll/cpl/main/lang/fr-FR.rc trunk/reactos/dll/cpl/main/lang/hu-HU.rc trunk/reactos/dll/cpl/main/lang/id-ID.rc trunk/reactos/dll/cpl/main/lang/it-IT.rc trunk/reactos/dll/cpl/main/lang/ja-JP.rc trunk/reactos/dll/cpl/main/lang/nl-NL.rc trunk/reactos/dll/cpl/main/lang/ru-RU.rc trunk/reactos/dll/cpl/main/lang/uk-UA.rc trunk/reactos/dll/cpl/main/mouse.c trunk/reactos/dll/cpl/main/resource.h Modified: trunk/reactos/dll/cpl/main/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/cs-CZ.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/cs-CZ.rc (original) +++ trunk/reactos/dll/cpl/main/lang/cs-CZ.rc Sun Apr 22 19:11:04 2007 @@ -161,4 +161,6 @@ IDS_HAND "Výbìr odkazu" IDS_NONE "(Není)" IDS_SYSTEM_SCHEME "(systémové schéma)" + IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" + IDS_BROWSE_TITLE "Browse" END Modified: trunk/reactos/dll/cpl/main/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/de-DE.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/de-DE.rc (original) +++ trunk/reactos/dll/cpl/main/lang/de-DE.rc Sun Apr 22 19:11:04 2007 @@ -163,4 +163,6 @@ IDS_HAND "Verknüpfungsauswahl" IDS_NONE "(Kein)" IDS_SYSTEM_SCHEME "(Systemschema)" + IDS_BROWSE_FILTER "Cursor (*.ani, *.cur)\0*.ani;*.cur\0Animierte Cursor (*.ani)\0*.ani\0Statische Cursor (*.cur)\0*.cur\0Alle Dateien\0*.*\0\0" + IDS_BROWSE_TITLE "Durchsuchen" END Modified: trunk/reactos/dll/cpl/main/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/en-US.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/en-US.rc (original) +++ trunk/reactos/dll/cpl/main/lang/en-US.rc Sun Apr 22 19:11:04 2007 @@ -161,4 +161,6 @@ IDS_HAND "Link Select" IDS_NONE "(None)" IDS_SYSTEM_SCHEME "(system scheme)" + IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" + IDS_BROWSE_TITLE "Browse" END Modified: trunk/reactos/dll/cpl/main/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/es-ES.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/es-ES.rc (original) +++ trunk/reactos/dll/cpl/main/lang/es-ES.rc Sun Apr 22 19:11:04 2007 @@ -162,4 +162,6 @@ IDS_HAND "Link Select" IDS_NONE "(None)" IDS_SYSTEM_SCHEME "(system scheme)" + IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" + IDS_BROWSE_TITLE "Browse" END Modified: trunk/reactos/dll/cpl/main/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/fr-FR.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/fr-FR.rc (original) +++ trunk/reactos/dll/cpl/main/lang/fr-FR.rc Sun Apr 22 19:11:04 2007 @@ -162,4 +162,6 @@ IDS_HAND "Sélection de lien" IDS_NONE "(Aucun)" IDS_SYSTEM_SCHEME "(Arrangement système)" + IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" + IDS_BROWSE_TITLE "Browse" END Modified: trunk/reactos/dll/cpl/main/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/hu-HU.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/hu-HU.rc (original) +++ trunk/reactos/dll/cpl/main/lang/hu-HU.rc Sun Apr 22 19:11:04 2007 @@ -162,4 +162,6 @@ IDS_HAND "Link Select" IDS_NONE "(None)" IDS_SYSTEM_SCHEME "(system scheme)" + IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" + IDS_BROWSE_TITLE "Browse" END Modified: trunk/reactos/dll/cpl/main/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/id-ID.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/id-ID.rc (original) +++ trunk/reactos/dll/cpl/main/lang/id-ID.rc Sun Apr 22 19:11:04 2007 @@ -161,4 +161,6 @@ IDS_HAND "Memilih Link" IDS_NONE "(tidak ada)" IDS_SYSTEM_SCHEME "(skema sistem)" + IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" + IDS_BROWSE_TITLE "Browse" END Modified: trunk/reactos/dll/cpl/main/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/it-IT.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/it-IT.rc (original) +++ trunk/reactos/dll/cpl/main/lang/it-IT.rc Sun Apr 22 19:11:04 2007 @@ -163,4 +163,6 @@ IDS_HAND "Seleziona collegamento" IDS_NONE "(Nessuna)" IDS_SYSTEM_SCHEME "(Schema di sistema)" + IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" + IDS_BROWSE_TITLE "Browse" END Modified: trunk/reactos/dll/cpl/main/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/ja-JP.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/ja-JP.rc (original) +++ trunk/reactos/dll/cpl/main/lang/ja-JP.rc Sun Apr 22 19:11:04 2007 @@ -161,4 +161,6 @@ IDS_HAND "Link Select" IDS_NONE "(None)" IDS_SYSTEM_SCHEME "(system scheme)" + IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" + IDS_BROWSE_TITLE "Browse" END Modified: trunk/reactos/dll/cpl/main/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/nl-NL.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/nl-NL.rc (original) +++ trunk/reactos/dll/cpl/main/lang/nl-NL.rc Sun Apr 22 19:11:04 2007 @@ -160,4 +160,6 @@ IDS_HAND "Link Select" IDS_NONE "(None)" IDS_SYSTEM_SCHEME "(system scheme)" + IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" + IDS_BROWSE_TITLE "Browse" END Modified: trunk/reactos/dll/cpl/main/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/ru-RU.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/ru-RU.rc (original) +++ trunk/reactos/dll/cpl/main/lang/ru-RU.rc Sun Apr 22 19:11:04 2007 @@ -162,4 +162,6 @@ IDS_HAND "Link Select" IDS_NONE "(None)" IDS_SYSTEM_SCHEME "(system scheme)" + IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" + IDS_BROWSE_TITLE "Browse" END Modified: trunk/reactos/dll/cpl/main/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/lang/uk-UA.rc…
============================================================================== --- trunk/reactos/dll/cpl/main/lang/uk-UA.rc (original) +++ trunk/reactos/dll/cpl/main/lang/uk-UA.rc Sun Apr 22 19:11:04 2007 @@ -169,4 +169,6 @@ IDS_HAND "Âèá³ð ïîñèëàííÿ" IDS_NONE "(Íåìàº)" IDS_SYSTEM_SCHEME "(ñèñòåìíà ñõåìà)" + IDS_BROWSE_FILTER "Cursors (*.ani, *.cur)\0*.ani;*.cur\0Animated Cursors (*.ani)\0*.ani\0Static Cursors (*.cur)\0*.cur\0All Files\0*.*\0\0" + IDS_BROWSE_TITLE "Browse" END Modified: trunk/reactos/dll/cpl/main/mouse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/mouse.c?rev=2…
============================================================================== --- trunk/reactos/dll/cpl/main/mouse.c (original) +++ trunk/reactos/dll/cpl/main/mouse.c Sun Apr 22 19:11:04 2007 @@ -26,12 +26,8 @@ */ //TODO: -//detect slider changes - for apply stuff -// cursor icon shows - may need overriden items -// implement Pointer-APPLY -// implement Pointer-Browser -// add missing icons -// Options- pointer precision +// add missing icons +// Options- pointer precision #define WINVER 0x0501 @@ -134,8 +130,6 @@ {IDS_UPARROW, IDC_UPARROW, 0, _T(""), _T("")}, {IDS_HAND, IDC_HAND, 0, _T(""), _T("")}}; - -TCHAR g_szNewScheme[MAX_PATH]; #if 0 static VOID @@ -517,8 +511,6 @@ *p = 0; } -// DebugMsg(_T("szCurrentScheme: \"%s\"\nszValueName: \"%s\""), szCurrentScheme, szValueName); - if (_tcscmp(szValueName, szCurrentScheme) == 0) { nSchemeIndex = (INT)i; @@ -619,16 +611,23 @@ IN WPARAM wParam, IN LPARAM lParam) { - HWND hDlgCtrl; - UNREFERENCED_PARAMETER(lParam); - - switch(uMsg) - { + LPTSTR pSchemeName; + + switch (uMsg) + { + case WM_INITDIALOG: + pSchemeName = (LPTSTR)lParam; + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pSchemeName); + SendDlgItemMessage(hwndDlg, IDC_EDIT_SCHEME_NAME, WM_SETTEXT, + 0, (LPARAM)pSchemeName); + break; + case WM_COMMAND: if (LOWORD(wParam) == IDOK) { - hDlgCtrl = GetDlgItem(hwndDlg, IDC_EDIT_SCHEME_NAME); - SendMessage(hDlgCtrl, WM_GETTEXT, (WPARAM)MAX_PATH, (LPARAM)g_szNewScheme); + pSchemeName = (LPTSTR)GetWindowLongPtr(hwndDlg, DWLP_USER); + SendDlgItemMessage(hwndDlg, IDC_EDIT_SCHEME_NAME, WM_GETTEXT, + (WPARAM)MAX_PATH, (LPARAM)pSchemeName); EndDialog(hwndDlg, TRUE); } else if (LOWORD(wParam) == IDCANCEL) @@ -639,6 +638,82 @@ } return FALSE; +} + + +static BOOL +SaveCursorScheme(HWND hwndDlg) +{ + TCHAR szSystemScheme[MAX_PATH]; + TCHAR szSchemeName[MAX_PATH]; + INT nSel; + INT index, i, nLength; + LPTSTR lpSchemeData; + HKEY hCuKey; + HKEY hCuCursorKey; + LONG lResult = ERROR_SUCCESS; + + nSel = SendDlgItemMessage(hwndDlg, IDC_COMBO_CURSOR_SCHEME, CB_GETCURSEL, 0, 0); + if (nSel == CB_ERR) + return FALSE; + + if (nSel == 0) + { + szSchemeName[0] = 0; + } + else + { + SendDlgItemMessage(hwndDlg, IDC_COMBO_CURSOR_SCHEME, CB_GETLBTEXT, nSel, (LPARAM)szSchemeName); + + LoadString(hApplet, IDS_SYSTEM_SCHEME, szSystemScheme, MAX_PATH); + + if (_tcsstr(szSchemeName, szSystemScheme)) + { + szSchemeName[_tcslen(szSchemeName) - _tcslen(szSystemScheme) - 1] = 0; + } + } + + if (DialogBoxParam(hApplet, MAKEINTRESOURCE(IDD_CURSOR_SCHEME_SAVEAS), + hwndDlg, SaveSchemeProc, (LPARAM)szSchemeName)) + { + /* Save the cursor scheme */ + nLength = 0; + for (index = IDS_ARROW, i = 0; index <= IDS_HAND; index++, i++) + { + if (i > 0) + nLength++; + nLength += _tcslen(g_CursorData[i].szCursorPath); + } + nLength++; + + lpSchemeData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nLength * sizeof(TCHAR)); + + for (index = IDS_ARROW, i = 0; index <= IDS_HAND; index++, i++) + { + if (i > 0) + _tcscat(lpSchemeData, _T(",")); + _tcscat(lpSchemeData, g_CursorData[i].szCursorPath); + } + + if (RegOpenCurrentUser(KEY_READ | KEY_SET_VALUE, &hCuKey) != ERROR_SUCCESS) + return FALSE; + + if (RegOpenKeyEx(hCuKey, _T("Control Panel\\Cursors\\Schemes"), 0, KEY_READ | KEY_SET_VALUE, &hCuCursorKey) != ERROR_SUCCESS) + { + RegCloseKey(hCuKey); + return FALSE; + } + + lResult = RegSetValueEx(hCuCursorKey, szSchemeName, 0, REG_EXPAND_SZ, + (LPBYTE)lpSchemeData, nLength * sizeof(TCHAR)); + + RegCloseKey(hCuCursorKey); + RegCloseKey(hCuKey); + + HeapFree(GetProcessHeap(), 0, lpSchemeData); + } + + return (lResult == ERROR_SUCCESS); } @@ -646,22 +721,23 @@ BrowseCursor(HWND hwndDlg) { TCHAR szFileName[MAX_PATH]; + TCHAR szFilter[MAX_PATH]; + TCHAR szTitle[MAX_PATH]; OPENFILENAME ofn; INT nSel; - /* FIXME load text resources from string */ - static TCHAR szFilter[] = _T("Cursors\0*.ani;*.cur\0Animated Cursors\0*.ani\0Static Cursors\0*.cur\0All Files\0*.*\0\0"); + LoadString(hApplet, IDS_BROWSE_FILTER, szFilter, MAX_PATH); + LoadString(hApplet, IDS_BROWSE_TITLE, szTitle, MAX_PATH); memset(szFileName, 0x0, sizeof(szFileName)); nSel = SendDlgItemMessage(hwndDlg, IDC_LISTBOX_CURSOR, LB_GETCURSEL, 0, 0); if (nSel == LB_ERR) { - MessageBox(hwndDlg, _T("LB_ERR"), _T(""),MB_ICONERROR); + MessageBox(hwndDlg, _T("LB_ERR"), _T(""), MB_ICONERROR); return FALSE; } ZeroMemory(&ofn, sizeof(OPENFILENAME)); - ofn.lStructSize = sizeof(OPENFILENAME); ofn.hwndOwner = hwndDlg; ofn.lpstrFilter = szFilter; @@ -669,7 +745,7 @@ ofn.lpstrFile = szFileName; ofn.nMaxFile = MAX_PATH; ofn.lpstrInitialDir = _T("%WINDIR%\\Cursors"); - ofn.lpstrTitle = _T("Browse"); /* FIXME load text resources from string */ + ofn.lpstrTitle = szTitle; ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST; if (!GetOpenFileName(&ofn)) @@ -844,6 +920,15 @@ } +static BOOL +ApplyCursorScheme(HWND hwndDlg) +{ + /* FIXME: Apply the cursor scheme */ + + return TRUE; +} + + static INT_PTR CALLBACK PointerProc(IN HWND hwndDlg, IN UINT uMsg, @@ -898,6 +983,7 @@ lppsn = (LPPSHNOTIFY) lParam; if (lppsn->hdr.code == PSN_APPLY) { + ApplyCursorScheme(hwndDlg); #if (WINVER >= 0x0500) SystemParametersInfo(SPI_SETDROPSHADOW, 0, (PVOID)pPointerData->bDropShadow, SPIF_SENDCHANGE); #endif @@ -920,20 +1006,34 @@ break; case IDC_LISTBOX_CURSOR: - if (HIWORD(wParam) == LBN_SELCHANGE) - { - nSel = SendMessage((HWND)lParam, LB_GETCURSEL, 0, 0); - SendDlgItemMessage(hwndDlg, IDC_IMAGE_CURRENT_CURSOR, STM_SETIMAGE, IMAGE_CURSOR, - (LPARAM)g_CursorData[nSel].hCursor); - EnableWindow(GetDlgItem(hwndDlg,IDC_BUTTON_USE_DEFAULT_CURSOR), - (g_CursorData[nSel].szCursorPath[0] != 0)); + switch (HIWORD(wParam)) + { + case LBN_SELCHANGE: + nSel = SendMessage((HWND)lParam, LB_GETCURSEL, 0, 0); + SendDlgItemMessage(hwndDlg, IDC_IMAGE_CURRENT_CURSOR, STM_SETIMAGE, IMAGE_CURSOR, + (LPARAM)g_CursorData[nSel].hCursor); + EnableWindow(GetDlgItem(hwndDlg,IDC_BUTTON_USE_DEFAULT_CURSOR), + (g_CursorData[nSel].szCursorPath[0] != 0)); + break; + + case LBN_DBLCLK: + if (BrowseCursor(hwndDlg)) + { + /* Update cursor list and preview */ + ReloadCurrentCursorScheme(); + RefreshCursorList(hwndDlg, FALSE); + + /* Enable the "Set Default" button */ + EnableWindow(GetDlgItem(hwndDlg,IDC_BUTTON_USE_DEFAULT_CURSOR), TRUE); + } + break; } break; case IDC_BUTTON_SAVEAS_SCHEME: - if (DialogBox(hApplet, MAKEINTRESOURCE(IDD_CURSOR_SCHEME_SAVEAS), hwndDlg, SaveSchemeProc)) - { - /* FIXME: save the cursor scheme */ + if (SaveCursorScheme(hwndDlg)) + { + } break; Modified: trunk/reactos/dll/cpl/main/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/resource.h?re…
============================================================================== --- trunk/reactos/dll/cpl/main/resource.h (original) +++ trunk/reactos/dll/cpl/main/resource.h Sun Apr 22 19:11:04 2007 @@ -25,7 +25,6 @@ #define IDS_CPLDESCRIPTION_1 1001 #define IDS_CPLNAME_2 1002 #define IDS_CPLDESCRIPTION_2 1003 - #define IDS_ARROW 1016 #define IDS_HELP 1017 #define IDS_APPSTARTING 1018 @@ -43,6 +42,8 @@ #define IDS_HAND 1030 #define IDS_NONE 1031 #define IDS_SYSTEM_SCHEME 1032 +#define IDS_BROWSE_FILTER 1033 +#define IDS_BROWSE_TITLE 1034 #define IDC_SWAP_MOUSE_BUTTONS 2000
17 years, 5 months
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
38
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
Results per page:
10
25
50
100
200