mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 14:42:11 +00:00
[MSPAINT] Some minor improvements (#4264)
- Fix Japanese IDS_MINIATURETITLE resource string. - Fix Japanese IDM_VIEWSHOWMINIATURE menu item text. - Fix DWORD as COLORREF. - Improve some OnPaint's. CORE-17969
This commit is contained in:
parent
edf92c004d
commit
3456538e3a
8 changed files with 21 additions and 19 deletions
|
@ -22,7 +22,9 @@ const LPCTSTR CSelectionWindow::m_lpszCursorLUT[9] = { /* action to mouse cursor
|
|||
};
|
||||
|
||||
BOOL
|
||||
ColorKeyedMaskBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HDC hdcSrc, int nXSrc, int nYSrc, HBITMAP hbmMask, int xMask, int yMask, DWORD dwRop, COLORREF keyColor)
|
||||
ColorKeyedMaskBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight,
|
||||
HDC hdcSrc, int nXSrc, int nYSrc, HBITMAP hbmMask, int xMask, int yMask,
|
||||
DWORD dwRop, COLORREF keyColor)
|
||||
{
|
||||
HDC hTempDC;
|
||||
HDC hTempDC2;
|
||||
|
@ -88,13 +90,14 @@ int CSelectionWindow::IdentifyCorner(int iXPos, int iYPos, int iWidth, int iHeig
|
|||
|
||||
LRESULT CSelectionWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
DefWindowProc(WM_PAINT, wParam, lParam);
|
||||
if (!m_bMoving)
|
||||
{
|
||||
HDC hDC = GetDC();
|
||||
DefWindowProc(WM_PAINT, wParam, lParam);
|
||||
SelectionFrame(hDC, 1, 1, Zoomed(selectionModel.GetDestRectWidth()) + 5,
|
||||
Zoomed(selectionModel.GetDestRectHeight()) + 5,
|
||||
m_dwSystemSelectionColor);
|
||||
SelectionFrame(hDC, 1, 1,
|
||||
Zoomed(selectionModel.GetDestRectWidth()) + (GRIP_SIZE * 2) - 1,
|
||||
Zoomed(selectionModel.GetDestRectHeight()) + (GRIP_SIZE * 2) - 1,
|
||||
GetSysColor(COLOR_HIGHLIGHT));
|
||||
ReleaseDC(hDC);
|
||||
}
|
||||
return 0;
|
||||
|
@ -103,7 +106,7 @@ LRESULT CSelectionWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL&
|
|||
LRESULT CSelectionWindow::OnEraseBkgnd(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
// do nothing => transparent background
|
||||
return 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LRESULT CSelectionWindow::OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
|
@ -111,16 +114,14 @@ LRESULT CSelectionWindow::OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
|
|||
m_bMoving = FALSE;
|
||||
m_iAction = ACTION_MOVE;
|
||||
/* update the system selection color */
|
||||
m_dwSystemSelectionColor = GetSysColor(COLOR_HIGHLIGHT);
|
||||
SendMessage(WM_PAINT, 0, MAKELPARAM(0, 0));
|
||||
Invalidate();
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CSelectionWindow::OnSysColorChange(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
/* update the system selection color */
|
||||
m_dwSystemSelectionColor = GetSysColor(COLOR_HIGHLIGHT);
|
||||
SendMessage(WM_PAINT, 0, MAKELPARAM(0, 0));
|
||||
Invalidate();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue