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
November 2015
----- 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
14 participants
457 discussions
Start a n
N
ew thread
[hbelusca] 69934: [USER32]: Update a comment.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Nov 18 21:38:45 2015 New Revision: 69934 URL:
http://svn.reactos.org/svn/reactos?rev=69934&view=rev
Log: [USER32]: Update a comment. Modified: trunk/reactos/win32ss/user/user32/windows/dialog.c Modified: trunk/reactos/win32ss/user/user32/windows/dialog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/dialog.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/dialog.c [iso-8859-1] Wed Nov 18 21:38:45 2015 @@ -585,16 +585,16 @@ /* * If the user is pressing Ctrl+C, send a WM_COPY message. - * Guido Pola, Bug 5281, Is there another way to check if the Dialog it's a MessageBox? + * Guido Pola, CORE-4829, Is there another way to check if the Dialog is a MessageBox? */ - if( msg.message == WM_KEYDOWN && + if (msg.message == WM_KEYDOWN && pWnd->state & WNDS_MSGBOX && // Yes! - GetForegroundWindow() == hwnd ) + GetForegroundWindow() == hwnd) { - if( msg.wParam == L'C' && GetKeyState(VK_CONTROL) < 0 ) - SendMessageW( hwnd, WM_COPY, 0, 0); + if (msg.wParam == L'C' && GetKeyState(VK_CONTROL) < 0) + SendMessageW(hwnd, WM_COPY, 0, 0); } - + if (!IsWindow( hwnd )) return 0; if (!(dlgInfo->flags & DF_END) && !IsDialogMessageW( hwnd, &msg)) {
8 years, 10 months
1
0
0
0
[jimtabor] 69933: [User32] - Patch by Dmitry Timoshkov : Menu item with a "magic" bitmap should not have MFT_BITMAP type set. - Wine sync port.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Wed Nov 18 21:28:57 2015 New Revision: 69933 URL:
http://svn.reactos.org/svn/reactos?rev=69933&view=rev
Log: [User32] - Patch by Dmitry Timoshkov : Menu item with a "magic" bitmap should not have MFT_BITMAP type set. - Wine sync port. Modified: trunk/reactos/win32ss/user/user32/windows/menu.c Modified: trunk/reactos/win32ss/user/user32/windows/menu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/menu.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/menu.c [iso-8859-1] Wed Nov 18 21:28:57 2015 @@ -201,7 +201,8 @@ return FALSE; } lpmii->fType = pItem->fType & MENUITEMINFO_TYPE_MASK; - if( pItem->hbmp) lpmii->fType |= MFT_BITMAP; + if (pItem->hbmp && !IS_MAGIC_BITMAP(pItem->hbmp)) + lpmii->fType |= MFT_BITMAP; lpmii->hbmpItem = pItem->hbmp; /* not on Win9x/ME */ if( lpmii->fType & MFT_BITMAP) {
8 years, 10 months
1
0
0
0
[jimtabor] 69932: [Win32SS] - Patch by Huw Davies : Restore the dc's colours after sending WM_DRAWITEM. - Wine sync port.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Wed Nov 18 21:25:33 2015 New Revision: 69932 URL:
http://svn.reactos.org/svn/reactos?rev=69932&view=rev
Log: [Win32SS] - Patch by Huw Davies : Restore the dc's colours after sending WM_DRAWITEM. - Wine sync port. Modified: trunk/reactos/win32ss/user/ntuser/menu.c Modified: trunk/reactos/win32ss/user/ntuser/menu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/menu.c…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] Wed Nov 18 21:25:33 2015 @@ -2266,6 +2266,7 @@ ** the menu owner has finished drawing. */ DRAWITEMSTRUCT dis; + COLORREF old_bk, old_text; dis.CtlType = ODT_MENU; dis.CtlID = 0; @@ -2289,7 +2290,11 @@ dis.hDC, dis.rcItem.left, dis.rcItem.top, dis.rcItem.right, dis.rcItem.bottom); TRACE("Ownerdraw: Width %d Height %d\n", dis.rcItem.right-dis.rcItem.left, dis.rcItem.bottom-dis.rcItem.top); + old_bk = GreGetBkColor(hdc); + old_text = GreGetTextColor(hdc); co_IntSendMessage(UserHMGetHandle(WndOwner), WM_DRAWITEM, 0, (LPARAM) &dis); + IntGdiSetBkColor(hdc, old_bk); + IntGdiSetTextColor(hdc, old_text); /* Draw the popup-menu arrow */ if (!menuBar && lpitem->spSubMenu) {
8 years, 10 months
1
0
0
0
[gedmurphy] 69931: [CHARMAP] - Start to implement the charmap required for the 0.4 release - We now have a basic dialog with the grid in place CORE-10518
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed Nov 18 19:24:08 2015 New Revision: 69931 URL:
http://svn.reactos.org/svn/reactos?rev=69931&view=rev
Log: [CHARMAP] - Start to implement the charmap required for the 0.4 release - We now have a basic dialog with the grid in place CORE-10518 Added: trunk/reactos/base/applications/charmap_new/ trunk/reactos/base/applications/charmap_new/CMakeLists.txt (with props) trunk/reactos/base/applications/charmap_new/Cell.cpp (with props) trunk/reactos/base/applications/charmap_new/Cell.h (with props) trunk/reactos/base/applications/charmap_new/GridView.cpp (with props) trunk/reactos/base/applications/charmap_new/GridView.h (with props) trunk/reactos/base/applications/charmap_new/MainWindow.cpp (with props) trunk/reactos/base/applications/charmap_new/MainWindow.h (with props) trunk/reactos/base/applications/charmap_new/charmap.cpp (with props) trunk/reactos/base/applications/charmap_new/charmap.rc (with props) trunk/reactos/base/applications/charmap_new/lang/ trunk/reactos/base/applications/charmap_new/lang/en-US.rc (with props) trunk/reactos/base/applications/charmap_new/precomp.h (with props) trunk/reactos/base/applications/charmap_new/res/ trunk/reactos/base/applications/charmap_new/res/charmap.ico (with props) trunk/reactos/base/applications/charmap_new/resource.h (with props) Added: trunk/reactos/base/applications/charmap_new/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap_…
============================================================================== --- trunk/reactos/base/applications/charmap_new/CMakeLists.txt (added) +++ trunk/reactos/base/applications/charmap_new/CMakeLists.txt [iso-8859-1] Wed Nov 18 19:24:08 2015 @@ -0,0 +1,27 @@ +PROJECT(CHARMAP) + +set_cpp(WITH_RTTI WITH_RUNTIME WITH_EXCEPTIONS) + +if(NOT MSVC) + # HACK: this should be enabled globally! + add_compile_flags_language("-std=c++11" "CXX") +endif() + +include_directories( + ${REACTOS_SOURCE_DIR}/lib/atl + includes) + +list(APPEND SOURCE + precomp.h + MainWindow.cpp + ) + +add_library(charmap SHARED + ${SOURCE} + charmap.rc) + +set_module_type(charmap win32gui UNICODE) +target_link_libraries(charmap uuid atlnew wine) +add_importlibs(charmap advapi32 user32 gdi32 comctl32 version msvcrt kernel32 ole32 uxtheme ntdll) +add_pch(charmap precomp.h SOURCE) +add_cd_file(TARGET charmap DESTINATION reactos/system32 FOR all) Propchange: trunk/reactos/base/applications/charmap_new/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/charmap_new/Cell.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap_…
============================================================================== --- trunk/reactos/base/applications/charmap_new/Cell.cpp (added) +++ trunk/reactos/base/applications/charmap_new/Cell.cpp [iso-8859-1] Wed Nov 18 19:24:08 2015 @@ -0,0 +1,85 @@ +/* +* PROJECT: ReactOS Character Map +* LICENSE: GPL - See COPYING in the top level directory +* FILE: base/applications/charmap/cell.cpp +* PURPOSE: Class for each individual cell +* COPYRIGHT: Copyright 2015 Ged Murphy <gedmurphy(a)reactos.org> +*/ + + +#include "precomp.h" +#include "Cell.h" + + +/* DATA *****************************************************/ + + +/* PUBLIC METHODS **********************************************/ + +CCell::CCell( + _In_ HWND hParent + ) : + CCell(hParent, RECT{0}) +{ +} + +CCell::CCell( + _In_ HWND hParent, + _In_ RECT& CellCoordinates + ) : + m_hParent(hParent), + m_CellCoordinates(CellCoordinates), + ch(L'*'), + m_bHasFocus(false), + m_bIsLarge(false) +{ +} + +CCell::~CCell() +{ +} + +bool +CCell::OnPaint(_In_ PAINTSTRUCT &PaintStruct) +{ + // Check if this cell is in our paint region + BOOL NeedsPaint; RECT rect; + NeedsPaint = IntersectRect(&rect, + &PaintStruct.rcPaint, + &m_CellCoordinates); + if (NeedsPaint == FALSE) + return false; + + // Draw the cell border + BOOL b = Rectangle(PaintStruct.hdc, + m_CellCoordinates.left, + m_CellCoordinates.top, + m_CellCoordinates.right, + m_CellCoordinates.bottom); + + // Check if this cell has focus + if (m_bHasFocus) + { + // Take a copy of the border dims and make it slightly smaller + RECT Internal; + CopyRect(&Internal, &m_CellCoordinates); + InflateRect(&Internal, -1, -1); + + // Draw the smaller cell to make it look selected + Rectangle(PaintStruct.hdc, + Internal.left, + Internal.top, + Internal.right, + Internal.bottom); + } + + return true; +} + +void +CCell::SetCellCoordinates( + _In_ RECT& Coordinates + ) +{ + m_CellCoordinates = Coordinates; +} Propchange: trunk/reactos/base/applications/charmap_new/Cell.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/charmap_new/Cell.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap_…
============================================================================== --- trunk/reactos/base/applications/charmap_new/Cell.h (added) +++ trunk/reactos/base/applications/charmap_new/Cell.h [iso-8859-1] Wed Nov 18 19:24:08 2015 @@ -0,0 +1,35 @@ +#pragma once +class CCell +{ +private: + HWND m_hParent; + RECT m_CellCoordinates; + + bool m_bHasFocus; + bool m_bIsLarge; + WCHAR ch; + +public: + CCell( + _In_ HWND hParent + ); + + CCell( + _In_ HWND hParent, + _In_ RECT& CellLocation + ); + + ~CCell(); + + LPRECT GetCellCoordinates() { return &m_CellCoordinates; } + void SetFocus(_In_ bool HasFocus) { m_bHasFocus = HasFocus; } + + bool OnPaint( + _In_ PAINTSTRUCT &PaintStruct + ); + + void SetCellCoordinates( + _In_ RECT& Coordinates + ); +}; + Propchange: trunk/reactos/base/applications/charmap_new/Cell.h ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/charmap_new/GridView.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap_…
============================================================================== --- trunk/reactos/base/applications/charmap_new/GridView.cpp (added) +++ trunk/reactos/base/applications/charmap_new/GridView.cpp [iso-8859-1] Wed Nov 18 19:24:08 2015 @@ -0,0 +1,305 @@ +/* +* PROJECT: ReactOS Character Map +* LICENSE: GPL - See COPYING in the top level directory +* FILE: base/applications/charmap/GridView.cpp +* PURPOSE: Class for for the window which contains the font matrix +* COPYRIGHT: Copyright 2015 Ged Murphy <gedmurphy(a)reactos.org> +*/ + + +#include "precomp.h" +#include "GridView.h" +#include "Cell.h" + + +/* DATA *****************************************************/ + +extern HINSTANCE g_hInstance; + + +/* PUBLIC METHODS **********************************************/ + +CGridView::CGridView() : + m_xNumCells(20), + m_yNumCells(10) +{ + m_szMapWndClass = L"CharGridWClass"; +} + +CGridView::~CGridView() +{ +} + +bool +CGridView::Create( + _In_ HWND hParent + ) +{ + WNDCLASSW wc = { 0 }; + wc.style = CS_DBLCLKS; + wc.lpfnWndProc = MapWndProc; + wc.cbWndExtra = sizeof(CGridView *); + wc.hInstance = g_hInstance; + wc.hCursor = LoadCursorW(NULL, (LPWSTR)IDC_ARROW); + wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); + wc.lpszClassName = m_szMapWndClass; + + if (RegisterClassW(&wc)) + { + m_hwnd = CreateWindowExW(0, + m_szMapWndClass, + NULL, + WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, + 0,0,0,0, + hParent, + NULL, + g_hInstance, + this); + + } + + return !!(m_hwnd != NULL); +} + +bool +CGridView::UpdateGridLayout( + ) +{ + // Go through all the cells and calculate + // their coordinates within the grid + for (int y = 0; y < m_yNumCells; y++) + for (int x = 0; x < m_xNumCells; x++) + { + RECT CellCoordinates; + CellCoordinates.left = x * m_CellSize.cx + 1; + CellCoordinates.top = y * m_CellSize.cy + 1; + CellCoordinates.right = (x + 1) * m_CellSize.cx + 2; + CellCoordinates.bottom = (y + 1) * m_CellSize.cy + 2; + + m_Cells[y][x]->SetCellCoordinates(CellCoordinates); + } + + return true; +} + +LRESULT +CGridView::OnCreate( + _In_ HWND hwnd, + _In_ HWND hParent + ) +{ + m_hwnd = hwnd; + m_hParent = hParent; + + // C++ doesn't allow : "CCells ***C = new CCell***[x * y]" + // so we have to build the 2d array up manually + m_Cells = new CCell**[m_yNumCells]; // rows + for (int i = 0; i < m_yNumCells; i++) + m_Cells[i] = new CCell*[m_xNumCells]; // columns + + for (int y = 0; y < m_yNumCells; y++) + for (int x = 0; x < m_xNumCells; x++) + { + m_Cells[y][x] = new CCell(m_hwnd); + } + + // Give the first cell focus + SetCellFocus(m_Cells[0][0]); + + return 0; +} + +LRESULT +CGridView::OnSize( + _In_ INT Width, + _In_ INT Height + ) +{ + // Get the client area of the main dialog + RECT ParentRect; + GetClientRect(m_hParent, &ParentRect); + + // Calculate the grid size using the parent + m_ClientCoordinates.left = ParentRect.left + 25; + m_ClientCoordinates.top = ParentRect.top + 50; + m_ClientCoordinates.right = ParentRect.right - m_ClientCoordinates.left - 10; + m_ClientCoordinates.bottom = ParentRect.bottom - m_ClientCoordinates.top - 70; + + SetWindowPos(m_hwnd, + NULL, + m_ClientCoordinates.left, + m_ClientCoordinates.top, + m_ClientCoordinates.right, + m_ClientCoordinates.bottom, + SWP_NOZORDER | SWP_SHOWWINDOW); + + // Get the client area we can draw on. The position we set above + // includes a scrollbar. GetClientRect gives us the size without + // the scroll, and it more efficient than getting the scroll + // metrics and calculating the size + RECT ClientRect; + GetClientRect(m_hwnd, &ClientRect); + m_CellSize.cx = ClientRect.right / m_xNumCells; + m_CellSize.cy = ClientRect.bottom / m_yNumCells; + + UpdateGridLayout(); + + return 0; +} + +LRESULT +CGridView::OnPaint( + _In_opt_ HDC hdc + ) +{ + PAINTSTRUCT PaintStruct = { 0 }; + HDC LocalHdc = NULL; + BOOL bSuccess = FALSE; + + // Check if we were passed a DC + if (hdc == NULL) + { + // We weren't, let's get one + LocalHdc = BeginPaint(m_hwnd, &PaintStruct); + if (LocalHdc) bSuccess = TRUE; + } + else + { + // Use the existing DC and just get the region to paint + bSuccess = GetUpdateRect(m_hwnd, + &PaintStruct.rcPaint, + TRUE); + if (bSuccess) + { + // Update the struct with the DC we were passed + PaintStruct.hdc = (HDC)hdc; + } + } + + if (bSuccess) + { + DrawGrid(&PaintStruct); + + if (LocalHdc) + { + EndPaint(m_hwnd, &PaintStruct); + } + } + + return 0; +} + +LRESULT +CALLBACK +CGridView::MapWndProc( + HWND hwnd, + UINT uMsg, + WPARAM wParam, + LPARAM lParam + ) +{ + CGridView *This; + LRESULT RetCode = 0; + + // Get the object pointer from window context + This = (CGridView *)GetWindowLongPtr(hwnd, GWLP_USERDATA); + if (This == NULL) + { + // Check that this isn't a create message + if (uMsg != WM_CREATE) + { + // Don't handle null info pointer + goto HandleDefaultMessage; + } + } + + switch (uMsg) + { + case WM_CREATE: + { + // Get the object pointer from the create param + This = (CGridView *)((LPCREATESTRUCT)lParam)->lpCreateParams; + + // Store the pointer in the window's global user data + SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)This); + + This->OnCreate(hwnd, ((LPCREATESTRUCTW)lParam)->hwndParent); + break; + } + + case WM_SIZE: + { + INT Width, Height; + Width = LOWORD(lParam); + Height = HIWORD(lParam); + + This->OnSize(Width, Height); + break; + } + + case WM_PAINT: + { + This->OnPaint((HDC)wParam); + break; + } + + case WM_DESTROY: + { + This->DeleteCells(); + break; + } + + default: + { +HandleDefaultMessage: + RetCode = DefWindowProcW(hwnd, uMsg, wParam, lParam); + break; + } + } + + return RetCode; +} + + +void +CGridView::DrawGrid( + _In_ LPPAINTSTRUCT PaintStruct + ) +{ + // Traverse all the cells and tell them to paint themselves + for (int y = 0; y < m_yNumCells; y++) + for (int x = 0; x < m_xNumCells; x++) + { + m_Cells[y][x]->OnPaint(*PaintStruct); + } +} + +void +CGridView::DeleteCells() +{ + if (m_Cells == nullptr) + return; + + // Free cells withing the 2d array + for (int i = 0; i < m_yNumCells; i++) + delete[] m_Cells[i]; + delete[] m_Cells; + + m_Cells = nullptr; +} + +void +CGridView::SetCellFocus( + _In_ CCell* NewActiveCell + ) +{ + if (m_ActiveCell) + { + // Remove focus from any existing cell + m_ActiveCell->SetFocus(false); + } + + // Set the new active cell and give it focus + m_ActiveCell = NewActiveCell; + m_ActiveCell->SetFocus(true); +} Propchange: trunk/reactos/base/applications/charmap_new/GridView.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/charmap_new/GridView.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap_…
============================================================================== --- trunk/reactos/base/applications/charmap_new/GridView.h (added) +++ trunk/reactos/base/applications/charmap_new/GridView.h [iso-8859-1] Wed Nov 18 19:24:08 2015 @@ -0,0 +1,85 @@ +#pragma once +#include "Cell.h" + +//typedef struct _CELL +//{ +// RECT CellExt; +// RECT CellInt; +// BOOL bActive; +// BOOL bLarge; +// WCHAR ch; +// +//} CELL, *PCELL; + +#define MAX_GLYPHS 0xFFFF + + +class CGridView +{ +private: + CAtlStringW m_szMapWndClass; + + HWND m_hwnd; + HWND m_hParent; + + int m_xNumCells; + int m_yNumCells; + + RECT m_ClientCoordinates; + //SIZE ClientSize; + SIZE m_CellSize; + CCell*** m_Cells; // m_Cells[][]; + CCell *m_ActiveCell; + + HFONT hFont; + LOGFONTW CurrentFont; + INT iYStart; + + USHORT ValidGlyphs[MAX_GLYPHS]; + USHORT NumValidGlyphs; + +public: + CGridView(); + ~CGridView(); + + bool Create( + _In_ HWND hParent + ); + +private: + static LRESULT + CALLBACK + MapWndProc(HWND hwnd, + UINT uMsg, + WPARAM wParam, + LPARAM lParam); + + LRESULT OnCreate( + _In_ HWND hwnd, + _In_ HWND hParent + ); + + + LRESULT OnSize( + _In_ INT Width, + _In_ INT Height + ); + + LRESULT OnPaint( + _In_opt_ HDC hdc + ); + + bool UpdateGridLayout( + ); + + void DrawGrid( + _In_ LPPAINTSTRUCT PaintStruct + ); + + void DeleteCells(); + + void SetCellFocus( + _In_ CCell* NewActiveCell + ); +}; + Propchange: trunk/reactos/base/applications/charmap_new/GridView.h ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/charmap_new/MainWindow.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap_…
============================================================================== --- trunk/reactos/base/applications/charmap_new/MainWindow.cpp (added) +++ trunk/reactos/base/applications/charmap_new/MainWindow.cpp [iso-8859-1] Wed Nov 18 19:24:08 2015 @@ -0,0 +1,507 @@ +/* +* PROJECT: ReactOS Character Map +* LICENSE: GPL - See COPYING in the top level directory +* FILE: base/applications/charmap/MainWindow.cpp +* PURPOSE: Implements the main dialog window +* COPYRIGHT: Copyright 2015 Ged Murphy <gedmurphy(a)reactos.org> +*/ + + +#include "precomp.h" +#include "MainWindow.h" + + +/* DATA *****************************************************/ + +#define ID_ABOUT 0x1 + +HINSTANCE g_hInstance = NULL; + + +/* PUBLIC METHODS **********************************************/ + +CCharMapWindow::CCharMapWindow(void) : + m_hMainWnd(NULL), + m_hStatusBar(NULL), + m_CmdShow(0), + m_hRichEd(NULL), + m_GridView(nullptr) +{ + m_GridView = new CGridView(); +} + +CCharMapWindow::~CCharMapWindow(void) +{ +} + +bool +CCharMapWindow::Create(_In_ HINSTANCE hInst, + _In_ int nCmdShow) +{ + INITCOMMONCONTROLSEX icex; + CAtlStringW szAppName; + int Ret = 1; + + // Store the instance + g_hInstance = hInst; + m_CmdShow = nCmdShow; + + // Initialize common controls + icex.dwSize = sizeof(INITCOMMONCONTROLSEX); + icex.dwICC = ICC_BAR_CLASSES | ICC_COOL_CLASSES; + InitCommonControlsEx(&icex); + + // Load the application name + if (szAppName.LoadStringW(g_hInstance, IDS_TITLE)) + { + // Initialize the main window + if (Initialize(szAppName, nCmdShow)) + { + // Run the application + Ret = Run(); + + // Uninitialize the main window + Uninitialize(); + } + } + + return (Ret == 0); +} + + + +/* PRIVATE METHODS **********************************************/ + +bool +CCharMapWindow::Initialize(_In_z_ LPCTSTR lpCaption, + _In_ int nCmdShow) +{ + // The dialog has a rich edit text box + m_hRichEd = LoadLibraryW(L"riched20.DLL"); + if (m_hRichEd == NULL) return false; + + return !!(CreateDialogParamW(g_hInstance, + MAKEINTRESOURCE(IDD_CHARMAP), + NULL, + DialogProc, + (LPARAM)this)); +} + +void +CCharMapWindow::Uninitialize(void) +{ + if (m_hRichEd) + FreeLibrary(m_hRichEd); +} + +int +CCharMapWindow::Run(void) +{ + MSG Msg; + + // Pump the message queue + while (GetMessageW(&Msg, NULL, 0, 0) != 0) + { + TranslateMessage(&Msg); + DispatchMessageW(&Msg); + } + + return 0; +} + +void +CCharMapWindow::UpdateStatusBar(_In_ bool InMenuLoop) +{ + SendMessageW(m_hStatusBar, + SB_SIMPLE, + (WPARAM)InMenuLoop, + 0); +} + +bool +CCharMapWindow::CreateStatusBar(void) +{ + int StatWidths[] = { 110, -1 }; // widths of status bar + bool bRet = FALSE; + + // Create the status bar + m_hStatusBar = CreateWindowExW(0, + STATUSCLASSNAME, + NULL, + WS_CHILD | WS_VISIBLE | SBARS_SIZEGRIP, + 0, 0, 0, 0, + m_hMainWnd, + (HMENU)IDD_STATUSBAR, + g_hInstance, + NULL); + if (m_hStatusBar) + { + // Create the sections + bRet = (SendMessageW(m_hStatusBar, + SB_SETPARTS, + sizeof(StatWidths) / sizeof(int), + (LPARAM)StatWidths) != 0); + + // Set the status bar for multiple parts output + SendMessage(m_hStatusBar, SB_SIMPLE, (WPARAM)FALSE, (LPARAM)0); + } + + return bRet; +} + +bool +CCharMapWindow::StatusBarLoadString(_In_ HWND hStatusBar, + _In_ INT PartId, + _In_ HINSTANCE hInstance, + _In_ UINT uID) +{ + CAtlStringW szMessage; + bool bRet = false; + + // Load the string from the resource + if (szMessage.LoadStringW(hInstance, uID)) + { + // Display it on the status bar + bRet = (SendMessageW(hStatusBar, + SB_SETTEXT, + (WPARAM)PartId, + (LPARAM)szMessage.GetBuffer()) != 0); + } + + return bRet; +} + +BOOL +CCharMapWindow::OnCreate(_In_ HWND hDlg) +{ + m_hMainWnd = hDlg; + + if (!CreateStatusBar()) + return FALSE; + + if (!m_GridView->Create(hDlg)) + return FALSE; + + // Load an 'about' option into the system menu + HMENU hSysMenu; + hSysMenu = GetSystemMenu(m_hMainWnd, FALSE); + if (hSysMenu != NULL) + { + CAtlStringW AboutText; + if (AboutText.LoadStringW(IDS_ABOUT)) + { + AppendMenuW(hSysMenu, MF_SEPARATOR, 0, NULL); + AppendMenuW(hSysMenu, MF_STRING, ID_ABOUT, AboutText); + } + } + + // Add all the fonts to the + if (!CreateFontComboBox()) + return FALSE; + + // Configure Richedit control for sending notification changes. + DWORD evMask; + evMask = SendDlgItemMessage(hDlg, IDC_TEXTBOX, EM_GETEVENTMASK, 0, 0); + evMask |= ENM_CHANGE; + SendDlgItemMessage(hDlg, IDC_TEXTBOX, EM_SETEVENTMASK, 0, (LPARAM)evMask); + + // Display the window according to the user request + ShowWindow(m_hMainWnd, m_CmdShow); + + return TRUE; +} + +BOOL +CCharMapWindow::OnSize(void) +{ + RECT rcClient, rcStatus; + INT lvHeight, iStatusHeight; + + // Resize the status bar + SendMessage(m_hStatusBar, WM_SIZE, 0, 0); + + // Get the statusbar rect and save the height + GetWindowRect(m_hStatusBar, &rcStatus); + iStatusHeight = rcStatus.bottom - rcStatus.top; + + // Get the full client rect + GetClientRect(m_hMainWnd, &rcClient); + + // Calculate the remaining height for the treeview + lvHeight = rcClient.bottom - iStatusHeight; + + // Resize the device view + //m_GridView->OnSize(0, + // iToolHeight, + // rcClient.right, + // lvHeight); + + return TRUE; +} + +BOOL +CCharMapWindow::OnNotify(_In_ LPARAM lParam) +{ + LPNMHDR NmHdr = (LPNMHDR)lParam; + LRESULT Ret = 0; + + switch (NmHdr->code) + { + case NM_RCLICK: + { + break; + } + + case NM_DBLCLK: + case NM_RETURN: + { + break; + } + } + + return Ret; +} + +BOOL +CCharMapWindow::OnContext(_In_ LPARAM lParam) +{ + return 0;// m_GridView->OnContextMenu(lParam); +} + +BOOL +CCharMapWindow::OnCommand(_In_ WPARAM wParam, + _In_ LPARAM /*lParam*/) +{ + LRESULT RetCode = 0; + WORD Msg; + + // Get the message + Msg = LOWORD(wParam); + + switch (Msg) + { + case IDC_CHECK_ADVANCED: + break; + + default: + // We didn't handle it + RetCode = -1; + break; + } + + return RetCode; +} + +BOOL +CCharMapWindow::OnDestroy(void) +{ + // Clear the user data pointer + SetWindowLongPtr(m_hMainWnd, GWLP_USERDATA, 0); + + // Break the message loop + PostQuitMessage(0); + + return TRUE; +} + +INT_PTR CALLBACK +CCharMapWindow::DialogProc( + _In_ HWND hwndDlg, + _In_ UINT Msg, + _In_ WPARAM wParam, + _In_ LPARAM lParam + ) +{ + CCharMapWindow *This; + LRESULT RetCode = 0; + + // Get the object pointer from window context + This = (CCharMapWindow *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + if (This == NULL) + { + // Check that this isn't a create message + if (Msg != WM_INITDIALOG) + { + // Don't handle null info pointer + return FALSE; + } + } + + switch (Msg) + { + case WM_INITDIALOG: + { + // Get the object pointer from the create param + This = (CCharMapWindow *)lParam; + + // Store the pointer in the window's global user data + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)This); + + // Call the create handler + return This->OnCreate(hwndDlg); + } + + case WM_SIZE: + { + return This->OnSize(); + } + + case WM_NOTIFY: + { + return This->OnNotify(lParam); + } + + case WM_CONTEXTMENU: + { + return This->OnContext(lParam); + } + + case WM_COMMAND: + { + return This->OnCommand(wParam, lParam); + } + + case WM_SYSCOMMAND: + switch (wParam) + { + case ID_ABOUT: + // Apportion blame + MessageBoxW(This->m_hMainWnd, + L"ReactOS Character Map\r\nCopyright Ged Murphy 2015", + L"About", + MB_OK | MB_APPLMODAL); + break; + } + break; + + case WM_ENTERMENULOOP: + { + This->UpdateStatusBar(true); + return TRUE; + } + + case WM_EXITMENULOOP: + { + This->UpdateStatusBar(false); + return TRUE; + } + + case WM_CLOSE: + { + // Destroy the main window + return DestroyWindow(hwndDlg); + } + + + case WM_DESTROY: + { + // Call the destroy handler + return This->OnDestroy(); + } + } + + return FALSE; +} + +struct EnumFontParams +{ + CCharMapWindow *This; + HWND hCombo; +}; + +int +CALLBACK +CCharMapWindow::EnumDisplayFont(ENUMLOGFONTEXW *lpelfe, + NEWTEXTMETRICEXW *lpntme, + DWORD FontType, + LPARAM lParam) +{ + EnumFontParams *Params = (EnumFontParams *)lParam; + LPWSTR pszName = lpelfe->elfLogFont.lfFaceName; + + /* Skip rotated font */ + if (pszName[0] == L'@') return 1; + + /* make sure font doesn't already exist in our list */ + if (SendMessageW(Params->hCombo, + CB_FINDSTRINGEXACT, + 0, + (LPARAM)pszName) == CB_ERR) + { + INT idx; + idx = (INT)SendMessageW(Params->hCombo, + CB_ADDSTRING, + 0, + (LPARAM)pszName); + + /* record the font's attributes (Fixedwidth and Truetype) */ + BOOL fFixed = (lpelfe->elfLogFont.lfPitchAndFamily & FIXED_PITCH) ? TRUE : FALSE; + BOOL fTrueType = (lpelfe->elfLogFont.lfOutPrecision == OUT_STROKE_PRECIS) ? TRUE : FALSE; + + /* store this information in the list-item's userdata area */ + SendMessageW(Params->hCombo, + CB_SETITEMDATA, + idx, + MAKEWPARAM(fFixed, fTrueType)); + } + + return 1; +} + + +bool +CCharMapWindow::CreateFontComboBox() +{ + HWND hCombo; + hCombo = GetDlgItem(m_hMainWnd, IDC_FONTCOMBO); + + NONCLIENTMETRICSW NonClientMetrics; + NonClientMetrics.cbSize = sizeof(NONCLIENTMETRICSW); + SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, + sizeof(NONCLIENTMETRICSW), + &NonClientMetrics, + 0); + + // Get a handle to the font + HFONT GuiFont; + GuiFont = CreateFontIndirectW(&NonClientMetrics.lfMessageFont); + + // Set the font used in the combo box + SendMessageW(hCombo, + WM_SETFONT, + (WPARAM)GuiFont, + 0); + + // Set the fonts which we want to enumerate + LOGFONTW FontsToEnum; + ZeroMemory(&FontsToEnum, sizeof(LOGFONTW)); + FontsToEnum.lfCharSet = DEFAULT_CHARSET; + + // Set the params we want to pass to the callback + EnumFontParams Params; + Params.This = this; + Params.hCombo = hCombo; + + // Get a DC for combo box + HDC hdc; + hdc = GetDC(hCombo); + + // Enumerate all the fonts + int ret; + ret = EnumFontFamiliesExW(hdc, + &FontsToEnum, + (FONTENUMPROCW)EnumDisplayFont, + (LPARAM)&Params, + 0); + + ReleaseDC(hCombo, hdc); + DeleteObject(GuiFont); + + // Select the first item in the list + SendMessageW(hCombo, + CB_SETCURSEL, + 0, + 0); + + return (ret == 1); +} Propchange: trunk/reactos/base/applications/charmap_new/MainWindow.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/charmap_new/MainWindow.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap_…
============================================================================== --- trunk/reactos/base/applications/charmap_new/MainWindow.h (added) +++ trunk/reactos/base/applications/charmap_new/MainWindow.h [iso-8859-1] Wed Nov 18 19:24:08 2015 @@ -0,0 +1,81 @@ +#pragma once +#include "GridView.h" + +class CCharMapWindow +{ + HWND m_hMainWnd; + HWND m_hStatusBar; + int m_CmdShow; + HMODULE m_hRichEd; + + CGridView *m_GridView; + +public: + CCharMapWindow(void); + ~CCharMapWindow(void); + + bool Create( + _In_ HINSTANCE hInst, + _In_ int nCmdShow + ); + +private: + static INT_PTR CALLBACK DialogProc( + _In_ HWND hwndDlg, + _In_ UINT uMsg, + _In_ WPARAM wParam, + _In_ LPARAM lParam + ); + + bool Initialize( + _In_z_ LPCTSTR lpCaption, + _In_ int nCmdShow + ); + + int Run(); + void Uninitialize(void); + + BOOL OnCreate( + _In_ HWND hwnd + ); + + BOOL OnDestroy(void); + BOOL OnSize(void); + + BOOL OnNotify( + _In_ LPARAM lParam + ); + + BOOL OnContext( + _In_ LPARAM lParam + ); + + BOOL OnCommand( + _In_ WPARAM wParam, + LPARAM lParam + ); + + bool CreateStatusBar(void); + + bool StatusBarLoadString( + _In_ HWND hStatusBar, + _In_ INT PartId, + _In_ HINSTANCE hInstance, + _In_ UINT uID + ); + + void UpdateStatusBar( + _In_ bool InMenuLoop + ); + + static int CALLBACK + EnumDisplayFont( + ENUMLOGFONTEXW *lpelfe, + NEWTEXTMETRICEXW *lpntme, + DWORD FontType, + LPARAM lParam + ); + + bool CreateFontComboBox( + ); +}; Propchange: trunk/reactos/base/applications/charmap_new/MainWindow.h ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/charmap_new/charmap.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap_…
============================================================================== --- trunk/reactos/base/applications/charmap_new/charmap.cpp (added) +++ trunk/reactos/base/applications/charmap_new/charmap.cpp [iso-8859-1] Wed Nov 18 19:24:08 2015 @@ -0,0 +1,20 @@ +/* +* PROJECT: ReactOS Device Managment +* LICENSE: GPL - See COPYING in the top level directory +* FILE: base/applications/mscutils/devmgmt/devmgmt.c +* PURPOSE: Bootstrap for the device manager +* COPYRIGHT: Copyright 2006 Ged Murphy <gedmurphy(a)gmail.com> +*/ + +#include "precomp.h" +#include "MainWindow.h" + +int WINAPI +wWinMain(HINSTANCE hThisInstance, + HINSTANCE hPrevInstance, + LPWSTR lpCmdLine, + int nCmdShow) +{ + CCharMapWindow CharMap; + return CharMap.Create(hThisInstance, nCmdShow); +} Propchange: trunk/reactos/base/applications/charmap_new/charmap.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/charmap_new/charmap.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap_…
============================================================================== --- trunk/reactos/base/applications/charmap_new/charmap.rc (added) +++ trunk/reactos/base/applications/charmap_new/charmap.rc [iso-8859-1] Wed Nov 18 19:24:08 2015 @@ -0,0 +1,101 @@ +#include <windef.h> +#include <winuser.h> +#include <richedit.h> + +#include "resource.h" + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +IDI_ICON ICON "res/charmap.ico" + +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Character Map" +#define REACTOS_STR_INTERNAL_NAME "charmap" +#define REACTOS_STR_ORIGINAL_FILENAME "charmap.exe" +//#include <reactos/version.rc> + +//#include <reactos/manifest_exe.rc> + +/* UTF-8 */ +#pragma code_page(65001) + +#ifdef LANGUAGE_BG_BG +#include "lang/bg-BG.rc" +#endif +#ifdef LANGUAGE_CA_ES +#include "lang/ca-ES.rc" +#endif +#ifdef LANGUAGE_CS_CZ +#include "lang/cs-CZ.rc" +#endif +#ifdef LANGUAGE_DE_DE +#include "lang/de-DE.rc" +#endif +#ifdef LANGUAGE_EN_US +#include "lang/en-US.rc" +#endif +#ifdef LANGUAGE_EL_GR +#include "lang/el-GR.rc" +#endif +#ifdef LANGUAGE_ES_ES +#include "lang/es-ES.rc" +#endif +#ifdef LANGUAGE_FR_FR +#include "lang/fr-FR.rc" +#endif +#ifdef LANGUAGE_HE_IL +#include "lang/he-IL.rc" +#endif +#ifdef LANGUAGE_ID_ID +#include "lang/id-ID.rc" +#endif +#ifdef LANGUAGE_IT_IT +#include "lang/it-IT.rc" +#endif +#ifdef LANGUAGE_JA_JP +#include "lang/ja-JP.rc" +#endif +#ifdef LANGUAGE_KO_KR +#include "lang/ko-KR.rc" +#endif +#ifdef LANGUAGE_LT_LT +#include "lang/lt-LT.rc" +#endif +#ifdef LANGUAGE_NL_NL +#include "lang/nl-NL.rc" +#endif +#ifdef LANGUAGE_NB_NO +#include "lang/no-NO.rc" +#endif +#ifdef LANGUAGE_PL_PL +#include "lang/pl-PL.rc" +#endif +#ifdef LANGUAGE_PT_BR +#include "lang/pt-BR.rc" +#endif +#ifdef LANGUAGE_RO_RO +#include "lang/ro-RO.rc" +#endif +#ifdef LANGUAGE_RU_RU +#include "lang/ru-RU.rc" +#endif +#ifdef LANGUAGE_SK_SK +#include "lang/sk-SK.rc" +#endif +#ifdef LANGUAGE_SQ_AL +#include "lang/sq-AL.rc" +#endif +#ifdef LANGUAGE_SV_SE +#include "lang/sv-SE.rc" +#endif +#ifdef LANGUAGE_TR_TR +#include "lang/tr-TR.rc" +#endif +#ifdef LANGUAGE_UK_UA +#include "lang/uk-UA.rc" +#endif +#ifdef LANGUAGE_ZH_CN +#include "lang/zh-CN.rc" +#endif +#ifdef LANGUAGE_ZH_TW +#include "lang/zh-TW.rc" +#endif Propchange: trunk/reactos/base/applications/charmap_new/charmap.rc ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/charmap_new/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap_…
============================================================================== --- trunk/reactos/base/applications/charmap_new/lang/en-US.rc (added) +++ trunk/reactos/base/applications/charmap_new/lang/en-US.rc [iso-8859-1] Wed Nov 18 19:24:08 2015 @@ -0,0 +1,33 @@ +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +IDD_CHARMAP DIALOGEX 6, 6, 292, 224 +FONT 8, "MS Shell Dlg", 0, 0 +STYLE WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX +CAPTION "ReactOS Character Map" +BEGIN + LTEXT "Font:", IDC_STATIC, 6, 7, 24, 9 + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS + LTEXT "Characters to copy:", IDC_STATIC, 6, 188, 66, 9 + CONTROL "", IDC_TEXTBOX, RICHEDIT_CLASS, ES_AUTOHSCROLL | WS_BORDER | + WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13 + DEFPUSHBUTTON "Select", IDC_SELECT, 194, 186, 44, 13 + PUSHBUTTON "Copy", IDC_COPY, 242, 186, 44, 13, WS_DISABLED + //CONTROL "Advanced view", IDC_CHECK_ADVANCED, "Button", BS_AUTOCHECKBOX | + // WS_TABSTOP, 8, 208, 95, 10 + //LTEXT "Charset:", IDC_STATIC, 8, 8, 48, 8 + //COMBOBOX IDC_COMBO_CHARSET, 72, 4, 116, 80, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + //LTEXT "Group by:", IDC_STATIC, 8, 28, 50, 8 + //COMBOBOX IDC_COMBO_GROUPBY, 72, 24, 116, 80, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + //PUSHBUTTON "Search", IDC_BUTTON_SEARCH, 200, 44, 50, 14 + //EDITTEXT IDC_EDIT_SEARCH, 72, 44, 116, 14, ES_AUTOHSCROLL + //LTEXT "Search for:", IDC_STATIC, 8, 48, 42, 8 + //LTEXT "Unicode:", IDC_STATIC, 200, 8, 30, 8 + //EDITTEXT IDC_EDIT_UNICODE, 236, 4, 28, 12, ES_AUTOHSCROLL +END + +STRINGTABLE +BEGIN + IDS_ABOUT "A&bout..." + IDS_TITLE "Character Map" +END Propchange: trunk/reactos/base/applications/charmap_new/lang/en-US.rc ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/charmap_new/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap_…
============================================================================== --- trunk/reactos/base/applications/charmap_new/precomp.h (added) +++ trunk/reactos/base/applications/charmap_new/precomp.h [iso-8859-1] Wed Nov 18 19:24:08 2015 @@ -0,0 +1,54 @@ +//#pragma once + +#ifndef __REACTOS__ + +#define WIN32_LEAN_AND_MEAN +#include <Windows.h> +#include <windowsx.h> +#include <setupapi.h> +#include <cfgmgr32.h> +#include <commctrl.h> +#include <Uxtheme.h> +#include <richedit.h> + +#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit +#include <tchar.h> +#include <atlbase.h> +#include <atlstr.h> +#include <atlcoll.h> + +#include <strsafe.h> + + +#define WINE_DEFAULT_DEBUG_CHANNEL(t) + +#include "resource.h" + + +#else + +#include <string.h> +#include <wchar.h> + +#include <tchar.h> +#include <windef.h> +#include <winbase.h> +#include <winreg.h> +#include <wingdi.h> +#include <winnls.h> +#include <wincon.h> +#include <shlobj.h> +#include <shlwapi.h> +#include <strsafe.h> + +#include <commctrl.h> +#include <cfgmgr32.h> +#include <uxtheme.h> + +#include <atlbase.h> +#include <atlstr.h> +#include <atlcoll.h> + +//WINE_DEFAULT_DEBUG_CHANNEL(charmap); + +#endif Propchange: trunk/reactos/base/applications/charmap_new/precomp.h ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/charmap_new/res/charmap.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap_…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/base/applications/charmap_new/res/charmap.ico ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/base/applications/charmap_new/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap_…
============================================================================== --- trunk/reactos/base/applications/charmap_new/resource.h (added) +++ trunk/reactos/base/applications/charmap_new/resource.h [iso-8859-1] Wed Nov 18 19:24:08 2015 @@ -0,0 +1,30 @@ +#pragma once + +#define IDC_STATIC -1 + +#define IDI_ICON 100 + +#define IDD_CHARMAP 200 +#define IDD_ABOUTBOX 201 +#define IDD_STATUSBAR 202 +#define IDD_ADVANCED 203 + +#define IDC_FONTCOMBO 1001 +#define IDC_CMHELP 1002 +#define IDC_FONTMAP 1003 +#define IDC_TEXTBOX 1004 +#define IDC_SELECT 1005 +#define IDC_COPY 1006 +#define IDC_ADVVIEW 1007 +#define IDC_DISPLAY 1008 +#define IDC_LICENSE_EDIT 1009 +#define IDC_COMBO_CHARSET 1010 +#define IDC_COMBO_GROUPBY 1011 +#define IDC_BUTTON_SEARCH 1012 +#define IDC_EDIT_SEARCH 1013 +#define IDC_EDIT_UNICODE 1014 +#define IDC_CHECK_ADVANCED 1017 + +#define IDS_LICENSE 2010 +#define IDS_ABOUT 2011 +#define IDS_TITLE 2012 Propchange: trunk/reactos/base/applications/charmap_new/resource.h ------------------------------------------------------------------------------ svn:eol-style = native
8 years, 10 months
1
0
0
0
[akhaldi] 69930: [CRYPT32_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Nov 17 21:13:47 2015 New Revision: 69930 URL:
http://svn.reactos.org/svn/reactos?rev=69930&view=rev
Log: [CRYPT32_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536 Modified: trunk/rostests/winetests/crypt32/encode.c trunk/rostests/winetests/crypt32/store.c Modified: trunk/rostests/winetests/crypt32/encode.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/encode.…
============================================================================== --- trunk/rostests/winetests/crypt32/encode.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/encode.c [iso-8859-1] Tue Nov 17 21:13:47 2015 @@ -7262,7 +7262,7 @@ if (constraints->cPermittedSubtree != encodedNameConstraints[i].constraints.cPermittedSubtree) - fprintf(stderr, "%d: expected %d permitted, got %d\n", i, + fprintf(stderr, "%d: expected %u permitted, got %u\n", i, encodedNameConstraints[i].constraints.cPermittedSubtree, constraints->cPermittedSubtree); if (constraints->cPermittedSubtree == @@ -7276,7 +7276,7 @@ } if (constraints->cExcludedSubtree != encodedNameConstraints[i].constraints.cExcludedSubtree) - fprintf(stderr, "%d: expected %d excluded, got %d\n", i, + fprintf(stderr, "%d: expected %u excluded, got %u\n", i, encodedNameConstraints[i].constraints.cExcludedSubtree, constraints->cExcludedSubtree); if (constraints->cExcludedSubtree == Modified: trunk/rostests/winetests/crypt32/store.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/store.c…
============================================================================== --- trunk/rostests/winetests/crypt32/store.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/store.c [iso-8859-1] Tue Nov 17 21:13:47 2015 @@ -2203,6 +2203,35 @@ 0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; +static void delete_test_key(void) +{ + HKEY root_key, test_key; + static const WCHAR SysCertW[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', + 'S','y','s','t','e','m','C','e','r','t','i','f','i','c','a','t','e','s',0}; + static const WCHAR WineTestW[] = {'W','i','n','e','T','e','s','t',0}; + WCHAR subkey_name[32]; + DWORD num_subkeys, subkey_name_len; + int idx; + + if (RegOpenKeyExW(HKEY_CURRENT_USER, SysCertW, 0, KEY_READ, &root_key)) + return; + if (RegOpenKeyExW(root_key, WineTestW, 0, KEY_READ, &test_key)) + { + RegCloseKey(root_key); + return; + } + RegQueryInfoKeyW(test_key, NULL, NULL, NULL, &num_subkeys, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + for (idx = num_subkeys; idx-- > 0;) + { + subkey_name_len = sizeof(subkey_name)/sizeof(WCHAR); + RegEnumKeyExW(test_key, idx, subkey_name, &subkey_name_len, NULL, NULL, NULL, NULL); + RegDeleteKeyW(test_key, subkey_name); + } + RegCloseKey(test_key); + RegDeleteKeyW(root_key, WineTestW); + RegCloseKey(root_key); +} + static void testAddCertificateLink(void) { BOOL ret; @@ -2499,6 +2528,8 @@ CertFreeCertificateContext(source); CertCloseStore(store1, 0); + + delete_test_key(); } static DWORD countCertsInStore(HCERTSTORE store)
8 years, 10 months
1
0
0
0
[akhaldi] 69929: [CRYPT32] Sync with Wine Staging 1.7.55. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Nov 17 21:12:00 2015 New Revision: 69929 URL:
http://svn.reactos.org/svn/reactos?rev=69929&view=rev
Log: [CRYPT32] Sync with Wine Staging 1.7.55. CORE-10536 Modified: trunk/reactos/dll/win32/crypt32/CMakeLists.txt trunk/reactos/dll/win32/crypt32/cert.c trunk/reactos/dll/win32/crypt32/crypt32.spec trunk/reactos/dll/win32/crypt32/decode.c trunk/reactos/dll/win32/crypt32/main.c trunk/reactos/dll/win32/crypt32/regstore.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/crypt32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/CMakeLis…
============================================================================== --- trunk/reactos/dll/win32/crypt32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/CMakeLists.txt [iso-8859-1] Tue Nov 17 21:12:00 2015 @@ -1,3 +1,6 @@ + +remove_definitions(-D_WIN32_WINNT=0x502 -DWINVER=0x502) +add_definitions(-D_WIN32_WINNT=0x600 -DWINVER=0x600) add_definitions( -D__WINESRC__ @@ -42,7 +45,7 @@ set_module_type(crypt32 win32dll) target_link_libraries(crypt32 wine ${PSEH_LIB} oldnames) -add_importlibs(crypt32 user32 advapi32 shlwapi msvcrt kernel32 ntdll) +add_importlibs(crypt32 user32 advapi32 advapi32_vista msvcrt kernel32 ntdll) add_delay_importlibs(crypt32 cryptnet) add_pch(crypt32 crypt32_private.h SOURCE) add_cd_file(TARGET crypt32 DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/win32/crypt32/cert.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/cert.c?r…
============================================================================== --- trunk/reactos/dll/win32/crypt32/cert.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/cert.c [iso-8859-1] Tue Nov 17 21:12:00 2015 @@ -685,6 +685,7 @@ case CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID: case CERT_ENROLLMENT_PROP_ID: case CERT_CROSS_CERT_DIST_POINTS_PROP_ID: + case CERT_OCSP_RESPONSE_PROP_ID: case CERT_RENEWAL_PROP_ID: { if (pvData) Modified: trunk/reactos/dll/win32/crypt32/crypt32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crypt32.…
============================================================================== --- trunk/reactos/dll/win32/crypt32/crypt32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/crypt32.spec [iso-8859-1] Tue Nov 17 21:12:00 2015 @@ -163,6 +163,7 @@ @ stub CryptMsgVerifyCountersignatureEncoded @ stdcall CryptMsgVerifyCountersignatureEncodedEx(ptr long ptr long ptr long long ptr long ptr) @ stdcall CryptProtectData(ptr wstr ptr ptr ptr long ptr) +@ stdcall CryptProtectMemory(ptr long long) @ stdcall CryptQueryObject(long ptr long long long ptr ptr ptr ptr ptr ptr) @ stdcall CryptRegisterDefaultOIDFunction(long str long wstr) @ stdcall CryptRegisterOIDFunction(long str str wstr str) @@ -186,6 +187,7 @@ @ stdcall CryptSignMessage(ptr long long ptr ptr ptr ptr) @ stub CryptSignMessageWithKey @ stdcall CryptUnprotectData(ptr ptr ptr ptr ptr long ptr) +@ stdcall CryptUnprotectMemory(ptr long long) @ stdcall CryptUnregisterDefaultOIDFunction(long str wstr) @ stdcall CryptUnregisterOIDFunction(long str str) @ stub CryptUnregisterOIDInfo Modified: trunk/reactos/dll/win32/crypt32/decode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/decode.c…
============================================================================== --- trunk/reactos/dll/win32/crypt32/decode.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/decode.c [iso-8859-1] Tue Nov 17 21:12:00 2015 @@ -3985,18 +3985,19 @@ &size, NULL, NULL); if (ret) { - halflen = decodedKey->modulus.cbData / 2; - if ((decodedKey->modulus.cbData != halflen * 2) || - (decodedKey->prime1.cbData != halflen) || - (decodedKey->prime2.cbData != halflen) || - (decodedKey->exponent1.cbData != halflen) || - (decodedKey->exponent2.cbData != halflen) || - (decodedKey->coefficient.cbData != halflen) || - (decodedKey->privexp.cbData != halflen * 2)) - { - ret = FALSE; - SetLastError(CRYPT_E_BAD_ENCODE); - } + halflen = decodedKey->prime1.cbData; + if (halflen < decodedKey->prime2.cbData) + halflen = decodedKey->prime2.cbData; + if (halflen < decodedKey->exponent1.cbData) + halflen = decodedKey->exponent1.cbData; + if (halflen < decodedKey->exponent2.cbData) + halflen = decodedKey->exponent2.cbData; + if (halflen < decodedKey->coefficient.cbData) + halflen = decodedKey->coefficient.cbData; + if (halflen * 2 < decodedKey->modulus.cbData) + halflen = decodedKey->modulus.cbData / 2 + decodedKey->modulus.cbData % 2; + if (halflen * 2 < decodedKey->privexp.cbData) + halflen = decodedKey->privexp.cbData / 2 + decodedKey->privexp.cbData % 2; if (ret) { @@ -4031,20 +4032,21 @@ rsaPubKey->bitlen = halflen * 16; vardata = (BYTE*)(rsaPubKey + 1); + memset(vardata, 0, halflen * 9); memcpy(vardata, - decodedKey->modulus.pbData, halflen * 2); + decodedKey->modulus.pbData, decodedKey->modulus.cbData); memcpy(vardata + halflen * 2, - decodedKey->prime1.pbData, halflen); + decodedKey->prime1.pbData, decodedKey->prime1.cbData); memcpy(vardata + halflen * 3, - decodedKey->prime2.pbData, halflen); + decodedKey->prime2.pbData, decodedKey->prime2.cbData); memcpy(vardata + halflen * 4, - decodedKey->exponent1.pbData, halflen); + decodedKey->exponent1.pbData, decodedKey->exponent1.cbData); memcpy(vardata + halflen * 5, - decodedKey->exponent2.pbData, halflen); + decodedKey->exponent2.pbData, decodedKey->exponent2.cbData); memcpy(vardata + halflen * 6, - decodedKey->coefficient.pbData, halflen); + decodedKey->coefficient.pbData, decodedKey->coefficient.cbData); memcpy(vardata + halflen * 7, - decodedKey->privexp.pbData, halflen * 2); + decodedKey->privexp.pbData, decodedKey->privexp.cbData); } } Modified: trunk/reactos/dll/win32/crypt32/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/main.c?r…
============================================================================== --- trunk/reactos/dll/win32/crypt32/main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/main.c [iso-8859-1] Tue Nov 17 21:12:00 2015 @@ -241,3 +241,16 @@ FIXME("(%08x): stub\n", x); return NULL; } + +BOOL WINAPI CryptProtectMemory(void *data, DWORD len, DWORD flags) +{ + FIXME("(%p %u %08x): stub\n", data, len, flags); + return TRUE; +} + +BOOL WINAPI CryptUnprotectMemory(void *data, DWORD len, DWORD flags) +{ + static int fixme_once; + if (!fixme_once++) FIXME("(%p %u %08x): stub\n", data, len, flags); + return TRUE; +} Modified: trunk/reactos/dll/win32/crypt32/regstore.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/regstore…
============================================================================== --- trunk/reactos/dll/win32/crypt32/regstore.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/regstore.c [iso-8859-1] Tue Nov 17 21:12:00 2015 @@ -509,12 +509,12 @@ if (dwFlags & CERT_STORE_DELETE_FLAG) { - DWORD rc = SHDeleteKeyW((HKEY)pvPara, CertsW); + DWORD rc = RegDeleteTreeW((HKEY)pvPara, CertsW); if (rc == ERROR_SUCCESS || rc == ERROR_NO_MORE_ITEMS) - rc = SHDeleteKeyW((HKEY)pvPara, CRLsW); + rc = RegDeleteTreeW((HKEY)pvPara, CRLsW); if (rc == ERROR_SUCCESS || rc == ERROR_NO_MORE_ITEMS) - rc = SHDeleteKeyW((HKEY)pvPara, CTLsW); + rc = RegDeleteTreeW((HKEY)pvPara, CTLsW); if (rc == ERROR_NO_MORE_ITEMS) rc = ERROR_SUCCESS; SetLastError(rc); Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Nov 17 21:12:00 2015 @@ -58,7 +58,7 @@ reactos/dll/win32/comdlg32 # Synced to WineStaging-1.7.47 reactos/dll/win32/compstui # Synced to WineStaging-1.7.47 reactos/dll/win32/credui # Synced to WineStaging-1.7.47 -reactos/dll/win32/crypt32 # Synced to WineStaging-1.7.47 +reactos/dll/win32/crypt32 # Synced to WineStaging-1.7.55 reactos/dll/win32/cryptdlg # Synced to WineStaging-1.7.47 reactos/dll/win32/cryptdll # Synced to WineStaging-1.7.47 reactos/dll/win32/cryptnet # Synced to WineStaging-1.7.47
8 years, 10 months
1
0
0
0
[akhaldi] 69928: [IEFRAME] Sync with Wine Staging 1.7.55. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Nov 17 20:19:58 2015 New Revision: 69928 URL:
http://svn.reactos.org/svn/reactos?rev=69928&view=rev
Log: [IEFRAME] Sync with Wine Staging 1.7.55. CORE-10536 Modified: trunk/reactos/dll/win32/ieframe/dochost.c trunk/reactos/dll/win32/ieframe/frame.c trunk/reactos/dll/win32/ieframe/ieframe.h trunk/reactos/dll/win32/ieframe/iexplore.c trunk/reactos/dll/win32/ieframe/navigate.c trunk/reactos/dll/win32/ieframe/oleobject.c trunk/reactos/dll/win32/ieframe/shellbrowser.c trunk/reactos/dll/win32/ieframe/view.c trunk/reactos/dll/win32/ieframe/webbrowser.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/ieframe/dochost.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/dochost.…
============================================================================== --- trunk/reactos/dll/win32/ieframe/dochost.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ieframe/dochost.c [iso-8859-1] Tue Nov 17 20:19:58 2015 @@ -73,6 +73,37 @@ } } +void on_commandstate_change(DocHost *doc_host, LONG command, VARIANT_BOOL enable) +{ + DISPPARAMS dispparams; + VARIANTARG params[2]; + + TRACE("command=%d enable=%d\n", command, enable); + + dispparams.cArgs = 2; + dispparams.cNamedArgs = 0; + dispparams.rgdispidNamedArgs = NULL; + dispparams.rgvarg = params; + + V_VT(params) = VT_BOOL; + V_BOOL(params) = enable ? VARIANT_TRUE : VARIANT_FALSE; + + V_VT(params+1) = VT_I4; + V_I4(params+1) = command; + + call_sink(doc_host->cps.wbe2, DISPID_COMMANDSTATECHANGE, &dispparams); + + doc_host->container_vtbl->on_command_state_change(doc_host, command, enable); +} + +void update_navigation_commands(DocHost *dochost) +{ + unsigned pos = dochost->travellog.loading_pos == -1 ? dochost->travellog.position : dochost->travellog.loading_pos; + + on_commandstate_change(dochost, CSC_NAVIGATEBACK, pos > 0); + on_commandstate_change(dochost, CSC_NAVIGATEFORWARD, pos < dochost->travellog.length); +} + static void notif_complete(DocHost *This, DISPID dispid) { DISPPARAMS dispparams; @@ -388,25 +419,32 @@ { travellog_entry_t *new_entry; + static const WCHAR about_schemeW[] = {'a','b','o','u','t',':'}; + + if(This->url && !strncmpiW(This->url, about_schemeW, sizeof(about_schemeW)/sizeof(*about_schemeW))) { + TRACE("Skipping about URL\n"); + return; + } + + if(!This->travellog.log) { + This->travellog.log = heap_alloc(4 * sizeof(*This->travellog.log)); + if(!This->travellog.log) + return; + + This->travellog.size = 4; + }else if(This->travellog.size < This->travellog.position+1) { + travellog_entry_t *new_travellog; + + new_travellog = heap_realloc(This->travellog.log, This->travellog.size*2*sizeof(*This->travellog.log)); + if(!new_travellog) + return; + + This->travellog.log = new_travellog; + This->travellog.size *= 2; + } + if(This->travellog.loading_pos == -1) { /* Clear forward history. */ - if(!This->travellog.log) { - This->travellog.log = heap_alloc(4 * sizeof(*This->travellog.log)); - if(!This->travellog.log) - return; - - This->travellog.size = 4; - }else if(This->travellog.size < This->travellog.position+1) { - travellog_entry_t *new_travellog; - - new_travellog = heap_realloc(This->travellog.log, This->travellog.size*2*sizeof(*This->travellog.log)); - if(!new_travellog) - return; - - This->travellog.log = new_travellog; - This->travellog.size *= 2; - } - while(This->travellog.length > This->travellog.position) free_travellog_entry(This->travellog.log + --This->travellog.length); } @@ -455,7 +493,7 @@ doc_view_atom = RegisterClassExW(&wndclass); } - This->container_vtbl->GetDocObjRect(This, &rect); + This->container_vtbl->get_docobj_rect(This, &rect); This->hwnd = CreateWindowExW(0, wszShell_DocObject_View, wszShell_DocObject_View, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_TABSTOP, @@ -574,6 +612,11 @@ if(This->frame) { IOleInPlaceFrame_Release(This->frame); This->frame = NULL; + } + + if(This->olecmd) { + IOleCommandTarget_Release(This->olecmd); + This->olecmd = NULL; } } @@ -627,8 +670,18 @@ if(!pguidCmdGroup) { switch(nCmdID) { case OLECMDID_UPDATECOMMANDS: + if(!This->olecmd) + return E_NOTIMPL; + return IOleCommandTarget_Exec(This->olecmd, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut); case OLECMDID_SETDOWNLOADSTATE: - return This->container_vtbl->exec(This, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut); + if(This->olecmd) + return IOleCommandTarget_Exec(This->olecmd, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut); + + if(!pvaIn || V_VT(pvaIn) != VT_I4) + return E_INVALIDARG; + + notify_download_state(This, V_I4(pvaIn)); + return S_OK; default: FIXME("Unimplemented cmdid %d\n", nCmdID); return E_NOTIMPL; @@ -691,6 +744,7 @@ switch(nCmdID) { case CMDID_EXPLORER_UPDATEHISTORY: update_travellog(This); + update_navigation_commands(This); return S_OK; default: @@ -707,8 +761,11 @@ } } - if(IsEqualGUID(&CGID_DocHostCommandHandler, pguidCmdGroup)) - return This->container_vtbl->exec(This, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut); + if(IsEqualGUID(&CGID_DocHostCommandHandler, pguidCmdGroup)) { + if(!This->olecmd) + return E_NOTIMPL; + return IOleCommandTarget_Exec(This->olecmd, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut); + } FIXME("Unimplemented cmdid %d of group %s\n", nCmdID, debugstr_guid(pguidCmdGroup)); return E_NOTIMPL; Modified: trunk/reactos/dll/win32/ieframe/frame.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/frame.c?…
============================================================================== --- trunk/reactos/dll/win32/ieframe/frame.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ieframe/frame.c [iso-8859-1] Tue Nov 17 20:19:58 2015 @@ -137,7 +137,7 @@ { DocHost *This = impl_from_IOleInPlaceFrame(iface); TRACE("(%p)->(%s)\n", This, debugstr_w(pszStatusText)); - return This->container_vtbl->SetStatusText(This, pszStatusText); + return This->container_vtbl->set_status_text(This, pszStatusText); } static HRESULT WINAPI InPlaceFrame_EnableModeless(IOleInPlaceFrame *iface, BOOL fEnable) Modified: trunk/reactos/dll/win32/ieframe/ieframe.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/ieframe.…
============================================================================== --- trunk/reactos/dll/win32/ieframe/ieframe.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ieframe/ieframe.h [iso-8859-1] Tue Nov 17 20:19:58 2015 @@ -120,10 +120,10 @@ { ULONG (*addref)(DocHost*); ULONG (*release)(DocHost*); - void (WINAPI* GetDocObjRect)(DocHost*,RECT*); - HRESULT (WINAPI* SetStatusText)(DocHost*,LPCWSTR); - void (WINAPI* SetURL)(DocHost*,LPCWSTR); - HRESULT (*exec)(DocHost*,const GUID*,DWORD,DWORD,VARIANT*,VARIANT*); + void (*get_docobj_rect)(DocHost*,RECT*); + HRESULT (*set_status_text)(DocHost*,const WCHAR*); + void (*on_command_state_change)(DocHost*,LONG,BOOL); + void (*set_url)(DocHost*,const WCHAR*); } IDocHostContainerVtbl; struct DocHost { @@ -145,6 +145,7 @@ IDispatch *client_disp; IDocHostUIHandler *hostui; IOleInPlaceFrame *frame; + IOleCommandTarget *olecmd; IUnknown *document; IOleDocumentView *view; @@ -208,6 +209,10 @@ IOleContainer *container; IOleInPlaceSiteEx *inplace; + IAdviseSink *sink; + DWORD sink_aspects; + DWORD sink_flags; + /* window context */ HWND frame_hwnd; @@ -243,6 +248,7 @@ HWND frame_hwnd; HWND status_hwnd; + HWND toolbar_hwnd; HMENU menu; BOOL nohome; @@ -290,6 +296,8 @@ void deactivate_document(DocHost*) DECLSPEC_HIDDEN; void create_doc_view_hwnd(DocHost*) DECLSPEC_HIDDEN; void on_commandstate_change(DocHost*,LONG,VARIANT_BOOL) DECLSPEC_HIDDEN; +void notify_download_state(DocHost*,BOOL) DECLSPEC_HIDDEN; +void update_navigation_commands(DocHost *dochost) DECLSPEC_HIDDEN; #define WM_DOCHOSTTASK (WM_USER+0x300) void push_dochost_task(DocHost*,task_header_t*,task_proc_t,task_destr_t,BOOL) DECLSPEC_HIDDEN; Modified: trunk/reactos/dll/win32/ieframe/iexplore.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/iexplore…
============================================================================== --- trunk/reactos/dll/win32/ieframe/iexplore.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ieframe/iexplore.c [iso-8859-1] Tue Nov 17 20:19:58 2015 @@ -389,7 +389,7 @@ } #endif -static void add_tb_separator(HWND hwnd) +static void add_tb_separator(InternetExplorer *ie) { TBBUTTON btn; @@ -397,10 +397,10 @@ btn.iBitmap = 3; btn.fsStyle = BTNS_SEP; - SendMessageW(hwnd, TB_ADDBUTTONSW, 1, (LPARAM)&btn); -} - -static void add_tb_button(HWND hwnd, int bmp, int cmd, int strId) + SendMessageW(ie->toolbar_hwnd, TB_ADDBUTTONSW, 1, (LPARAM)&btn); +} + +static void add_tb_button(InternetExplorer *ie, int bmp, int cmd, int strId) { TBBUTTON btn; WCHAR buf[30]; @@ -414,14 +414,18 @@ btn.dwData = 0; btn.iString = (INT_PTR)buf; - SendMessageW(hwnd, TB_ADDBUTTONSW, 1, (LPARAM)&btn); -} - -static void create_rebar(HWND hwnd) + SendMessageW(ie->toolbar_hwnd, TB_ADDBUTTONSW, 1, (LPARAM)&btn); +} + +static void enable_toolbar_button(InternetExplorer *ie, int command, BOOL enable) +{ + SendMessageW(ie->toolbar_hwnd, TB_ENABLEBUTTON, command, enable); +} + +static void create_rebar(InternetExplorer *ie) { HWND hwndRebar; HWND hwndAddress; - HWND hwndToolbar; REBARINFO rebarinf; REBARBANDINFOW bandinf; WCHAR addr[40]; @@ -432,7 +436,7 @@ hwndRebar = CreateWindowExW(WS_EX_TOOLWINDOW, REBARCLASSNAMEW, NULL, WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|RBS_VARHEIGHT|CCS_TOP|CCS_NODIVIDER, 0, 0, 0, 0, - hwnd, (HMENU)IDC_BROWSE_REBAR, ieframe_instance, NULL); + ie->frame_hwnd, (HMENU)IDC_BROWSE_REBAR, ieframe_instance, NULL); rebarinf.cbSize = sizeof(rebarinf); rebarinf.fMask = 0; @@ -440,29 +444,29 @@ SendMessageW(hwndRebar, RB_SETBARINFO, 0, (LPARAM)&rebarinf); - hwndToolbar = CreateWindowExW(TBSTYLE_EX_MIXEDBUTTONS, TOOLBARCLASSNAMEW, NULL, TBSTYLE_FLAT | WS_CHILD | WS_VISIBLE | CCS_NORESIZE, + ie->toolbar_hwnd = CreateWindowExW(TBSTYLE_EX_MIXEDBUTTONS, TOOLBARCLASSNAMEW, NULL, TBSTYLE_FLAT | WS_CHILD | WS_VISIBLE | CCS_NORESIZE, 0, 0, 0, 0, hwndRebar, (HMENU)IDC_BROWSE_TOOLBAR, ieframe_instance, NULL); imagelist = ImageList_LoadImageW(ieframe_instance, MAKEINTRESOURCEW(IDB_IETOOLBAR), 32, 0, CLR_NONE, IMAGE_BITMAP, LR_CREATEDIBSECTION); - SendMessageW(hwndToolbar, TB_SETIMAGELIST, 0, (LPARAM)imagelist); - SendMessageW(hwndToolbar, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0); - add_tb_button(hwndToolbar, 0, ID_BROWSE_BACK, IDS_TB_BACK); - add_tb_button(hwndToolbar, 1, ID_BROWSE_FORWARD, IDS_TB_FORWARD); - add_tb_button(hwndToolbar, 2, ID_BROWSE_STOP, IDS_TB_STOP); - add_tb_button(hwndToolbar, 3, ID_BROWSE_REFRESH, IDS_TB_REFRESH); - add_tb_button(hwndToolbar, 4, ID_BROWSE_HOME, IDS_TB_HOME); - add_tb_separator(hwndToolbar); - add_tb_button(hwndToolbar, 5, ID_BROWSE_PRINT, IDS_TB_PRINT); - SendMessageW(hwndToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(55,50)); - SendMessageW(hwndToolbar, TB_GETMAXSIZE, 0, (LPARAM)&toolbar_size); + SendMessageW(ie->toolbar_hwnd, TB_SETIMAGELIST, 0, (LPARAM)imagelist); + SendMessageW(ie->toolbar_hwnd, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0); + add_tb_button(ie, 0, ID_BROWSE_BACK, IDS_TB_BACK); + add_tb_button(ie, 1, ID_BROWSE_FORWARD, IDS_TB_FORWARD); + add_tb_button(ie, 2, ID_BROWSE_STOP, IDS_TB_STOP); + add_tb_button(ie, 3, ID_BROWSE_REFRESH, IDS_TB_REFRESH); + add_tb_button(ie, 4, ID_BROWSE_HOME, IDS_TB_HOME); + add_tb_separator(ie); + add_tb_button(ie, 5, ID_BROWSE_PRINT, IDS_TB_PRINT); + SendMessageW(ie->toolbar_hwnd, TB_SETBUTTONSIZE, 0, MAKELPARAM(55,50)); + SendMessageW(ie->toolbar_hwnd, TB_GETMAXSIZE, 0, (LPARAM)&toolbar_size); bandinf.cbSize = sizeof(bandinf); bandinf.fMask = RBBIM_STYLE | RBBIM_CHILD | RBBIM_CHILDSIZE; bandinf.fStyle = RBBS_CHILDEDGE; bandinf.cxMinChild = toolbar_size.cx; bandinf.cyMinChild = toolbar_size.cy+2; - bandinf.hwndChild = hwndToolbar; + bandinf.hwndChild = ie->toolbar_hwnd; SendMessageW(hwndRebar, RB_INSERTBANDW, -1, (LPARAM)&bandinf); @@ -484,13 +488,15 @@ InternetExplorer* This = (InternetExplorer*)lpcs->lpCreateParams; SetWindowLongPtrW(hwnd, 0, (LONG_PTR) lpcs->lpCreateParams); + This->doc_host.frame_hwnd = This->frame_hwnd = hwnd; + This->menu = create_ie_menu(); This->status_hwnd = CreateStatusWindowW(WS_VISIBLE|WS_CHILD|SBT_NOBORDERS|CCS_NODIVIDER, NULL, hwnd, IDC_BROWSE_STATUSBAR); SendMessageW(This->status_hwnd, SB_SIMPLE, TRUE, 0); - create_rebar(hwnd); + create_rebar(This); return 0; } @@ -554,9 +560,7 @@ static LRESULT iewnd_OnDestroy(InternetExplorer *This) { - HWND hwndRebar = GetDlgItem(This->frame_hwnd, IDC_BROWSE_REBAR); - HWND hwndToolbar = GetDlgItem(hwndRebar, IDC_BROWSE_TOOLBAR); - HIMAGELIST list = (HIMAGELIST)SendMessageW(hwndToolbar, TB_GETIMAGELIST, 0, 0); + HIMAGELIST list = (HIMAGELIST)SendMessageW(This->toolbar_hwnd, TB_GETIMAGELIST, 0, 0); TRACE("%p\n", This); @@ -715,7 +719,7 @@ static void create_frame_hwnd(InternetExplorer *This) { - This->frame_hwnd = CreateWindowExW( + CreateWindowExW( WS_EX_WINDOWEDGE, szIEWinFrame, wszWineInternetExplorer, WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -723,7 +727,6 @@ CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL /* FIXME */, ieframe_instance, This); - This->doc_host.frame_hwnd = This->frame_hwnd; create_doc_view_hwnd(&This->doc_host); } @@ -744,39 +747,47 @@ return IWebBrowser2_Release(&This->IWebBrowser2_iface); } -static void WINAPI DocHostContainer_GetDocObjRect(DocHost* This, RECT* rc) +static void DocHostContainer_get_docobj_rect(DocHost *This, RECT *rc) { GetClientRect(This->frame_hwnd, rc); adjust_ie_docobj_rect(This->frame_hwnd, rc); } -static HRESULT WINAPI DocHostContainer_SetStatusText(DocHost *iface, LPCWSTR text) +static HRESULT DocHostContainer_set_status_text(DocHost *iface, const WCHAR *text) { InternetExplorer *This = impl_from_DocHost(iface); return update_ie_statustext(This, text); } -static void WINAPI DocHostContainer_SetURL(DocHost* iface, LPCWSTR url) +static void DocHostContainer_on_command_state_change(DocHost *iface, LONG command, BOOL enable) +{ + InternetExplorer *This = impl_from_DocHost(iface); + + switch(command) { + case CSC_NAVIGATEBACK: + enable_toolbar_button(This, ID_BROWSE_BACK, enable); + break; + case CSC_NAVIGATEFORWARD: + enable_toolbar_button(This, ID_BROWSE_FORWARD, enable); + break; + } +} + +static void DocHostContainer_set_url(DocHost* iface, const WCHAR *url) { InternetExplorer *This = impl_from_DocHost(iface); This->nohome = FALSE; SendMessageW(This->frame_hwnd, WM_UPDATEADDRBAR, 0, (LPARAM)url); -} - -static HRESULT DocHostContainer_exec(DocHost* This, const GUID *cmd_group, DWORD cmdid, DWORD execopt, VARIANT *in, - VARIANT *out) -{ - return E_NOTIMPL; } static const IDocHostContainerVtbl DocHostContainerVtbl = { IEDocHost_addref, IEDocHost_release, - DocHostContainer_GetDocObjRect, - DocHostContainer_SetStatusText, - DocHostContainer_SetURL, - DocHostContainer_exec + DocHostContainer_get_docobj_rect, + DocHostContainer_set_status_text, + DocHostContainer_on_command_state_change, + DocHostContainer_set_url }; static HRESULT create_ie(InternetExplorer **ret_obj) Modified: trunk/reactos/dll/win32/ieframe/navigate.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/navigate…
============================================================================== --- trunk/reactos/dll/win32/ieframe/navigate.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ieframe/navigate.c [iso-8859-1] Tue Nov 17 20:19:58 2015 @@ -102,7 +102,7 @@ } V_VT(&arg) = VT_BSTR; - V_BSTR(&arg) = str ? SysAllocString(buffer) : NULL; + V_BSTR(&arg) = str ? SysAllocString(buffer) : SysAllocString(emptyW); TRACE("=> %s\n", debugstr_w(V_BSTR(&arg))); call_sink(This->doc_host->cps.wbe2, DISPID_STATUSTEXTCHANGE, &dispparams); @@ -129,8 +129,15 @@ heap_free(This->url); This->url = new_url; - This->container_vtbl->SetURL(This, This->url); + This->container_vtbl->set_url(This, This->url); return S_OK; +} + +void notify_download_state(DocHost *dochost, BOOL is_downloading) +{ + DISPPARAMS dwl_dp = {NULL}; + TRACE("(%x)\n", is_downloading); + call_sink(dochost->cps.wbe2, is_downloading ? DISPID_DOWNLOADBEGIN : DISPID_DOWNLOADCOMPLETE, &dwl_dp); } static inline BindStatusCallback *impl_from_IBindStatusCallback(IBindStatusCallback *iface) @@ -344,6 +351,8 @@ if(!This->doc_host) return S_OK; + if(!This->doc_host->olecmd) + notify_download_state(This->doc_host, FALSE); if(FAILED(hresult)) handle_navigation_error(This->doc_host, hresult, This->url, NULL); @@ -759,27 +768,6 @@ heap_free(task); } -void on_commandstate_change(DocHost *doc_host, LONG command, VARIANT_BOOL enable) -{ - DISPPARAMS dispparams; - VARIANTARG params[2]; - - TRACE("command=%d enable=%d\n", command, enable); - - dispparams.cArgs = 2; - dispparams.cNamedArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = params; - - V_VT(params) = VT_BOOL; - V_BOOL(params) = enable; - - V_VT(params+1) = VT_I4; - V_I4(params+1) = command; - - call_sink(doc_host->cps.wbe2, DISPID_COMMANDSTATECHANGE, &dispparams); -} - static void doc_navigate_proc(DocHost *This, task_header_t *t) { task_doc_navigate_t *task = (task_doc_navigate_t*)t; @@ -883,6 +871,7 @@ return S_OK; } + notify_download_state(This, TRUE); on_commandstate_change(This, CSC_NAVIGATEBACK, VARIANT_FALSE); on_commandstate_change(This, CSC_NAVIGATEFORWARD, VARIANT_FALSE); @@ -1089,19 +1078,10 @@ return E_NOTIMPL; } - if (travellog_pos < This->travellog.position) - { - on_commandstate_change(This, CSC_NAVIGATEBACK, VARIANT_FALSE); - on_commandstate_change(This, CSC_NAVIGATEFORWARD, VARIANT_TRUE); - } - else if (travellog_pos > This->travellog.position) - { - on_commandstate_change(This, CSC_NAVIGATEBACK, VARIANT_TRUE); - on_commandstate_change(This, CSC_NAVIGATEFORWARD, VARIANT_FALSE); - } - This->travellog.loading_pos = travellog_pos; entry = This->travellog.log + This->travellog.loading_pos; + + update_navigation_commands(This); if(!entry->stream) return async_doc_navigate(This, entry->url, NULL, NULL, 0, FALSE); Modified: trunk/reactos/dll/win32/ieframe/oleobject.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/oleobjec…
============================================================================== --- trunk/reactos/dll/win32/ieframe/oleobject.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ieframe/oleobject.c [iso-8859-1] Tue Nov 17 20:19:58 2015 @@ -39,6 +39,22 @@ return 0; } +static void notify_on_focus(WebBrowser *This, BOOL got_focus) +{ + IOleControlSite *control_site; + HRESULT hres; + + if(!This->client) + return; + + hres = IOleClientSite_QueryInterface(This->client, &IID_IOleControlSite, (void**)&control_site); + if(FAILED(hres)) + return; + + IOleControlSite_OnFocus(control_site, got_focus); + IOleControlSite_Release(control_site); +} + static LRESULT WINAPI shell_embedding_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { WebBrowser *This; @@ -57,6 +73,12 @@ return resize_window(This, LOWORD(lParam), HIWORD(lParam)); case WM_DOCHOSTTASK: return process_dochost_tasks(&This->doc_host); + case WM_SETFOCUS: + notify_on_focus(This, TRUE); + break; + case WM_KILLFOCUS: + notify_on_focus(This, FALSE); + break; } return DefWindowProcW(hwnd, msg, wParam, lParam); @@ -193,6 +215,7 @@ IOleInPlaceFrame_SetMenu(This->doc_host.frame, NULL, NULL, This->shell_embedding_hwnd); SetFocus(This->shell_embedding_hwnd); + notify_on_focus(This, TRUE); return S_OK; } @@ -254,6 +277,11 @@ { release_dochost_client(&This->doc_host); + if(This->client) { + IOleClientSite_Release(This->client); + This->client = NULL; + } + if(This->shell_embedding_hwnd) { DestroyWindow(This->shell_embedding_hwnd); This->shell_embedding_hwnd = NULL; @@ -274,9 +302,9 @@ This->uiwindow = NULL; } - if(This->client) { - IOleClientSite_Release(This->client); - This->client = NULL; + if(This->sink) { + IAdviseSink_Release(This->sink); + This->sink = NULL; } } @@ -420,6 +448,7 @@ { WebBrowser *This = impl_from_IOleObject(iface); IDocHostUIHandler *hostui; + IOleCommandTarget *olecmd; IOleContainer *container; IDispatch *disp; HRESULT hres; @@ -464,8 +493,18 @@ ITargetContainer_Release(target_container); } + hres = IOleContainer_QueryInterface(container, &IID_IOleCommandTarget, (void**)&olecmd); + if(FAILED(hres)) + olecmd = NULL; + IOleContainer_Release(container); - } + }else { + hres = IOleClientSite_QueryInterface(This->client, &IID_IOleCommandTarget, (void**)&olecmd); + if(FAILED(hres)) + olecmd = NULL; + } + + This->doc_host.olecmd = olecmd; create_shell_embedding_hwnd(This); @@ -519,10 +558,11 @@ if(This->uiwindow) IOleInPlaceUIWindow_SetActiveObject(This->uiwindow, NULL, NULL); - if(This->inplace) { + if(This->inplace) IOleInPlaceSiteEx_OnUIDeactivate(This->inplace, FALSE); + notify_on_focus(This, FALSE); + if(This->inplace) IOleInPlaceSiteEx_OnInPlaceDeactivate(This->inplace); - } return IOleObject_SetClientSite(iface, NULL); } @@ -802,7 +842,7 @@ { WebBrowser *This = impl_from_IOleInPlaceObject(iface); - TRACE("(%p)->(%p %p)\n", This, lprcPosRect, lprcClipRect); + TRACE("(%p)->(%s %s)\n", This, wine_dbgstr_rect(lprcPosRect), wine_dbgstr_rect(lprcClipRect)); This->pos_rect = *lprcPosRect; Modified: trunk/reactos/dll/win32/ieframe/shellbrowser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/shellbro…
============================================================================== --- trunk/reactos/dll/win32/ieframe/shellbrowser.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ieframe/shellbrowser.c [iso-8859-1] Tue Nov 17 20:19:58 2015 @@ -742,6 +742,8 @@ TRACE("%p %p %x\n", This, pHTMLWindow2, dwFlags); + update_navigation_commands(This->doc_host); + if(doc_host->travellog.loading_pos != -1) { WARN("histupdate not notified\n"); doc_host->travellog.position = doc_host->travellog.loading_pos; Modified: trunk/reactos/dll/win32/ieframe/view.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/view.c?r…
============================================================================== --- trunk/reactos/dll/win32/ieframe/view.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ieframe/view.c [iso-8859-1] Tue Nov 17 20:19:58 2015 @@ -56,7 +56,7 @@ FIXME("(%p)->(%d %d %p %p %p %p %p %p %p %08lx)\n", This, dwDrawAspect, lindex, pvAspect, ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue, dwContinue); - return E_NOTIMPL; + return S_OK; } static HRESULT WINAPI ViewObject_GetColorSet(IViewObject2 *iface, DWORD dwAspect, @@ -88,16 +88,36 @@ IAdviseSink *pAdvSink) { WebBrowser *This = impl_from_IViewObject2(iface); - FIXME("(%p)->(%d %08x %p)\n", This, aspects, advf, pAdvSink); - return E_NOTIMPL; + + TRACE("(%p)->(%d %08x %p)\n", This, aspects, advf, pAdvSink); + + if (aspects || advf) FIXME("aspects and/or flags not supported yet\n"); + + This->sink_aspects = aspects; + This->sink_flags = advf; + if (This->sink) IAdviseSink_Release(This->sink); + This->sink = pAdvSink; + if (This->sink) IAdviseSink_AddRef(This->sink); + + return S_OK; } static HRESULT WINAPI ViewObject_GetAdvise(IViewObject2 *iface, DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink) { WebBrowser *This = impl_from_IViewObject2(iface); - FIXME("(%p)->(%p %p %p)\n", This, pAspects, pAdvf, ppAdvSink); - return E_NOTIMPL; + + TRACE("(%p)->(%p %p %p)\n", This, pAspects, pAdvf, ppAdvSink); + + if (pAspects) *pAspects = This->sink_aspects; + if (pAdvf) *pAdvf = This->sink_flags; + if (ppAdvSink) + { + *ppAdvSink = This->sink; + if (*ppAdvSink) IAdviseSink_AddRef(*ppAdvSink); + } + + return S_OK; } static HRESULT WINAPI ViewObject_GetExtent(IViewObject2 *iface, DWORD dwAspect, LONG lindex, Modified: trunk/reactos/dll/win32/ieframe/webbrowser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/webbrows…
============================================================================== --- trunk/reactos/dll/win32/ieframe/webbrowser.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ieframe/webbrowser.c [iso-8859-1] Tue Nov 17 20:19:58 2015 @@ -1187,60 +1187,31 @@ return IWebBrowser2_Release(&This->IWebBrowser2_iface); } -static void WINAPI DocHostContainer_GetDocObjRect(DocHost* This, RECT* rc) +static void DocHostContainer_get_docobj_rect(DocHost *This, RECT *rc) { GetClientRect(This->frame_hwnd, rc); } -static HRESULT WINAPI DocHostContainer_SetStatusText(DocHost* This, LPCWSTR text) -{ - return E_NOTIMPL; -} - -static void WINAPI DocHostContainer_SetURL(DocHost* This, LPCWSTR url) -{ - -} - -static HRESULT DocHostContainer_exec(DocHost *doc_host, const GUID *cmd_group, DWORD cmdid, DWORD execopt, VARIANT *in, - VARIANT *out) -{ - WebBrowser *This = impl_from_DocHost(doc_host); - IOleCommandTarget *cmdtrg = NULL; - HRESULT hres; - - if(This->client) { - hres = IOleClientSite_QueryInterface(This->client, &IID_IOleCommandTarget, (void**)&cmdtrg); - if(FAILED(hres)) - cmdtrg = NULL; - } - - if(!cmdtrg && This->container) { - hres = IOleContainer_QueryInterface(This->container, &IID_IOleCommandTarget, (void**)&cmdtrg); - if(FAILED(hres)) - cmdtrg = NULL; - } - - if(!cmdtrg) - return E_NOTIMPL; - - hres = IOleCommandTarget_Exec(cmdtrg, cmd_group, cmdid, execopt, in, out); - IOleCommandTarget_Release(cmdtrg); - if(SUCCEEDED(hres)) - TRACE("Exec returned %08x %s\n", hres, debugstr_variant(out)); - else - FIXME("Exec failed\n"); - - return hres; +static HRESULT DocHostContainer_set_status_text(DocHost *This, const WCHAR *text) +{ + return E_NOTIMPL; +} + +static void DocHostContainer_on_command_state_change(DocHost *This, LONG command, BOOL enable) +{ +} + +static void DocHostContainer_set_url(DocHost *This, const WCHAR *url) +{ } static const IDocHostContainerVtbl DocHostContainerVtbl = { WebBrowser_addref, WebBrowser_release, - DocHostContainer_GetDocObjRect, - DocHostContainer_SetStatusText, - DocHostContainer_SetURL, - DocHostContainer_exec + DocHostContainer_get_docobj_rect, + DocHostContainer_set_status_text, + DocHostContainer_on_command_state_change, + DocHostContainer_set_url }; static HRESULT create_webbrowser(int version, IUnknown *outer, REFIID riid, void **ppv) Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Nov 17 20:19:58 2015 @@ -76,7 +76,7 @@ reactos/dll/win32/httpapi # Synced to WineStaging-1.7.47 reactos/dll/win32/iccvid # Synced to WineStaging-1.7.47 reactos/dll/win32/icmp # Out of sync -reactos/dll/win32/ieframe # Synced to WineStaging-1.7.47 +reactos/dll/win32/ieframe # Synced to WineStaging-1.7.55 reactos/dll/win32/imaadp32.acm # Synced to WineStaging-1.7.47 reactos/dll/win32/imagehlp # Synced to WineStaging-1.7.47 reactos/dll/win32/imm32 # Synced to Wine-1.7.27
8 years, 10 months
1
0
0
0
[ekohl] 69927: [NETAPI32] NetWkstaGetInfo: Retrieve the primary domain name instead of the account domain name as the workgroup/domain name. System CPL shows the proper workgroup name.
by ekohl@svn.reactos.org
Author: ekohl Date: Tue Nov 17 20:19:36 2015 New Revision: 69927 URL:
http://svn.reactos.org/svn/reactos?rev=69927&view=rev
Log: [NETAPI32] NetWkstaGetInfo: Retrieve the primary domain name instead of the account domain name as the workgroup/domain name. System CPL shows the proper workgroup name. Modified: trunk/reactos/dll/win32/netapi32/wksta.c Modified: trunk/reactos/dll/win32/netapi32/wksta.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/wksta.c…
============================================================================== --- trunk/reactos/dll/win32/netapi32/wksta.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/wksta.c [iso-8859-1] Tue Nov 17 20:19:36 2015 @@ -509,11 +509,11 @@ ret = LsaNtStatusToWinError(NtStatus); else { - PPOLICY_ACCOUNT_DOMAIN_INFO DomainInfo; + PPOLICY_PRIMARY_DOMAIN_INFO DomainInfo; LsaQueryInformationPolicy(PolicyHandle, - PolicyAccountDomainInformation, (PVOID*)&DomainInfo); - domainNameLen = lstrlenW(DomainInfo->DomainName.Buffer) + 1; + PolicyPrimaryDomainInformation, (PVOID*)&DomainInfo); + domainNameLen = lstrlenW(DomainInfo->Name.Buffer) + 1; size = sizeof(WKSTA_INFO_102) + computerNameLen * sizeof(WCHAR) + domainNameLen * sizeof(WCHAR) + sizeof(lanroot); ret = NetApiBufferAllocate(size, (LPVOID *)bufptr); @@ -529,7 +529,7 @@ memcpy(info->wki102_computername, computerName, computerNameLen * sizeof(WCHAR)); info->wki102_langroup = info->wki102_computername + computerNameLen; - memcpy(info->wki102_langroup, DomainInfo->DomainName.Buffer, + memcpy(info->wki102_langroup, DomainInfo->Name.Buffer, domainNameLen * sizeof(WCHAR)); info->wki102_lanroot = info->wki102_langroup + domainNameLen; memcpy(info->wki102_lanroot, lanroot, sizeof(lanroot));
8 years, 10 months
1
0
0
0
[jimtabor] 69926: [Win32SS|RTL] - Patch by Andrew Eikum : Use font default height if GetTextExtentPoint returns empty rectangle. - Wine port sync.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Tue Nov 17 16:51:59 2015 New Revision: 69926 URL:
http://svn.reactos.org/svn/reactos?rev=69926&view=rev
Log: [Win32SS|RTL] - Patch by Andrew Eikum : Use font default height if GetTextExtentPoint returns empty rectangle. - Wine port sync. Modified: trunk/reactos/win32ss/user/rtl/text.c Modified: trunk/reactos/win32ss/user/rtl/text.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/rtl/text.c?re…
============================================================================== --- trunk/reactos/win32ss/user/rtl/text.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/rtl/text.c [iso-8859-1] Tue Nov 17 16:51:59 2015 @@ -85,10 +85,17 @@ SIZE extent; int i, j; int start = x; + TEXTMETRICW tm; if (!lpTabPos) cTabStops=0; +#ifdef _WIN32K_ + GreGetTextMetricsW( hdc, &tm ); +#else + GetTextMetricsW( hdc, &tm ); +#endif + if (cTabStops == 1) { defWidth = *lpTabPos; @@ -96,13 +103,6 @@ } else { -#ifdef _WIN32K_ - TEXTMETRICW tm; - GreGetTextMetricsW( hdc, &tm ); -#else - TEXTMETRICA tm; - GetTextMetricsA( hdc, &tm ); -#endif defWidth = 8 * tm.tmAveCharWidth; } @@ -178,6 +178,10 @@ count -= j; lpstr += j; } + + if(!extent.cy) + extent.cy = tm.tmHeight; + return MAKELONG(x - start, extent.cy); }
8 years, 10 months
1
0
0
0
[akhaldi] 69925: [BCRYPT] Sync with Wine Staging 1.7.55. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Nov 17 16:16:10 2015 New Revision: 69925 URL:
http://svn.reactos.org/svn/reactos?rev=69925&view=rev
Log: [BCRYPT] Sync with Wine Staging 1.7.55. CORE-10536 Modified: trunk/reactos/dll/win32/bcrypt/bcrypt.spec trunk/reactos/dll/win32/bcrypt/bcrypt_main.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/bcrypt/bcrypt.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/bcrypt/bcrypt.sp…
============================================================================== --- trunk/reactos/dll/win32/bcrypt/bcrypt.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/bcrypt/bcrypt.spec [iso-8859-1] Tue Nov 17 16:16:10 2015 @@ -4,7 +4,7 @@ @ stub BCryptConfigureContext @ stub BCryptConfigureContextFunction @ stub BCryptCreateContext -@ stub BCryptCreateHash +@ stdcall BCryptCreateHash(ptr ptr ptr long ptr long long) @ stub BCryptDecrypt @ stub BCryptDeleteContext @ stub BCryptDeriveKey Modified: trunk/reactos/dll/win32/bcrypt/bcrypt_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/bcrypt/bcrypt_ma…
============================================================================== --- trunk/reactos/dll/win32/bcrypt/bcrypt_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/bcrypt/bcrypt_main.c [iso-8859-1] Tue Nov 17 16:16:10 2015 @@ -114,3 +114,11 @@ return STATUS_NOT_IMPLEMENTED; } + +NTSTATUS WINAPI BCryptCreateHash(BCRYPT_ALG_HANDLE algorithm, BCRYPT_HASH_HANDLE* hash, UCHAR* hashobject, + ULONG hashobjectlen, UCHAR *secret, ULONG secretlen, ULONG flags) +{ + FIXME("%p, %p, %p, %u, %p, %u, %08x - stub\n", algorithm, hash, hashobject, hashobjectlen, secret, secretlen, flags); + + return STATUS_NOT_IMPLEMENTED; +} Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Nov 17 16:16:10 2015 @@ -49,7 +49,7 @@ reactos/dll/win32/atl80 # Synced to WineStaging-1.7.55 reactos/dll/win32/atl100 # Synced to WineStaging-1.7.55 reactos/dll/win32/avifil32 # Synced to WineStaging-1.7.55 -reactos/dll/win32/bcrypt # Synced to WineStaging-1.7.47 +reactos/dll/win32/bcrypt # Synced to WineStaging-1.7.55 reactos/dll/win32/browseui # Out of sync reactos/dll/win32/cabinet # Synced to WineStaging-1.7.47 reactos/dll/win32/clusapi # Synced to WineStaging-1.7.47
8 years, 10 months
1
0
0
0
← Newer
1
...
27
28
29
30
31
32
33
...
46
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
Results per page:
10
25
50
100
200