- Fix Japanese IDS_MINIATURETITLE resource string.
- Fix Japanese IDM_VIEWSHOWMINIATURE menu item text.
- Fix DWORD as COLORREF.
- Improve some OnPaint's.
CORE-17969
}
void
-SelectionFrame(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, DWORD system_selection_color)
+SelectionFrame(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF system_selection_color)
{
HBRUSH oldBrush;
LOGBRUSH logbrush;
void RectSel(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2);
-void SelectionFrame(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, DWORD system_selection_color);
+void SelectionFrame(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF system_selection_color);
void Text(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, LPCTSTR lpchText, HFONT font, LONG style);
DeleteObject(SelectObject(hdc, oldPen));
}
EndPaint(&ps);
- selectionWindow.Invalidate(FALSE);
- miniature.Invalidate(FALSE);
+ if (selectionWindow.IsWindowVisible())
+ selectionWindow.Invalidate(FALSE);
+ if (miniature.IsWindowVisible())
+ miniature.Invalidate(FALSE);
if (textEditWindow.IsWindowVisible())
textEditWindow.Invalidate(FALSE);
return 0;
END
MENUITEM SEPARATOR
MENUITEM "グリッドを表示(&G)\tCtrl+G", IDM_VIEWSHOWGRID
- MENUITEM "実寸表示(&H)", IDM_VIEWSHOWMINIATURE
+ MENUITEM "縮小表示(&H)", IDM_VIEWSHOWMINIATURE
END
MENUITEM "全画面表示(&F)\tCtrl+F", IDM_VIEWFULLSCREEN
END
IDS_INFOTEXT "GNU Lesser General Public License (LGPL, 詳細は www.gnu.org) の下で利用可能です。"
IDS_SAVEPROMPTTEXT "%s の変更内容を保存しますか?"
IDS_DEFAULTFILENAME "無題"
- IDS_MINIATURETITLE "縮小図"
+ IDS_MINIATURETITLE "縮小表示"
IDS_TOOLTIP1 "自由選択"
IDS_TOOLTIP2 "選択"
IDS_TOOLTIP3 "消しゴム"
LRESULT CPaletteWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
RECT rc = { 0, 0, 31, 32 };
- HDC hDC = GetDC();
HPEN oldPen;
HBRUSH oldBrush;
int i, a, b;
DefWindowProc(WM_PAINT, wParam, lParam);
+ HDC hDC = GetDC();
for(b = 2; b < 30; b++)
for(a = 2; a < 29; a++)
if ((a + b) % 2 == 1)
};
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;
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;
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)
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;
}
POINT m_ptPos;
POINT m_ptFrac;
POINT m_ptDelta;
- DWORD m_dwSystemSelectionColor;
int IdentifyCorner(int iXPos, int iYPos, int iWidth, int iHeight);
};
LRESULT CToolSettingsWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
- HDC hdc = GetDC();
RECT rect1 = { 0, 0, 42, 66 };
RECT rect2 = { 0, 70, 42, 136 };
DefWindowProc(WM_PAINT, wParam, lParam);
+ HDC hdc = GetDC();
DrawEdge(hdc, &rect1, BDR_SUNKENOUTER, (toolsModel.GetActiveTool() == TOOL_ZOOM) ? BF_RECT : BF_RECT | BF_MIDDLE);
DrawEdge(hdc, &rect2, (toolsModel.GetActiveTool() >= TOOL_RECT) ? BDR_SUNKENOUTER : 0, BF_RECT | BF_MIDDLE);
switch (toolsModel.GetActiveTool())