mirror of
https://github.com/reactos/reactos.git
synced 2025-04-30 02:58:48 +00:00
[MSPAINT] Implement the text tool (#4237)
- Add CFontsDialog and IDD_FONTS. - Rewrite CTextEditWindow. - Implement TOOL_TEXT tool. - Add the font-related settings. CORE-17949
This commit is contained in:
parent
951e52104a
commit
361a2ce4f7
52 changed files with 1686 additions and 99 deletions
|
@ -19,6 +19,7 @@
|
|||
CMirrorRotateDialog mirrorRotateDialog;
|
||||
CAttributesDialog attributesDialog;
|
||||
CStretchSkewDialog stretchSkewDialog;
|
||||
CFontsDialog fontsDialog;
|
||||
|
||||
/* FUNCTIONS ********************************************************/
|
||||
|
||||
|
@ -258,3 +259,332 @@ LRESULT CStretchSkewDialog::OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, B
|
|||
EndDialog(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT CALLBACK
|
||||
EnumFontFamProc(ENUMLOGFONT *lpelf, NEWTEXTMETRIC *lpntm, INT FontType, LPARAM lParam)
|
||||
{
|
||||
CSimpleArray<CString>& arrFontNames = *reinterpret_cast<CSimpleArray<CString>*>(lParam);
|
||||
LPTSTR name = lpelf->elfLogFont.lfFaceName;
|
||||
if (name[0] == TEXT('@')) // Vertical fonts
|
||||
return TRUE;
|
||||
|
||||
for (INT i = 0; i < arrFontNames.GetSize(); ++i)
|
||||
{
|
||||
if (arrFontNames[i] == name) // Already exists
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
arrFontNames.Add(name);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// TODO: AutoComplete font names
|
||||
// TODO: Vertical text
|
||||
CFontsDialog::CFontsDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void CFontsDialog::InitFontNames()
|
||||
{
|
||||
// List the fonts
|
||||
CSimpleArray<CString> arrFontNames;
|
||||
HDC hDC = CreateCompatibleDC(NULL);
|
||||
if (hDC)
|
||||
{
|
||||
EnumFontFamilies(hDC, NULL, (FONTENUMPROC)EnumFontFamProc,
|
||||
reinterpret_cast<LPARAM>(&arrFontNames));
|
||||
DeleteDC(hDC);
|
||||
}
|
||||
|
||||
// Actually add them to the combobox
|
||||
HWND hwndNames = GetDlgItem(IDD_FONTSNAMES);
|
||||
SendMessage(hwndNames, CB_RESETCONTENT, 0, 0);
|
||||
for (INT i = 0; i < arrFontNames.GetSize(); ++i)
|
||||
{
|
||||
ComboBox_AddString(hwndNames, arrFontNames[i]);
|
||||
}
|
||||
|
||||
::SetWindowText(hwndNames, registrySettings.strFontName);
|
||||
}
|
||||
|
||||
void CFontsDialog::InitFontSizes()
|
||||
{
|
||||
static const INT s_sizes[] =
|
||||
{
|
||||
8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72
|
||||
};
|
||||
|
||||
HWND hwndSizes = GetDlgItem(IDD_FONTSSIZES);
|
||||
ComboBox_ResetContent(hwndSizes);
|
||||
|
||||
TCHAR szText[16];
|
||||
for (UINT i = 0; i < _countof(s_sizes); ++i)
|
||||
{
|
||||
wsprintf(szText, TEXT("%d"), s_sizes[i]);
|
||||
INT iItem = ComboBox_AddString(hwndSizes, szText);
|
||||
if (s_sizes[i] == (INT)registrySettings.PointSize)
|
||||
ComboBox_SetCurSel(hwndSizes, iItem);
|
||||
}
|
||||
|
||||
if (ComboBox_GetCurSel(hwndSizes) == CB_ERR)
|
||||
{
|
||||
wsprintf(szText, TEXT("%d"), (INT)registrySettings.PointSize);
|
||||
::SetWindowText(hwndSizes, szText);
|
||||
}
|
||||
}
|
||||
|
||||
void CFontsDialog::InitToolbar()
|
||||
{
|
||||
HWND hwndToolbar = GetDlgItem(IDD_FONTSTOOLBAR);
|
||||
SendMessage(hwndToolbar, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);
|
||||
SendMessage(hwndToolbar, TB_SETBITMAPSIZE, 0, MAKELPARAM(16, 16));
|
||||
SendMessage(hwndToolbar, TB_SETBUTTONWIDTH, 0, MAKELPARAM(20, 20));
|
||||
|
||||
TBADDBITMAP AddBitmap;
|
||||
AddBitmap.hInst = hProgInstance;
|
||||
AddBitmap.nID = IDB_FONTSTOOLBAR;
|
||||
SendMessage(hwndToolbar, TB_ADDBITMAP, 4, (LPARAM)&AddBitmap);
|
||||
|
||||
HIMAGELIST himl = ImageList_LoadImage(hProgInstance, MAKEINTRESOURCE(IDB_FONTSTOOLBAR),
|
||||
16, 8, RGB(255, 0, 255), IMAGE_BITMAP,
|
||||
LR_CREATEDIBSECTION);
|
||||
SendMessage(hwndToolbar, TB_SETIMAGELIST, 0, (LPARAM)himl);
|
||||
|
||||
TBBUTTON buttons[] =
|
||||
{
|
||||
{ 0, IDM_BOLD, TBSTATE_ENABLED, TBSTYLE_CHECK },
|
||||
{ 1, IDM_ITALIC, TBSTATE_ENABLED, TBSTYLE_CHECK },
|
||||
{ 2, IDM_UNDERLINE, TBSTATE_ENABLED, TBSTYLE_CHECK },
|
||||
{ 3, IDM_VERTICAL, 0, TBSTYLE_CHECK }, // TODO:
|
||||
};
|
||||
SendMessage(hwndToolbar, TB_ADDBUTTONS, _countof(buttons), (LPARAM)&buttons);
|
||||
|
||||
SendMessage(hwndToolbar, TB_CHECKBUTTON, IDM_BOLD, registrySettings.Bold);
|
||||
SendMessage(hwndToolbar, TB_CHECKBUTTON, IDM_ITALIC, registrySettings.Italic);
|
||||
SendMessage(hwndToolbar, TB_CHECKBUTTON, IDM_UNDERLINE, registrySettings.Underline);
|
||||
}
|
||||
|
||||
LRESULT CFontsDialog::OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
// TODO: Tooltips
|
||||
InitFontNames();
|
||||
InitFontSizes();
|
||||
InitToolbar();
|
||||
|
||||
if (registrySettings.FontsPositionX != 0 || registrySettings.FontsPositionY != 0)
|
||||
{
|
||||
SetWindowPos(NULL,
|
||||
registrySettings.FontsPositionX, registrySettings.FontsPositionY,
|
||||
0, 0,
|
||||
SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
|
||||
SendMessage(DM_REPOSITION, 0, 0);
|
||||
}
|
||||
|
||||
if (!registrySettings.ShowTextTool)
|
||||
ShowWindow(SW_HIDE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LRESULT CFontsDialog::OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
ShowWindow(SW_HIDE); // Just hide. Recycle for optimization
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CFontsDialog::OnFontName(UINT codeNotify)
|
||||
{
|
||||
HWND hwndNames = GetDlgItem(IDD_FONTSNAMES);
|
||||
INT iItem = CB_ERR;
|
||||
UINT cch;
|
||||
TCHAR szText[LF_FACESIZE];
|
||||
|
||||
switch (codeNotify)
|
||||
{
|
||||
case CBN_SELCHANGE:
|
||||
iItem = ComboBox_GetCurSel(hwndNames);
|
||||
cch = ComboBox_GetLBTextLen(hwndNames, iItem);
|
||||
if (iItem != CB_ERR && 0 < cch && cch < _countof(szText))
|
||||
{
|
||||
ComboBox_GetLBText(hwndNames, iItem, szText);
|
||||
}
|
||||
break;
|
||||
|
||||
case CBN_EDITCHANGE:
|
||||
GetDlgItemText(IDD_FONTSNAMES, szText, _countof(szText));
|
||||
iItem = ComboBox_FindStringExact(hwndNames, -1, szText);
|
||||
break;
|
||||
}
|
||||
|
||||
if (iItem != CB_ERR && registrySettings.strFontName.CompareNoCase(szText) != 0)
|
||||
{
|
||||
registrySettings.strFontName = szText;
|
||||
toolsModel.NotifyToolChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void CFontsDialog::OnFontSize(UINT codeNotify)
|
||||
{
|
||||
HWND hwndSizes = GetDlgItem(IDD_FONTSSIZES);
|
||||
WCHAR szText[8];
|
||||
INT iItem, PointSize = 0;
|
||||
UINT cch;
|
||||
|
||||
switch (codeNotify)
|
||||
{
|
||||
case CBN_SELCHANGE:
|
||||
iItem = ComboBox_GetCurSel(hwndSizes);
|
||||
cch = ComboBox_GetLBTextLen(hwndSizes, iItem);
|
||||
if (iItem != CB_ERR && 0 < cch && cch < _countof(szText))
|
||||
{
|
||||
ComboBox_GetLBText(hwndSizes, iItem, szText);
|
||||
PointSize = _ttoi(szText);
|
||||
}
|
||||
break;
|
||||
|
||||
case CBN_EDITCHANGE:
|
||||
::GetWindowText(hwndSizes, szText, _countof(szText));
|
||||
PointSize = _ttoi(szText);
|
||||
break;
|
||||
}
|
||||
|
||||
if (PointSize > 0)
|
||||
{
|
||||
registrySettings.PointSize = PointSize;
|
||||
toolsModel.NotifyToolChanged();
|
||||
}
|
||||
}
|
||||
|
||||
LRESULT CFontsDialog::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
UINT id = LOWORD(wParam);
|
||||
UINT codeNotify = HIWORD(wParam);
|
||||
HWND hwndToolbar = GetDlgItem(IDD_FONTSTOOLBAR);
|
||||
BOOL bChecked = ::SendMessage(hwndToolbar, TB_ISBUTTONCHECKED, id, 0);
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case IDCANCEL:
|
||||
ShowWindow(SW_HIDE);
|
||||
registrySettings.ShowTextTool = FALSE;
|
||||
break;
|
||||
|
||||
case IDD_FONTSNAMES:
|
||||
OnFontName(codeNotify);
|
||||
break;
|
||||
|
||||
case IDD_FONTSSIZES:
|
||||
OnFontSize(codeNotify);
|
||||
break;
|
||||
|
||||
case IDM_BOLD:
|
||||
registrySettings.Bold = bChecked;
|
||||
toolsModel.NotifyToolChanged();
|
||||
break;
|
||||
|
||||
case IDM_ITALIC:
|
||||
registrySettings.Italic = bChecked;
|
||||
toolsModel.NotifyToolChanged();
|
||||
break;
|
||||
|
||||
case IDM_UNDERLINE:
|
||||
registrySettings.Underline = bChecked;
|
||||
toolsModel.NotifyToolChanged();
|
||||
break;
|
||||
|
||||
case IDM_VERTICAL:
|
||||
// TODO:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CFontsDialog::OnNotify(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
NMHDR *pnmhdr = reinterpret_cast<NMHDR *>(lParam);
|
||||
if (pnmhdr->code == TTN_NEEDTEXT)
|
||||
{
|
||||
LPTOOLTIPTEXT pToolTip = reinterpret_cast<LPTOOLTIPTEXT>(lParam);
|
||||
pToolTip->hinst = hProgInstance;
|
||||
switch (pnmhdr->idFrom)
|
||||
{
|
||||
case IDM_BOLD: pToolTip->lpszText = MAKEINTRESOURCE(IDS_BOLD); break;
|
||||
case IDM_ITALIC: pToolTip->lpszText = MAKEINTRESOURCE(IDS_ITALIC); break;
|
||||
case IDM_UNDERLINE: pToolTip->lpszText = MAKEINTRESOURCE(IDS_UNDERLINE); break;
|
||||
case IDM_VERTICAL: pToolTip->lpszText = MAKEINTRESOURCE(IDS_VERTICAL); break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CFontsDialog::OnMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
RECT rc;
|
||||
GetWindowRect(&rc);
|
||||
registrySettings.FontsPositionX = rc.left;
|
||||
registrySettings.FontsPositionY = rc.top;
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CFontsDialog::OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
if (wParam != TOOL_TEXT)
|
||||
ShowWindow(SW_HIDE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CFontsDialog::OnMeasureItem(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
if (wParam == IDD_FONTSNAMES)
|
||||
{
|
||||
LPMEASUREITEMSTRUCT pMeasureItem = reinterpret_cast<LPMEASUREITEMSTRUCT>(lParam);
|
||||
RECT rc;
|
||||
::GetClientRect(GetDlgItem(IDD_FONTSNAMES), &rc);
|
||||
pMeasureItem->itemWidth = rc.right - rc.left;
|
||||
pMeasureItem->itemHeight = GetSystemMetrics(SM_CYVSCROLL);
|
||||
return TRUE;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CFontsDialog::OnDrawItem(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
// TODO: Owner-draw the font types
|
||||
if (wParam == IDD_FONTSNAMES)
|
||||
{
|
||||
LPDRAWITEMSTRUCT pDrawItem = reinterpret_cast<LPDRAWITEMSTRUCT>(lParam);
|
||||
if (pDrawItem->itemID == (UINT)-1)
|
||||
return TRUE;
|
||||
|
||||
SetBkMode(pDrawItem->hDC, TRANSPARENT);
|
||||
|
||||
HWND hwndItem = pDrawItem->hwndItem;
|
||||
RECT rcItem = pDrawItem->rcItem;
|
||||
if (pDrawItem->itemState & ODS_SELECTED)
|
||||
{
|
||||
FillRect(pDrawItem->hDC, &rcItem, GetSysColorBrush(COLOR_HIGHLIGHT));
|
||||
SetTextColor(pDrawItem->hDC, GetSysColor(COLOR_HIGHLIGHTTEXT));
|
||||
}
|
||||
else
|
||||
{
|
||||
FillRect(pDrawItem->hDC, &rcItem, GetSysColorBrush(COLOR_WINDOW));
|
||||
SetTextColor(pDrawItem->hDC, GetSysColor(COLOR_WINDOWTEXT));
|
||||
}
|
||||
|
||||
TCHAR szText[LF_FACESIZE];
|
||||
szText[0] = 0;
|
||||
ComboBox_GetLBText(hwndItem, pDrawItem->itemID, szText);
|
||||
rcItem.left += 24;
|
||||
DrawText(pDrawItem->hDC, szText, -1, &rcItem, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
|
||||
|
||||
if (pDrawItem->itemState & ODS_FOCUS)
|
||||
::DrawFocusRect(pDrawItem->hDC, &pDrawItem->rcItem);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -86,3 +86,37 @@ public:
|
|||
POINT percentage;
|
||||
POINT angle;
|
||||
};
|
||||
|
||||
class CFontsDialog : public CDialogImpl<CFontsDialog>
|
||||
{
|
||||
public:
|
||||
enum { IDD = IDD_FONTS };
|
||||
|
||||
CFontsDialog();
|
||||
void InitFontNames();
|
||||
void InitFontSizes();
|
||||
void InitToolbar();
|
||||
|
||||
BEGIN_MSG_MAP(CFontsDialog)
|
||||
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
||||
MESSAGE_HANDLER(WM_CLOSE, OnClose)
|
||||
MESSAGE_HANDLER(WM_COMMAND, OnCommand)
|
||||
MESSAGE_HANDLER(WM_MOVE, OnMove)
|
||||
MESSAGE_HANDLER(WM_NOTIFY, OnNotify)
|
||||
MESSAGE_HANDLER(WM_TOOLSMODELTOOLCHANGED, OnToolsModelToolChanged)
|
||||
MESSAGE_HANDLER(WM_MEASUREITEM, OnMeasureItem)
|
||||
MESSAGE_HANDLER(WM_DRAWITEM, OnDrawItem)
|
||||
END_MSG_MAP()
|
||||
|
||||
protected:
|
||||
LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnNotify(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnMeasureItem(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnDrawItem(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
void OnFontSize(UINT codeNotify);
|
||||
void OnFontName(UINT codeNotify);
|
||||
};
|
||||
|
|
|
@ -229,7 +229,7 @@ RectSel(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2)
|
|||
{
|
||||
HBRUSH oldBrush;
|
||||
LOGBRUSH logbrush;
|
||||
HPEN oldPen = (HPEN) SelectObject(hdc, CreatePen(PS_DOT, 1, 0x00000000));
|
||||
HPEN oldPen = (HPEN) SelectObject(hdc, CreatePen(PS_DOT, 1, GetSysColor(COLOR_HIGHLIGHT)));
|
||||
UINT oldRop = GetROP2(hdc);
|
||||
|
||||
SetROP2(hdc, R2_NOTXORPEN);
|
||||
|
@ -276,20 +276,34 @@ SelectionFrame(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, DWORD system_selecti
|
|||
void
|
||||
Text(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, LPCTSTR lpchText, HFONT font, LONG style)
|
||||
{
|
||||
HFONT oldFont;
|
||||
RECT rect = {x1, y1, x2, y2};
|
||||
COLORREF oldColor;
|
||||
COLORREF oldBkColor;
|
||||
int oldBkMode;
|
||||
oldFont = (HFONT) SelectObject(hdc, font);
|
||||
oldColor = SetTextColor(hdc, fg);
|
||||
oldBkColor = SetBkColor(hdc, bg);
|
||||
oldBkMode = SetBkMode(hdc, TRANSPARENT);
|
||||
if (style == 0)
|
||||
Rect(hdc, x1, y1, x2, y2, bg, bg, 1, 2);
|
||||
DrawText(hdc, lpchText, -1, &rect, DT_EDITCONTROL);
|
||||
SelectObject(hdc, oldFont);
|
||||
SetTextColor(hdc, oldColor);
|
||||
SetBkColor(hdc, oldBkColor);
|
||||
SetBkMode(hdc, oldBkMode);
|
||||
INT iSaveDC = SaveDC(hdc); // We will modify the clipping region. Save now.
|
||||
|
||||
RECT rc;
|
||||
SetRect(&rc, x1, y1, x2, y2);
|
||||
|
||||
if (style == 0) // Transparent
|
||||
{
|
||||
SetBkMode(hdc, TRANSPARENT);
|
||||
GetBkColor(hdc);
|
||||
}
|
||||
else // Opaque
|
||||
{
|
||||
SetBkMode(hdc, OPAQUE);
|
||||
SetBkColor(hdc, bg);
|
||||
|
||||
HBRUSH hbr = CreateSolidBrush(bg);
|
||||
FillRect(hdc, &rc, hbr); // Fill the background
|
||||
DeleteObject(hbr);
|
||||
}
|
||||
|
||||
IntersectClipRect(hdc, rc.left, rc.top, rc.right, rc.bottom);
|
||||
|
||||
HGDIOBJ hFontOld = SelectObject(hdc, font);
|
||||
SetTextColor(hdc, fg);
|
||||
const UINT uFormat = DT_LEFT | DT_TOP | DT_EDITCONTROL | DT_NOPREFIX | DT_NOCLIP |
|
||||
DT_EXPANDTABS | DT_WORDBREAK;
|
||||
DrawText(hdc, lpchText, -1, &rc, uFormat);
|
||||
SelectObject(hdc, hFontOld);
|
||||
|
||||
RestoreDC(hdc, iSaveDC); // Restore
|
||||
}
|
||||
|
|
|
@ -99,10 +99,9 @@ extern CTextEditWindow textEditWindow;
|
|||
class CMirrorRotateDialog;
|
||||
class CAttributesDialog;
|
||||
class CStretchSkewDialog;
|
||||
class CFontsDialog;
|
||||
|
||||
extern CMirrorRotateDialog mirrorRotateDialog;
|
||||
extern CAttributesDialog attributesDialog;
|
||||
extern CStretchSkewDialog stretchSkewDialog;
|
||||
|
||||
/* VARIABLES declared in mouse.cpp **********************************/
|
||||
|
||||
extern CFontsDialog fontsDialog;
|
||||
|
|
BIN
base/applications/mspaint/icons/fontstoolbar.bmp
Normal file
BIN
base/applications/mspaint/icons/fontstoolbar.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
|
@ -12,8 +12,6 @@
|
|||
|
||||
#include "precomp.h"
|
||||
|
||||
#include "dialogs.h"
|
||||
|
||||
/* FUNCTIONS ********************************************************/
|
||||
|
||||
void
|
||||
|
@ -102,10 +100,28 @@ LRESULT CImgAreaWindow::OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
|
|||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CImgAreaWindow::OnEraseBkGnd(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
HDC hdc = (HDC)wParam;
|
||||
|
||||
if (toolsModel.GetActiveTool() == TOOL_TEXT && !toolsModel.IsBackgroundTransparent() &&
|
||||
textEditWindow.IsWindowVisible())
|
||||
{
|
||||
// Do clipping
|
||||
HWND hChild = textEditWindow;
|
||||
RECT rcChild;
|
||||
::GetWindowRect(hChild, &rcChild);
|
||||
::MapWindowPoints(NULL, m_hWnd, (LPPOINT)&rcChild, 2);
|
||||
ExcludeClipRect(hdc, rcChild.left, rcChild.top, rcChild.right, rcChild.bottom);
|
||||
}
|
||||
|
||||
return DefWindowProc(nMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
LRESULT CImgAreaWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
DefWindowProc(WM_PAINT, wParam, lParam);
|
||||
HDC hdc = GetDC();
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc = BeginPaint(&ps);
|
||||
int imgXRes = imageModel.GetWidth();
|
||||
int imgYRes = imageModel.GetHeight();
|
||||
StretchBlt(hdc, 0, 0, Zoomed(imgXRes), Zoomed(imgYRes), imageModel.GetDC(), 0, 0, imgXRes,
|
||||
|
@ -126,9 +142,11 @@ LRESULT CImgAreaWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& b
|
|||
}
|
||||
DeleteObject(SelectObject(hdc, oldPen));
|
||||
}
|
||||
ReleaseDC(hdc);
|
||||
EndPaint(&ps);
|
||||
selectionWindow.Invalidate(FALSE);
|
||||
miniature.Invalidate(FALSE);
|
||||
if (textEditWindow.IsWindowVisible())
|
||||
textEditWindow.Invalidate(FALSE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -382,3 +400,10 @@ LRESULT CImgAreaWindow::OnMouseWheel(UINT nMsg, WPARAM wParam, LPARAM lParam, BO
|
|||
{
|
||||
return ::SendMessage(GetParent(), nMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
LRESULT CImgAreaWindow::OnCtlColorEdit(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
HDC hdc = (HDC)wParam;
|
||||
SetBkMode(hdc, TRANSPARENT);
|
||||
return (LRESULT)GetStockObject(NULL_BRUSH);
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ public:
|
|||
|
||||
BEGIN_MSG_MAP(CImgAreaWindow)
|
||||
MESSAGE_HANDLER(WM_SIZE, OnSize)
|
||||
MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBkGnd)
|
||||
MESSAGE_HANDLER(WM_PAINT, OnPaint)
|
||||
MESSAGE_HANDLER(WM_SETCURSOR, OnSetCursor)
|
||||
MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown)
|
||||
|
@ -36,12 +37,14 @@ public:
|
|||
MESSAGE_HANDLER(WM_IMAGEMODELIMAGECHANGED, OnImageModelImageChanged)
|
||||
MESSAGE_HANDLER(WM_CAPTURECHANGED, OnCaptureChanged)
|
||||
MESSAGE_HANDLER(WM_KEYDOWN, OnKeyDown)
|
||||
MESSAGE_HANDLER(WM_CTLCOLOREDIT, OnCtlColorEdit)
|
||||
END_MSG_MAP()
|
||||
|
||||
BOOL drawing;
|
||||
|
||||
private:
|
||||
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnEraseBkGnd(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
|
@ -57,6 +60,7 @@ private:
|
|||
LRESULT OnImageModelImageChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnCaptureChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnKeyDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnCtlColorEdit(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
|
||||
void drawZoomFrame(int mouseX, int mouseY);
|
||||
void cancelDrawing();
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-bg-BG.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Файл"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "Отказ", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Рисуване"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "The angle must be between -89 and 89."
|
||||
IDS_LOADERRORTEXT "The file %s could not be loaded."
|
||||
IDS_ENLARGEPROMPTTEXT "The image in the clipboard is larger than the bitmap.\nWould you like the bitmap enlarged?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-cs-CZ.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Soubor"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "Storno", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Malování"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "Úhel musí být -89 a 89."
|
||||
IDS_LOADERRORTEXT "Soubor %s nemohl být načten."
|
||||
IDS_ENLARGEPROMPTTEXT "Obrázek ve schránce je větší než bitmapa.\nChcete bitmapu zvětšit?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-de-DE.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Datei"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "Abbrechen", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "Der Winkel muss zwischen -89 und 89 liegen."
|
||||
IDS_LOADERRORTEXT "Die Datei %s konnte nicht geladen werden."
|
||||
IDS_ENLARGEPROMPTTEXT "Das Bild in der Zwischenablage ist größer als die Bitmap.\nSoll die Bitmap vergrößert werden?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-en-GB.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&File"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "Cancel", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "The angle must be between -89 and 89."
|
||||
IDS_LOADERRORTEXT "The file %s could not be loaded."
|
||||
IDS_ENLARGEPROMPTTEXT "The image in the clipboard is larger than the bitmap.\nWould you like the bitmap enlarged?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&File"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "Cancel", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "The angle must be between -89 and 89."
|
||||
IDS_LOADERRORTEXT "The file %s could not be loaded."
|
||||
IDS_ENLARGEPROMPTTEXT "The image in the clipboard is larger than the bitmap.\nWould you like the bitmap enlarged?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-es-ES.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Archivo"
|
||||
|
@ -193,6 +195,17 @@ BEGIN
|
|||
PUSHBUTTON "Cancelar", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Tipografías"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -227,4 +240,8 @@ BEGIN
|
|||
IDS_ANGLE "El ángulo debe de estar entre -89 y 89."
|
||||
IDS_LOADERRORTEXT "No se pudo cargar el archivo %s."
|
||||
IDS_ENLARGEPROMPTTEXT "La imagen en el Portapapeles es más grande que el lienzo.\n¿Quieres adaptar las dimensiones del lienzo a su nuevo tamaño?"
|
||||
IDS_BOLD "Negrita"
|
||||
IDS_ITALIC "Cursiva"
|
||||
IDS_UNDERLINE "Subrayado"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_ESTONIAN, SUBLANG_DEFAULT
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-et-EE.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Fail"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "Tühista", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "Nurk peab -89 ja 89 vahemikus olema."
|
||||
IDS_LOADERRORTEXT "Faili %s ei suudetud laadida."
|
||||
IDS_ENLARGEPROMPTTEXT "Pilt lõikelaual on suurem kui digitaalkujutis.\nKas soovid digitaalkujutist suurendada?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
LANGUAGE LANG_BASQUE, SUBLANG_DEFAULT
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-eu-ES.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Fitxategia"
|
||||
|
@ -183,6 +185,17 @@ BEGIN
|
|||
PUSHBUTTON "Utzi", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -217,4 +230,8 @@ BEGIN
|
|||
IDS_ANGLE "Angelu -89 eta 89 tartean izan behar da."
|
||||
IDS_LOADERRORTEXT "%s artxiboaren karga ez ahal da."
|
||||
IDS_ENLARGEPROMPTTEXT "Klipboard dagoen argazkia bitmap-a baino handiagoa da.\nNahi duzu bitmap-a luzatu?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-fr-FR.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Fichier"
|
||||
|
@ -183,6 +185,17 @@ BEGIN
|
|||
PUSHBUTTON "Annuler", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -217,4 +230,8 @@ BEGIN
|
|||
IDS_ANGLE "L'angle doit être entre -89 et 89."
|
||||
IDS_LOADERRORTEXT "Le fichier %s n'a pas pu être chargé."
|
||||
IDS_ENLARGEPROMPTTEXT "L'image dans le presse-papier est plus grande que le bitmap.\nSouhaitez-vous agrandir le bitmap ?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-he-IL.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&קובץ"
|
||||
|
@ -186,6 +188,17 @@ BEGIN
|
|||
PUSHBUTTON "ביטול", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "צייר"
|
||||
|
@ -220,4 +233,8 @@ BEGIN
|
|||
IDS_ANGLE, "The angle must be between -89 and 89."
|
||||
IDS_LOADERRORTEXT, ".%s לא היה ניתן לטעון את הקובץ"
|
||||
IDS_ENLARGEPROMPTTEXT "The image in the clipboard is larger than the bitmap.\nWould you like the bitmap enlarged?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-hu-HU.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Fájl"
|
||||
|
@ -183,6 +185,17 @@ BEGIN
|
|||
PUSHBUTTON "Mégse", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -217,4 +230,8 @@ BEGIN
|
|||
IDS_ANGLE "A szögnek -89 és 89 között kell lennie."
|
||||
IDS_LOADERRORTEXT "A(z) %s fájlt nem sikerült betölteni."
|
||||
IDS_ENLARGEPROMPTTEXT "A vágólapon lévő kép nagyobb mint a bitkép.\nSzeretné a bitkép méretét megnövelni?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-id-ID.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "Be&rkas"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "Batal", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "Sudut hanya tersedia antara -89 and 89."
|
||||
IDS_LOADERRORTEXT "Berkas %s tidak bisa dimuat."
|
||||
IDS_ENLARGEPROMPTTEXT "Gambar pada papan klip lebih besar dari kanvas.\nPerbesar kanvas?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-it-IT.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&File"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "Annulla", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "L'angolo deve essere compreso tra -89 e 89."
|
||||
IDS_LOADERRORTEXT "l file %s non può essere caricato."
|
||||
IDS_ENLARGEPROMPTTEXT "The image in the clipboard is larger than the bitmap.\nWould you like the bitmap enlarged?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-ja-JP.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "ファイル(&F)"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "キャンセル", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "フォント"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 9, "MS UI Gothic"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "ペイント"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "角度は -89 から 89 の間でなければなりません。"
|
||||
IDS_LOADERRORTEXT "ファイル %s は読み込めませんでした。"
|
||||
IDS_ENLARGEPROMPTTEXT "クリップボードの画像はビットマップよりも大きいです。\nビットマップを拡張しますか?"
|
||||
IDS_BOLD "太字"
|
||||
IDS_ITALIC "斜体"
|
||||
IDS_UNDERLINE "下線"
|
||||
IDS_VERTICAL "縦書き"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-nl-NL.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Bestand"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "Annuleren", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "The angle must be between -89 and 89."
|
||||
IDS_LOADERRORTEXT "The file %s could not be loaded."
|
||||
IDS_ENLARGEPROMPTTEXT "The image in the clipboard is larger than the bitmap.\nWould you like the bitmap enlarged?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-no-NO.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Fil"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "Avbryt", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "The angle must be between -89 and 89."
|
||||
IDS_LOADERRORTEXT "The file %s could not be loaded."
|
||||
IDS_ENLARGEPROMPTTEXT "The image in the clipboard is larger than the bitmap.\nWould you like the bitmap enlarged?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-pl-PL.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Plik"
|
||||
|
@ -192,6 +194,17 @@ BEGIN
|
|||
PUSHBUTTON "Anuluj", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -226,4 +239,8 @@ BEGIN
|
|||
IDS_ANGLE "Wprowadź liczbę całkowitą z zakresu od -89 do 89."
|
||||
IDS_LOADERRORTEXT "Plik %s nie może być załadowany."
|
||||
IDS_ENLARGEPROMPTTEXT "Obraz w schowku jest większy niż bitmapa.\nChciałbyś powiększyć bitmapę?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-pt-BR.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Arquivo"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "Cancelar", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "The angle must be between -89 and 89."
|
||||
IDS_LOADERRORTEXT "The file %s could not be loaded."
|
||||
IDS_ENLARGEPROMPTTEXT "The image in the clipboard is larger than the bitmap.\nWould you like the bitmap enlarged?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-pt-PT.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Ficheiro"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "Cancelar", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "The angle must be between -89 and 89."
|
||||
IDS_LOADERRORTEXT "The file %s could not be loaded."
|
||||
IDS_ENLARGEPROMPTTEXT "The image in the clipboard is larger than the bitmap.\nWould you like the bitmap enlarged?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-ro-RO.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Fișier"
|
||||
|
@ -192,6 +194,17 @@ BEGIN
|
|||
PUSHBUTTON "A&nulează", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Pictare"
|
||||
|
@ -226,4 +239,8 @@ BEGIN
|
|||
IDS_ANGLE "Unghiul trebuie să fie între -89 și 89."
|
||||
IDS_LOADERRORTEXT "Fișierul %s nu poate fi încărcat."
|
||||
IDS_ENLARGEPROMPTTEXT "Imaginea din memorie este mai mare decât suprafața curent disponibilă în aplicație.\nDoriți să redimensionați suprafața de desen disponibilă?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-ru-RU.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Файл"
|
||||
|
@ -183,6 +185,17 @@ BEGIN
|
|||
PUSHBUTTON "Отмена", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -217,4 +230,8 @@ BEGIN
|
|||
IDS_ANGLE, "Угол должен быть в интервале от -89 до 89."
|
||||
IDS_LOADERRORTEXT, "Невозможно загрузить файл %s."
|
||||
IDS_ENLARGEPROMPTTEXT "Изображения в буфере обмена больше растрового изображения.\nХотите увеличить точечный рисунок?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-sk-SK.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Súbor"
|
||||
|
@ -192,6 +194,17 @@ BEGIN
|
|||
PUSHBUTTON "Zrušiť", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Skicár"
|
||||
|
@ -226,4 +239,8 @@ BEGIN
|
|||
IDS_ANGLE "The angle must be between -89 and 89."
|
||||
IDS_LOADERRORTEXT "The file %s could not be loaded."
|
||||
IDS_ENLARGEPROMPTTEXT "The image in the clipboard is larger than the bitmap.\nWould you like the bitmap enlarged?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_ALBANIAN, SUBLANG_NEUTRAL
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-sq-AL.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&File"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "Anulo", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "Këndi duhet të jetë në mes -89 dhe 89."
|
||||
IDS_LOADERRORTEXT "Dokumenti %s nuk mund te ngarkohej."
|
||||
IDS_ENLARGEPROMPTTEXT "The image in the clipboard is larger than the bitmap.\nWould you like the bitmap enlarged?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-sv-SE.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Arkiv"
|
||||
|
@ -183,6 +185,17 @@ BEGIN
|
|||
PUSHBUTTON "Avbryt", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -217,4 +230,8 @@ BEGIN
|
|||
IDS_ANGLE "The angle must be between -89 and 89."
|
||||
IDS_LOADERRORTEXT "The file %s could not be loaded."
|
||||
IDS_ENLARGEPROMPTTEXT "The image in the clipboard is larger than the bitmap.\nWould you like the bitmap enlarged?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-tr-TR.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Dosya"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "İptal", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "Açı -89 ile 89 arasında olmalıdır."
|
||||
IDS_LOADERRORTEXT "%s dosyası yüklenemedi."
|
||||
IDS_ENLARGEPROMPTTEXT "Panodaki resim bit eşleminden daha büyük.\nBit eşlemin genişletilmişini ister misiniz?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-uk-UA.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Файл"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "Скасувати", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Paint"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "The angle must be between -89 and 89."
|
||||
IDS_LOADERRORTEXT "The file %s could not be loaded."
|
||||
IDS_ENLARGEPROMPTTEXT "The image in the clipboard is larger than the bitmap.\nWould you like the bitmap enlarged?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_VIETNAMESE, SUBLANG_VIETNAMESE_VIETNAM
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-vi-VN.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Tập tin"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "Hủy", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "Vẽ"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "Giá trị của góc phải ở giữa -89 và 89."
|
||||
IDS_LOADERRORTEXT "Không thể tải tập tin %s."
|
||||
IDS_ENLARGEPROMPTTEXT "Hình ảnh bạn định dán lớn hơn hình bitmap này.\n Bạn có muốn nới rộng hình bitmap?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-zh-CN.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "文件(&F)"
|
||||
|
@ -192,6 +194,17 @@ BEGIN
|
|||
PUSHBUTTON "取消", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 9, "宋体"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "画图"
|
||||
|
@ -226,4 +239,8 @@ BEGIN
|
|||
IDS_ANGLE "角度必须在 -89 与 89 之间。"
|
||||
IDS_LOADERRORTEXT "文件 %s 无法加载。"
|
||||
IDS_ENLARGEPROMPTTEXT "剪贴板中的图像比位图大。\n你想扩大位图吗?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_HONGKONG
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-zh-HK.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "檔案(&F)"
|
||||
|
@ -191,6 +193,17 @@ BEGIN
|
|||
PUSHBUTTON "取消", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 9, "新細明體"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "小畫家"
|
||||
|
@ -225,4 +238,8 @@ BEGIN
|
|||
IDS_ANGLE "角度必須介乎 -89 至 89 之間。"
|
||||
IDS_LOADERRORTEXT "無法載入檔案 %s。"
|
||||
IDS_ENLARGEPROMPTTEXT "剪貼簿中的圖像比點陣圖大。\n你要擴大點陣圖嗎?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
|
||||
|
||||
//IDB_FONTSTOOLBAR BITMAP "icons/fontstoolbar-zh-TW.bmp"
|
||||
|
||||
ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "檔案(&F)"
|
||||
|
@ -192,6 +194,17 @@ BEGIN
|
|||
PUSHBUTTON "取消", IDCANCEL, 170, 24, 48, 14
|
||||
END
|
||||
|
||||
IDD_FONTS DIALOG 0, 0, 225, 25
|
||||
CAPTION "Fonts"
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 9, "新細明體"
|
||||
BEGIN
|
||||
COMBOBOX IDD_FONTSNAMES, 5, 5, 110, 200, CBS_HASSTRINGS | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDD_FONTSSIZES, 120, 5, 35, 250, CBS_HASSTRINGS | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "", IDD_FONTSTOOLBAR, "ToolbarWindow32", TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NOMOVEY, 160, 5, 60, 20
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROGRAMNAME "畫圖"
|
||||
|
@ -226,4 +239,8 @@ BEGIN
|
|||
IDS_ANGLE "角度必須介於 -89 和 89 之間。"
|
||||
IDS_LOADERRORTEXT "無法載入檔案 %s。"
|
||||
IDS_ENLARGEPROMPTTEXT "剪貼簿中的圖像比點陣圖大。\n你想擴大點陣圖嗎?"
|
||||
IDS_BOLD "Bold"
|
||||
IDS_ITALIC "Italic"
|
||||
IDS_UNDERLINE "Underline"
|
||||
IDS_VERTICAL "Vertical"
|
||||
END
|
||||
|
|
|
@ -171,7 +171,10 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
|
|||
hProgInstance = hThisInstance;
|
||||
|
||||
/* initialize common controls library */
|
||||
InitCommonControls();
|
||||
INITCOMMONCONTROLSEX iccx;
|
||||
iccx.dwSize = sizeof(iccx);
|
||||
iccx.dwICC = ICC_STANDARD_CLASSES | ICC_USEREX_CLASSES;
|
||||
InitCommonControlsEx(&iccx);
|
||||
|
||||
LoadString(hThisInstance, IDS_DEFAULTFILENAME, filepathname, _countof(filepathname));
|
||||
CPath pathFileName(filepathname);
|
||||
|
@ -256,6 +259,8 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
|
|||
DoLoadImageFile(mainWindow, __targv[1], TRUE);
|
||||
}
|
||||
|
||||
imageModel.ClearHistory();
|
||||
|
||||
/* initializing the CHOOSECOLOR structure for use with ChooseColor */
|
||||
ZeroMemory(&choosecolor, sizeof(choosecolor));
|
||||
choosecolor.lStructSize = sizeof(CHOOSECOLOR);
|
||||
|
@ -327,10 +332,6 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
|
|||
/* by moving the window, the things in WM_SIZE are done */
|
||||
mainWindow.SetWindowPlacement(&(registrySettings.WindowPlacement));
|
||||
|
||||
/* creating the text editor window for the text tool */
|
||||
RECT textEditWindowPos = {300, 0, 300 + 300, 0 + 200};
|
||||
textEditWindow.Create(hwnd, textEditWindowPos, NULL, WS_OVERLAPPEDWINDOW);
|
||||
|
||||
/* Make the window visible on the screen */
|
||||
ShowWindow (hwnd, nFunsterStil);
|
||||
|
||||
|
@ -340,6 +341,9 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
|
|||
/* Run the message loop. It will run until GetMessage() returns 0 */
|
||||
while (GetMessage(&messages, NULL, 0, 0))
|
||||
{
|
||||
if (fontsDialog.IsWindow() && IsDialogMessage(fontsDialog, &messages))
|
||||
continue;
|
||||
|
||||
TranslateAccelerator(hwnd, haccel, &messages);
|
||||
|
||||
/* Translate virtual-key messages into character messages */
|
||||
|
|
|
@ -366,12 +366,7 @@ struct TextTool : ToolBase
|
|||
{
|
||||
}
|
||||
|
||||
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick)
|
||||
{
|
||||
imageModel.CopyPrevious();
|
||||
}
|
||||
|
||||
void OnMouseMove(BOOL bLeftButton, LONG x, LONG y)
|
||||
void UpdatePoint(LONG x, LONG y)
|
||||
{
|
||||
POINT temp;
|
||||
imageModel.ResetToPrevious();
|
||||
|
@ -381,16 +376,78 @@ struct TextTool : ToolBase
|
|||
RectSel(m_hdc, start.x, start.y, temp.x, temp.y);
|
||||
}
|
||||
|
||||
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick)
|
||||
{
|
||||
if (!textEditWindow.IsWindow())
|
||||
textEditWindow.Create(imageArea);
|
||||
|
||||
imageModel.CopyPrevious();
|
||||
UpdatePoint(x, y);
|
||||
}
|
||||
|
||||
void OnMouseMove(BOOL bLeftButton, LONG x, LONG y)
|
||||
{
|
||||
UpdatePoint(x, y);
|
||||
}
|
||||
|
||||
void OnButtonUp(BOOL bLeftButton, LONG x, LONG y)
|
||||
{
|
||||
imageModel.ResetToPrevious();
|
||||
|
||||
BOOL bTextBoxShown = textEditWindow.IsWindowVisible();
|
||||
if (bTextBoxShown && textEditWindow.GetWindowTextLength() > 0)
|
||||
{
|
||||
CString szText;
|
||||
textEditWindow.GetWindowText(szText);
|
||||
|
||||
RECT rc;
|
||||
textEditWindow.InvalidateEditRect();
|
||||
textEditWindow.GetEditRect(&rc);
|
||||
|
||||
INT style = (toolsModel.IsBackgroundTransparent() ? 0 : 1);
|
||||
Text(m_hdc, rc.left, rc.top, rc.right, rc.bottom, m_fg, m_bg, szText,
|
||||
textEditWindow.GetFont(), style);
|
||||
}
|
||||
|
||||
if (registrySettings.ShowTextTool)
|
||||
{
|
||||
if (!fontsDialog.IsWindow())
|
||||
fontsDialog.Create(mainWindow);
|
||||
|
||||
fontsDialog.ShowWindow(SW_SHOWNOACTIVATE);
|
||||
}
|
||||
|
||||
if (!bTextBoxShown || selectionModel.IsSrcRectSizeNonzero())
|
||||
{
|
||||
RECT rc;
|
||||
selectionModel.GetRect(&rc);
|
||||
|
||||
// Enlarge if tool small
|
||||
INT cxMin = CX_MINTEXTEDIT, cyMin = CY_MINTEXTEDIT;
|
||||
if (selectionModel.IsSrcRectSizeNonzero())
|
||||
{
|
||||
imageModel.CopyPrevious();
|
||||
if (rc.right - rc.left < cxMin)
|
||||
rc.right = rc.left + cxMin;
|
||||
if (rc.bottom - rc.top < cyMin)
|
||||
rc.bottom = rc.top + cyMin;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetRect(&rc, x, y, x + cxMin, y + cyMin);
|
||||
}
|
||||
|
||||
placeSelWin();
|
||||
selectionWindow.ShowWindow(SW_SHOW);
|
||||
ForceRefreshSelectionContents();
|
||||
if (!textEditWindow.IsWindow())
|
||||
textEditWindow.Create(imageArea);
|
||||
|
||||
textEditWindow.SetWindowText(NULL);
|
||||
textEditWindow.ValidateEditRect(&rc);
|
||||
textEditWindow.ShowWindow(SW_SHOWNOACTIVATE);
|
||||
textEditWindow.SetFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
textEditWindow.ShowWindow(SW_HIDE);
|
||||
textEditWindow.SetWindowText(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -398,6 +455,8 @@ struct TextTool : ToolBase
|
|||
{
|
||||
imageModel.ResetToPrevious();
|
||||
selectionModel.ResetPtStack();
|
||||
textEditWindow.SetWindowText(NULL);
|
||||
textEditWindow.ShowWindow(SW_HIDE);
|
||||
ToolBase::OnCancelDraw();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -97,6 +97,8 @@ void PaletteModel::NotifyColorChanged()
|
|||
{
|
||||
paletteWindow.SendMessage(WM_PALETTEMODELCOLORCHANGED);
|
||||
selectionWindow.SendMessage(WM_PALETTEMODELCOLORCHANGED);
|
||||
if (textEditWindow.IsWindow())
|
||||
textEditWindow.SendMessage(WM_PALETTEMODELCOLORCHANGED);
|
||||
}
|
||||
|
||||
void PaletteModel::NotifyPaletteChanged()
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
#include "toolsettings.h"
|
||||
#include "toolsmodel.h"
|
||||
#include "winproc.h"
|
||||
#include "dialogs.h"
|
||||
#include "common.h"
|
||||
|
||||
#endif /* _MSPAINT_H */
|
||||
|
|
|
@ -25,13 +25,18 @@ static DWORD ReadDWORD(CRegKey &key, LPCTSTR lpName, DWORD &dwValue, BOOL bCheck
|
|||
return dwPrev;
|
||||
}
|
||||
|
||||
static void ReadFileHistory(CRegKey &key, LPCTSTR lpName, CString &strFile)
|
||||
static void ReadString(CRegKey &key, LPCTSTR lpName, CString &strValue, LPCTSTR lpDefault = TEXT(""))
|
||||
{
|
||||
CString strTemp;
|
||||
ULONG nChars = MAX_PATH;
|
||||
LPTSTR szFile = strFile.GetBuffer(nChars);
|
||||
if (key.QueryStringValue(lpName, szFile, &nChars) != ERROR_SUCCESS)
|
||||
szFile[0] = '\0';
|
||||
strFile.ReleaseBuffer();
|
||||
LPTSTR psz = strTemp.GetBuffer(nChars);
|
||||
LONG error = key.QueryStringValue(lpName, psz, &nChars);
|
||||
strTemp.ReleaseBuffer();
|
||||
|
||||
if (error == ERROR_SUCCESS)
|
||||
strValue = strTemp;
|
||||
else
|
||||
strValue = lpDefault;
|
||||
}
|
||||
|
||||
void RegistrySettings::SetWallpaper(LPCTSTR szFileName, RegistrySettings::WallpaperStyle style)
|
||||
|
@ -61,15 +66,20 @@ void RegistrySettings::LoadPresets()
|
|||
ThumbXPos = 180;
|
||||
ThumbYPos = 200;
|
||||
UnitSetting = 0;
|
||||
const WINDOWPLACEMENT DefaultWindowPlacement = {
|
||||
sizeof(WINDOWPLACEMENT),
|
||||
0,
|
||||
SW_SHOWNORMAL,
|
||||
{0, 0},
|
||||
{-1, -1},
|
||||
{100, 100, 700, 550}
|
||||
};
|
||||
WindowPlacement = DefaultWindowPlacement;
|
||||
Bold = FALSE;
|
||||
Italic = FALSE;
|
||||
Underline = FALSE;
|
||||
CharSet = DEFAULT_CHARSET;
|
||||
PointSize = 14;
|
||||
FontsPositionX = 0;
|
||||
FontsPositionY = 0;
|
||||
ShowTextTool = TRUE;
|
||||
|
||||
LOGFONT lf;
|
||||
GetObject(GetStockObject(DEFAULT_GUI_FONT), sizeof(lf), &lf);
|
||||
strFontName = lf.lfFaceName;
|
||||
|
||||
ZeroMemory(&WindowPlacement, sizeof(WindowPlacement));
|
||||
}
|
||||
|
||||
void RegistrySettings::Load()
|
||||
|
@ -98,10 +108,24 @@ void RegistrySettings::Load()
|
|||
CRegKey files;
|
||||
if (files.Open(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Paint\\Recent File List"), KEY_READ) == ERROR_SUCCESS)
|
||||
{
|
||||
ReadFileHistory(files, _T("File1"), strFile1);
|
||||
ReadFileHistory(files, _T("File2"), strFile2);
|
||||
ReadFileHistory(files, _T("File3"), strFile3);
|
||||
ReadFileHistory(files, _T("File4"), strFile4);
|
||||
ReadString(files, _T("File1"), strFile1);
|
||||
ReadString(files, _T("File2"), strFile2);
|
||||
ReadString(files, _T("File3"), strFile3);
|
||||
ReadString(files, _T("File4"), strFile4);
|
||||
}
|
||||
|
||||
CRegKey text;
|
||||
if (text.Open(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Paint\\Text"), KEY_READ) == ERROR_SUCCESS)
|
||||
{
|
||||
ReadDWORD(text, _T("Bold"), Bold, FALSE);
|
||||
ReadDWORD(text, _T("Italic"), Italic, FALSE);
|
||||
ReadDWORD(text, _T("Underline"), Underline, FALSE);
|
||||
ReadDWORD(text, _T("CharSet"), CharSet, FALSE);
|
||||
ReadDWORD(text, _T("PointSize"), PointSize, FALSE);
|
||||
ReadDWORD(text, _T("PositionX"), FontsPositionX, FALSE);
|
||||
ReadDWORD(text, _T("PositionY"), FontsPositionY, FALSE);
|
||||
ReadDWORD(text, _T("ShowTextTool"), ShowTextTool, FALSE);
|
||||
ReadString(text, _T("TypeFaceName"), strFontName, strFontName);
|
||||
}
|
||||
|
||||
// Fix the bitmap size if too large
|
||||
|
@ -144,6 +168,20 @@ void RegistrySettings::Store()
|
|||
if (!strFile4.IsEmpty())
|
||||
files.SetStringValue(_T("File4"), strFile4);
|
||||
}
|
||||
|
||||
CRegKey text;
|
||||
if (text.Create(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Paint\\Text")) == ERROR_SUCCESS)
|
||||
{
|
||||
text.SetDWORDValue(_T("Bold"), Bold);
|
||||
text.SetDWORDValue(_T("Italic"), Italic);
|
||||
text.SetDWORDValue(_T("Underline"), Underline);
|
||||
text.SetDWORDValue(_T("CharSet"), CharSet);
|
||||
text.SetDWORDValue(_T("PointSize"), PointSize);
|
||||
text.SetDWORDValue(_T("PositionX"), FontsPositionX);
|
||||
text.SetDWORDValue(_T("PositionY"), FontsPositionY);
|
||||
text.SetDWORDValue(_T("ShowTextTool"), ShowTextTool);
|
||||
text.SetStringValue(_T("TypeFaceName"), strFontName);
|
||||
}
|
||||
}
|
||||
|
||||
void RegistrySettings::SetMostRecentFile(LPCTSTR szPathName)
|
||||
|
|
|
@ -32,6 +32,16 @@ public:
|
|||
CString strFile3;
|
||||
CString strFile4;
|
||||
|
||||
CString strFontName;
|
||||
DWORD PointSize;
|
||||
DWORD Bold;
|
||||
DWORD Italic;
|
||||
DWORD Underline;
|
||||
DWORD CharSet;
|
||||
DWORD FontsPositionX;
|
||||
DWORD FontsPositionY;
|
||||
DWORD ShowTextTool;
|
||||
|
||||
enum WallpaperStyle {
|
||||
TILED,
|
||||
CENTERED,
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#define IDI_APPICON 500
|
||||
|
||||
#define IDB_TOOLBARICONS 510
|
||||
#define IDB_FONTSTOOLBAR 511
|
||||
|
||||
#define IDI_TRANSPARENT 526
|
||||
#define IDI_NONTRANSPARENT 527
|
||||
|
@ -96,6 +97,11 @@
|
|||
#define IDM_HELPHELPTOPICS 270
|
||||
#define IDM_HELPINFO 271
|
||||
|
||||
#define IDM_BOLD 280
|
||||
#define IDM_ITALIC 281
|
||||
#define IDM_UNDERLINE 282
|
||||
#define IDM_VERTICAL 283
|
||||
|
||||
/* the following 16 numbers need to be in order, increasing by 1 */
|
||||
#define ID_FREESEL 600
|
||||
#define ID_RECTSEL 601
|
||||
|
@ -165,6 +171,11 @@
|
|||
#define IDD_STRETCHSKEWEDITVSKEW 757
|
||||
#define IDD_STRETCHSKEWTEXTVDEG 758
|
||||
|
||||
#define IDD_FONTS 760
|
||||
#define IDD_FONTSNAMES 761
|
||||
#define IDD_FONTSSIZES 762
|
||||
#define IDD_FONTSTOOLBAR 764
|
||||
|
||||
#define IDS_PROGRAMNAME 900
|
||||
#define IDS_WINDOWTITLE 901
|
||||
#define IDS_INFOTITLE 902
|
||||
|
@ -202,3 +213,8 @@
|
|||
|
||||
#define IDS_LOADERRORTEXT 933
|
||||
#define IDS_ENLARGEPROMPTTEXT 934
|
||||
|
||||
#define IDS_BOLD 935
|
||||
#define IDS_ITALIC 936
|
||||
#define IDS_UNDERLINE 937
|
||||
#define IDS_VERTICAL 938
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include <windef.h>
|
||||
#include <winuser.h>
|
||||
#include <commctrl.h>
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
|
|
|
@ -347,3 +347,8 @@ void SelectionModel::NotifyRefreshNeeded()
|
|||
{
|
||||
selectionWindow.SendMessage(WM_SELECTIONMODELREFRESHNEEDED);
|
||||
}
|
||||
|
||||
void SelectionModel::GetRect(LPRECT prc) const
|
||||
{
|
||||
*prc = m_rcDest;
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ public:
|
|||
LONG GetDestRectHeight() const;
|
||||
LONG GetDestRectLeft() const;
|
||||
LONG GetDestRectTop() const;
|
||||
void GetRect(LPRECT prc) const;
|
||||
void DrawTextToolText(HDC hDCImage, COLORREF crFg, COLORREF crBg, BOOL bBgTransparent = FALSE);
|
||||
|
||||
private:
|
||||
|
|
|
@ -10,50 +10,502 @@
|
|||
|
||||
#include "precomp.h"
|
||||
|
||||
#define CXY_GRIP 3
|
||||
|
||||
/* FUNCTIONS ********************************************************/
|
||||
LRESULT CTextEditWindow::OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
|
||||
CTextEditWindow::CTextEditWindow() : m_hFont(NULL), m_hFontZoomed(NULL), m_nAppIsMovingOrSizing(0)
|
||||
{
|
||||
/* creating the edit control within the editor window */
|
||||
RECT editControlPos = {0, 0, 0 + 100, 0 + 100};
|
||||
editControl.Create(_T("EDIT"), m_hWnd, editControlPos, NULL,
|
||||
WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL | ES_MULTILINE | ES_NOHIDESEL | ES_AUTOHSCROLL | ES_AUTOVSCROLL,
|
||||
WS_EX_CLIENTEDGE);
|
||||
SetRectEmpty(&m_rc);
|
||||
}
|
||||
|
||||
#define X0 rc.left
|
||||
#define X1 ((rc.left + rc.right - CXY_GRIP) / 2)
|
||||
#define X2 (rc.right - CXY_GRIP)
|
||||
#define Y0 rc.top
|
||||
#define Y1 ((rc.top + rc.bottom - CXY_GRIP) / 2)
|
||||
#define Y2 (rc.bottom - CXY_GRIP)
|
||||
#define RECT0 X0, Y0, X0 + CXY_GRIP, Y0 + CXY_GRIP // Upper Left
|
||||
#define RECT1 X1, Y0, X1 + CXY_GRIP, Y0 + CXY_GRIP // Top
|
||||
#define RECT2 X2, Y0, X2 + CXY_GRIP, Y0 + CXY_GRIP // Upper Right
|
||||
#define RECT3 X0, Y1, X0 + CXY_GRIP, Y1 + CXY_GRIP // Left
|
||||
#define RECT4 X2, Y1, X2 + CXY_GRIP, Y1 + CXY_GRIP // Right
|
||||
#define RECT5 X0, Y2, X0 + CXY_GRIP, Y2 + CXY_GRIP // Lower Left
|
||||
#define RECT6 X1, Y2, X1 + CXY_GRIP, Y2 + CXY_GRIP // Bottom
|
||||
#define RECT7 X2, Y2, X2 + CXY_GRIP, Y2 + CXY_GRIP // Lower Right
|
||||
|
||||
INT CTextEditWindow::DoHitTest(RECT& rc, POINT pt)
|
||||
{
|
||||
RECT rcGrip;
|
||||
|
||||
SetRect(&rcGrip, RECT0);
|
||||
if (PtInRect(&rcGrip, pt))
|
||||
return HTTOPLEFT;
|
||||
SetRect(&rcGrip, RECT1);
|
||||
if (PtInRect(&rcGrip, pt))
|
||||
return HTTOP;
|
||||
SetRect(&rcGrip, RECT2);
|
||||
if (PtInRect(&rcGrip, pt))
|
||||
return HTTOPRIGHT;
|
||||
|
||||
SetRect(&rcGrip, RECT3);
|
||||
if (PtInRect(&rcGrip, pt))
|
||||
return HTLEFT;
|
||||
SetRect(&rcGrip, RECT4);
|
||||
if (PtInRect(&rcGrip, pt))
|
||||
return HTRIGHT;
|
||||
|
||||
SetRect(&rcGrip, RECT5);
|
||||
if (PtInRect(&rcGrip, pt))
|
||||
return HTBOTTOMLEFT;
|
||||
SetRect(&rcGrip, RECT6);
|
||||
if (PtInRect(&rcGrip, pt))
|
||||
return HTBOTTOM;
|
||||
SetRect(&rcGrip, RECT7);
|
||||
if (PtInRect(&rcGrip, pt))
|
||||
return HTBOTTOMRIGHT;
|
||||
|
||||
// On border line?
|
||||
RECT rcInner = rc;
|
||||
InflateRect(&rcInner, -3, -3);
|
||||
if (!PtInRect(&rcInner, pt) && PtInRect(&rc, pt))
|
||||
return HTCAPTION;
|
||||
|
||||
return HTCLIENT;
|
||||
}
|
||||
|
||||
void CTextEditWindow::DrawGrip(HDC hDC, RECT& rc)
|
||||
{
|
||||
HGDIOBJ hbrOld = SelectObject(hDC, GetStockObject(NULL_BRUSH));
|
||||
HPEN hPen = CreatePen(PS_DOT, 1, GetSysColor(COLOR_HIGHLIGHT));
|
||||
HGDIOBJ hPenOld = SelectObject(hDC, hPen);
|
||||
InflateRect(&rc, -1, -1);
|
||||
Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
|
||||
InflateRect(&rc, 1, 1);
|
||||
SelectObject(hDC, hPenOld);
|
||||
SelectObject(hDC, hbrOld);
|
||||
DeleteObject(hPen);
|
||||
|
||||
RECT rcGrip;
|
||||
HBRUSH hbrHighlight = GetSysColorBrush(COLOR_HIGHLIGHT);
|
||||
|
||||
SetRect(&rcGrip, RECT0);
|
||||
FillRect(hDC, &rcGrip, hbrHighlight);
|
||||
SetRect(&rcGrip, RECT1);
|
||||
FillRect(hDC, &rcGrip, hbrHighlight);
|
||||
SetRect(&rcGrip, RECT2);
|
||||
FillRect(hDC, &rcGrip, hbrHighlight);
|
||||
|
||||
SetRect(&rcGrip, RECT3);
|
||||
FillRect(hDC, &rcGrip, hbrHighlight);
|
||||
SetRect(&rcGrip, RECT4);
|
||||
FillRect(hDC, &rcGrip, hbrHighlight);
|
||||
|
||||
SetRect(&rcGrip, RECT5);
|
||||
FillRect(hDC, &rcGrip, hbrHighlight);
|
||||
SetRect(&rcGrip, RECT6);
|
||||
FillRect(hDC, &rcGrip, hbrHighlight);
|
||||
SetRect(&rcGrip, RECT7);
|
||||
FillRect(hDC, &rcGrip, hbrHighlight);
|
||||
}
|
||||
|
||||
void CTextEditWindow::FixEditPos(LPCTSTR pszOldText)
|
||||
{
|
||||
CString szText;
|
||||
GetWindowText(szText);
|
||||
|
||||
RECT rcParent;
|
||||
::GetWindowRect(m_hwndParent, &rcParent);
|
||||
|
||||
RECT rc, rcWnd, rcText;
|
||||
GetWindowRect(&rcWnd);
|
||||
rcText = rcWnd;
|
||||
|
||||
HDC hDC = GetDC();
|
||||
if (hDC)
|
||||
{
|
||||
SelectObject(hDC, m_hFontZoomed);
|
||||
TEXTMETRIC tm;
|
||||
GetTextMetrics(hDC, &tm);
|
||||
szText += TEXT("x"); // This is a trick to enable the last newlines
|
||||
const UINT uFormat = DT_LEFT | DT_TOP | DT_EDITCONTROL | DT_NOPREFIX | DT_NOCLIP |
|
||||
DT_EXPANDTABS | DT_WORDBREAK;
|
||||
DrawText(hDC, szText, -1, &rcText, uFormat | DT_CALCRECT);
|
||||
if (tm.tmDescent > 0)
|
||||
rcText.bottom += tm.tmDescent;
|
||||
ReleaseDC(hDC);
|
||||
}
|
||||
|
||||
UnionRect(&rc, &rcText, &rcWnd);
|
||||
::MapWindowPoints(NULL, m_hwndParent, (LPPOINT)&rc, 2);
|
||||
|
||||
rcWnd = rc;
|
||||
::GetClientRect(m_hwndParent, &rcParent);
|
||||
IntersectRect(&rc, &rcParent, &rcWnd);
|
||||
|
||||
++m_nAppIsMovingOrSizing;
|
||||
MoveWindow(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, FALSE);
|
||||
--m_nAppIsMovingOrSizing;
|
||||
|
||||
DefWindowProc(WM_HSCROLL, SB_LEFT, 0);
|
||||
DefWindowProc(WM_VSCROLL, SB_TOP, 0);
|
||||
|
||||
::InvalidateRect(m_hwndParent, &rc, TRUE);
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnChar(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
if (wParam == VK_TAB)
|
||||
return 0; // FIXME: Tabs
|
||||
|
||||
CString szText;
|
||||
GetWindowText(szText);
|
||||
|
||||
LRESULT ret = DefWindowProc(nMsg, wParam, lParam);
|
||||
FixEditPos(szText);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnKeyDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
if (wParam == VK_ESCAPE)
|
||||
{
|
||||
toolsModel.OnCancelDraw();
|
||||
return 0;
|
||||
}
|
||||
|
||||
CString szText;
|
||||
GetWindowText(szText);
|
||||
|
||||
LRESULT ret = DefWindowProc(nMsg, wParam, lParam);
|
||||
FixEditPos(szText);
|
||||
return ret;
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
LRESULT ret = DefWindowProc(nMsg, wParam, lParam);
|
||||
DefWindowProc(WM_HSCROLL, SB_LEFT, 0);
|
||||
DefWindowProc(WM_VSCROLL, SB_TOP, 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnEraseBkGnd(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
HDC hDC = (HDC)wParam;
|
||||
if (!toolsModel.IsBackgroundTransparent())
|
||||
{
|
||||
RECT rc;
|
||||
GetClientRect(&rc);
|
||||
HBRUSH hbr = CreateSolidBrush(paletteModel.GetBgColor());
|
||||
FillRect(hDC, &rc, hbr);
|
||||
DeleteObject(hbr);
|
||||
}
|
||||
SetTextColor(hDC, paletteModel.GetFgColor());
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
RECT rc;
|
||||
GetClientRect(&rc);
|
||||
|
||||
DefWindowProc(nMsg, wParam, lParam);
|
||||
|
||||
HDC hDC = GetDC();
|
||||
if (hDC)
|
||||
{
|
||||
DrawGrip(hDC, rc);
|
||||
ReleaseDC(hDC);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnNCPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
RECT rc;
|
||||
GetWindowRect(&rc);
|
||||
|
||||
HDC hDC = GetDCEx(NULL, DCX_WINDOW | DCX_PARENTCLIP);
|
||||
if (hDC)
|
||||
{
|
||||
OffsetRect(&rc, -rc.left, -rc.top);
|
||||
DrawGrip(hDC, rc);
|
||||
ReleaseDC(hDC);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnNCCalcSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
return 0; // No frame.
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnNCHitTest(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };
|
||||
RECT rc;
|
||||
GetWindowRect(&rc);
|
||||
return DoHitTest(rc, pt);
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
UINT nHitTest = LOWORD(lParam);
|
||||
if (nHitTest == HTCAPTION)
|
||||
{
|
||||
SetCursor(LoadCursor(NULL, IDC_SIZEALL));
|
||||
return FALSE;
|
||||
}
|
||||
return DefWindowProc(nMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
LRESULT ret = DefWindowProc(nMsg, wParam, lParam);
|
||||
|
||||
if (m_nAppIsMovingOrSizing == 0)
|
||||
{
|
||||
Reposition();
|
||||
InvalidateEditRect();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
RECT clientRect;
|
||||
GetClientRect(&clientRect);
|
||||
editControl.MoveWindow(clientRect.left, clientRect.top, RECT_WIDTH(clientRect), RECT_HEIGHT(clientRect), TRUE);
|
||||
LRESULT ret = DefWindowProc(nMsg, wParam, lParam);
|
||||
|
||||
RECT rc;
|
||||
GetClientRect(&rc);
|
||||
SendMessage(EM_SETRECTNP, 0, (LPARAM)&rc);
|
||||
SendMessage(EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(0, 0));
|
||||
|
||||
if (m_nAppIsMovingOrSizing == 0)
|
||||
{
|
||||
Reposition();
|
||||
InvalidateEditRect();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Hack: Use DECLARE_WND_SUPERCLASS instead!
|
||||
HWND CTextEditWindow::Create(HWND hwndParent)
|
||||
{
|
||||
m_hwndParent = hwndParent;
|
||||
|
||||
const DWORD style = ES_LEFT | ES_MULTILINE | ES_WANTRETURN | ES_AUTOVSCROLL |
|
||||
WS_CHILD | WS_THICKFRAME;
|
||||
m_hWnd = ::CreateWindowEx(0, WC_EDIT, NULL, style, 0, 0, 0, 0,
|
||||
hwndParent, NULL, hProgInstance, NULL);
|
||||
if (m_hWnd)
|
||||
{
|
||||
#undef SubclassWindow // Don't use this macro
|
||||
SubclassWindow(m_hWnd);
|
||||
|
||||
UpdateFont();
|
||||
|
||||
PostMessage(WM_SIZE, 0, 0);
|
||||
}
|
||||
|
||||
return m_hWnd;
|
||||
}
|
||||
|
||||
void CTextEditWindow::DoFillBack(HWND hwnd, HDC hDC)
|
||||
{
|
||||
if (toolsModel.IsBackgroundTransparent())
|
||||
return;
|
||||
|
||||
RECT rc;
|
||||
SendMessage(EM_GETRECT, 0, (LPARAM)&rc);
|
||||
MapWindowPoints(hwnd, (LPPOINT)&rc, 2);
|
||||
|
||||
HBRUSH hbr = CreateSolidBrush(paletteModel.GetBgColor());
|
||||
FillRect(hDC, &rc, hbr);
|
||||
DeleteObject(hbr);
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
UpdateFont();
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
ShowWindow(SW_HIDE);
|
||||
if (m_hFont)
|
||||
{
|
||||
DeleteObject(m_hFont);
|
||||
m_hFont = NULL;
|
||||
}
|
||||
if (m_hFontZoomed)
|
||||
{
|
||||
DeleteObject(m_hFontZoomed);
|
||||
m_hFontZoomed = NULL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
void CTextEditWindow::InvalidateEditRect()
|
||||
{
|
||||
switch(HIWORD(wParam))
|
||||
{
|
||||
case EN_UPDATE:
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, textToolText);
|
||||
textToolTextMaxLen = editControl.GetWindowTextLength() + 1;
|
||||
textToolText = (LPTSTR) HeapAlloc(GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS, sizeof(TCHAR) * textToolTextMaxLen);
|
||||
editControl.GetWindowText(textToolText, textToolTextMaxLen);
|
||||
ForceRefreshSelectionContents();
|
||||
break;
|
||||
RECT rc;
|
||||
GetWindowRect(&rc);
|
||||
::MapWindowPoints(NULL, m_hwndParent, (LPPOINT)&rc, 2);
|
||||
::InvalidateRect(m_hwndParent, &rc, TRUE);
|
||||
|
||||
GetClientRect(&rc);
|
||||
MapWindowPoints(imageArea, (LPPOINT)&rc, 2);
|
||||
rc.left = UnZoomed(rc.left);
|
||||
rc.top = UnZoomed(rc.top);
|
||||
rc.right = UnZoomed(rc.right);
|
||||
rc.bottom = UnZoomed(rc.bottom);
|
||||
m_rc = rc;
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnPaletteModelColorChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
UpdateFont();
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnToolsModelSettingsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
UpdateFont();
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnToolsModelZoomChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
UpdateFont();
|
||||
ValidateEditRect(NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
ShowWindow((wParam == TOOL_TEXT) ? SW_SHOW : SW_HIDE);
|
||||
if (wParam == TOOL_TEXT)
|
||||
{
|
||||
UpdateFont();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowWindow(SW_HIDE);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CTextEditWindow::UpdateFont()
|
||||
{
|
||||
if (m_hFont)
|
||||
{
|
||||
DeleteObject(m_hFont);
|
||||
m_hFont = NULL;
|
||||
}
|
||||
if (m_hFontZoomed)
|
||||
{
|
||||
DeleteObject(m_hFontZoomed);
|
||||
m_hFontZoomed = NULL;
|
||||
}
|
||||
|
||||
LOGFONT lf;
|
||||
ZeroMemory(&lf, sizeof(lf));
|
||||
lf.lfCharSet = DEFAULT_CHARSET; // registrySettings.CharSet; // Ignore
|
||||
lf.lfWeight = (registrySettings.Bold ? FW_BOLD : FW_NORMAL);
|
||||
lf.lfItalic = registrySettings.Italic;
|
||||
lf.lfUnderline = registrySettings.Underline;
|
||||
lstrcpyn(lf.lfFaceName, registrySettings.strFontName, _countof(lf.lfFaceName));
|
||||
|
||||
HDC hdc = GetDC();
|
||||
if (hdc)
|
||||
{
|
||||
INT nFontSize = registrySettings.PointSize;
|
||||
lf.lfHeight = -MulDiv(nFontSize, GetDeviceCaps(hdc, LOGPIXELSY), 72);
|
||||
ReleaseDC(hdc);
|
||||
}
|
||||
|
||||
m_hFont = ::CreateFontIndirect(&lf);
|
||||
|
||||
lf.lfHeight = Zoomed(lf.lfHeight);
|
||||
m_hFontZoomed = ::CreateFontIndirect(&lf);
|
||||
|
||||
SetWindowFont(m_hWnd, m_hFontZoomed, TRUE);
|
||||
DefWindowProc(EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(0, 0));
|
||||
|
||||
FixEditPos(NULL);
|
||||
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnSetSel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
LRESULT ret = DefWindowProc(nMsg, wParam, lParam);
|
||||
DefWindowProc(WM_HSCROLL, SB_LEFT, 0);
|
||||
DefWindowProc(WM_VSCROLL, SB_TOP, 0);
|
||||
InvalidateEditRect();
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL CTextEditWindow::GetEditRect(LPRECT prc) const
|
||||
{
|
||||
*prc = m_rc;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CTextEditWindow::ValidateEditRect(LPCRECT prc OPTIONAL)
|
||||
{
|
||||
if (prc)
|
||||
m_rc = *prc;
|
||||
INT x0 = Zoomed(m_rc.left), y0 = Zoomed(m_rc.top);
|
||||
INT x1 = Zoomed(m_rc.right), y1 = Zoomed(m_rc.bottom);
|
||||
|
||||
++m_nAppIsMovingOrSizing;
|
||||
MoveWindow(x0, y0, x1 - x0, y1 - y0, TRUE);
|
||||
--m_nAppIsMovingOrSizing;
|
||||
}
|
||||
|
||||
void CTextEditWindow::Reposition()
|
||||
{
|
||||
RECT rc, rcImage;
|
||||
GetWindowRect(&rc);
|
||||
|
||||
::MapWindowPoints(NULL, imageArea, (LPPOINT)&rc, 2);
|
||||
imageArea.GetClientRect(&rcImage);
|
||||
|
||||
if (rc.bottom > rcImage.bottom)
|
||||
{
|
||||
rc.top = rcImage.bottom - (rc.bottom - rc.top);
|
||||
rc.bottom = rcImage.bottom;
|
||||
}
|
||||
|
||||
if (rc.right > rcImage.right)
|
||||
{
|
||||
rc.left = rcImage.right - (rc.right - rc.left);
|
||||
rc.right = rcImage.right;
|
||||
}
|
||||
|
||||
if (rc.left < 0)
|
||||
{
|
||||
rc.right += -rc.left;
|
||||
rc.left = 0;
|
||||
}
|
||||
|
||||
if (rc.top < 0)
|
||||
{
|
||||
rc.bottom += -rc.top;
|
||||
rc.top = 0;
|
||||
}
|
||||
|
||||
++m_nAppIsMovingOrSizing;
|
||||
MoveWindow(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE);
|
||||
--m_nAppIsMovingOrSizing;
|
||||
}
|
||||
|
||||
LRESULT CTextEditWindow::OnMouseWheel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
return ::SendMessage(GetParent(), nMsg, wParam, lParam);
|
||||
}
|
||||
|
|
|
@ -8,24 +8,73 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define CX_MINTEXTEDIT 100
|
||||
#define CY_MINTEXTEDIT 24
|
||||
|
||||
class CTextEditWindow : public CWindowImpl<CTextEditWindow>
|
||||
{
|
||||
public:
|
||||
DECLARE_WND_CLASS_EX(_T("TextEdit"), CS_DBLCLKS, COLOR_BTNFACE)
|
||||
CTextEditWindow();
|
||||
|
||||
HWND Create(HWND hwndParent);
|
||||
void DoFillBack(HWND hwnd, HDC hDC);
|
||||
void FixEditPos(LPCTSTR pszOldText);
|
||||
void InvalidateEditRect();
|
||||
void UpdateFont();
|
||||
BOOL GetEditRect(LPRECT prc) const;
|
||||
void ValidateEditRect(LPCRECT prc OPTIONAL);
|
||||
HFONT GetFont() const { return m_hFont; }
|
||||
|
||||
BEGIN_MSG_MAP(CTextEditWindow)
|
||||
MESSAGE_HANDLER(WM_CREATE, OnCreate)
|
||||
MESSAGE_HANDLER(WM_SIZE, OnSize)
|
||||
MESSAGE_HANDLER(WM_CLOSE, OnClose)
|
||||
MESSAGE_HANDLER(WM_COMMAND, OnCommand)
|
||||
MESSAGE_HANDLER(WM_TOOLSMODELTOOLCHANGED, OnToolsModelToolChanged)
|
||||
MESSAGE_HANDLER(WM_TOOLSMODELSETTINGSCHANGED, OnToolsModelSettingsChanged)
|
||||
MESSAGE_HANDLER(WM_TOOLSMODELZOOMCHANGED, OnToolsModelZoomChanged)
|
||||
MESSAGE_HANDLER(WM_PALETTEMODELCOLORCHANGED, OnPaletteModelColorChanged)
|
||||
MESSAGE_HANDLER(WM_CHAR, OnChar)
|
||||
MESSAGE_HANDLER(WM_KEYDOWN, OnKeyDown)
|
||||
MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBkGnd)
|
||||
MESSAGE_HANDLER(WM_PAINT, OnPaint)
|
||||
MESSAGE_HANDLER(WM_NCPAINT, OnNCPaint)
|
||||
MESSAGE_HANDLER(WM_NCCALCSIZE, OnNCCalcSize);
|
||||
MESSAGE_HANDLER(WM_NCHITTEST, OnNCHitTest);
|
||||
MESSAGE_HANDLER(WM_SETCURSOR, OnSetCursor);
|
||||
MESSAGE_HANDLER(WM_MOVE, OnMove);
|
||||
MESSAGE_HANDLER(WM_SIZE, OnSize);
|
||||
MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown);
|
||||
MESSAGE_HANDLER(EM_SETSEL, OnSetSel);
|
||||
MESSAGE_HANDLER(WM_MOUSEWHEEL, OnMouseWheel);
|
||||
END_MSG_MAP()
|
||||
|
||||
CWindow editControl;
|
||||
|
||||
LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnToolsModelSettingsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnToolsModelZoomChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnPaletteModelColorChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnChar(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnKeyDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnEraseBkGnd(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnNCPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnNCCalcSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnNCHitTest(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnSetSel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnMouseWheel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
|
||||
protected:
|
||||
HWND m_hwndParent;
|
||||
HFONT m_hFont;
|
||||
HFONT m_hFontZoomed;
|
||||
LONG m_nAppIsMovingOrSizing;
|
||||
RECT m_rc;
|
||||
|
||||
INT DoHitTest(RECT& rc, POINT pt);
|
||||
void DrawGrip(HDC hDC, RECT& rc);
|
||||
void Reposition();
|
||||
};
|
||||
|
|
|
@ -92,8 +92,17 @@ void ToolsModel::SetActiveTool(TOOLTYPE nActiveTool)
|
|||
case TOOL_RUBBER:
|
||||
case TOOL_COLOR:
|
||||
case TOOL_ZOOM:
|
||||
case TOOL_TEXT:
|
||||
break;
|
||||
|
||||
case TOOL_TEXT:
|
||||
if (nActiveTool != TOOL_TEXT)
|
||||
{
|
||||
// Finish the text
|
||||
OnButtonDown(TRUE, -1, -1, TRUE);
|
||||
OnButtonUp(TRUE, -1, -1);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
m_oldActiveTool = m_activeTool;
|
||||
break;
|
||||
|
@ -152,6 +161,10 @@ void ToolsModel::NotifyToolChanged()
|
|||
{
|
||||
toolBoxContainer.SendMessage(WM_TOOLSMODELTOOLCHANGED, m_activeTool);
|
||||
toolSettingsWindow.SendMessage(WM_TOOLSMODELTOOLCHANGED, m_activeTool);
|
||||
|
||||
if (fontsDialog.IsWindow())
|
||||
fontsDialog.SendMessage(WM_TOOLSMODELTOOLCHANGED, m_activeTool);
|
||||
|
||||
textEditWindow.SendMessage(WM_TOOLSMODELTOOLCHANGED, m_activeTool);
|
||||
}
|
||||
|
||||
|
@ -159,11 +172,15 @@ void ToolsModel::NotifyToolSettingsChanged()
|
|||
{
|
||||
toolSettingsWindow.SendMessage(WM_TOOLSMODELSETTINGSCHANGED);
|
||||
selectionWindow.SendMessage(WM_TOOLSMODELSETTINGSCHANGED);
|
||||
if (textEditWindow.IsWindow())
|
||||
textEditWindow.SendMessage(WM_TOOLSMODELSETTINGSCHANGED);
|
||||
}
|
||||
|
||||
void ToolsModel::NotifyZoomChanged()
|
||||
{
|
||||
toolSettingsWindow.SendMessage(WM_TOOLSMODELZOOMCHANGED);
|
||||
if (textEditWindow.IsWindow())
|
||||
textEditWindow.SendMessage(WM_TOOLSMODELZOOMCHANGED);
|
||||
}
|
||||
|
||||
void ToolsModel::OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick)
|
||||
|
|
|
@ -85,10 +85,6 @@ private:
|
|||
|
||||
ToolBase *GetOrCreateTool(TOOLTYPE nTool);
|
||||
|
||||
void NotifyToolChanged();
|
||||
void NotifyToolSettingsChanged();
|
||||
void NotifyZoomChanged();
|
||||
|
||||
public:
|
||||
ToolsModel();
|
||||
~ToolsModel();
|
||||
|
@ -117,4 +113,8 @@ public:
|
|||
|
||||
void resetTool();
|
||||
void selectAll();
|
||||
|
||||
void NotifyToolChanged();
|
||||
void NotifyToolSettingsChanged();
|
||||
void NotifyZoomChanged();
|
||||
};
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include "precomp.h"
|
||||
|
||||
#include "dialogs.h"
|
||||
|
||||
/* FUNCTIONS ********************************************************/
|
||||
|
||||
BOOL
|
||||
|
@ -326,7 +324,7 @@ LRESULT CMainWindow::OnInitMenuPopup(UINT nMsg, WPARAM wParam, LPARAM lParam, BO
|
|||
CheckMenuItem(menu, IDM_VIEWTOOLBOX, CHECKED_IF(toolBoxContainer.IsWindowVisible()));
|
||||
CheckMenuItem(menu, IDM_VIEWCOLORPALETTE, CHECKED_IF(paletteWindow.IsWindowVisible()));
|
||||
CheckMenuItem(menu, IDM_VIEWSTATUSBAR, CHECKED_IF(::IsWindowVisible(hStatusBar)));
|
||||
CheckMenuItem(menu, IDM_FORMATICONBAR, CHECKED_IF(textEditWindow.IsWindowVisible()));
|
||||
CheckMenuItem(menu, IDM_FORMATICONBAR, CHECKED_IF(fontsDialog.IsWindowVisible()));
|
||||
EnableMenuItem(menu, IDM_FORMATICONBAR, ENABLED_IF(toolsModel.GetActiveTool() == TOOL_TEXT));
|
||||
|
||||
CheckMenuItem(menu, IDM_VIEWSHOWGRID, CHECKED_IF(showGrid));
|
||||
|
@ -522,10 +520,14 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
|
|||
break;
|
||||
}
|
||||
case IDM_EDITUNDO:
|
||||
if (toolsModel.GetActiveTool() == TOOL_TEXT && textEditWindow.IsWindowVisible())
|
||||
break;
|
||||
imageModel.Undo();
|
||||
imageArea.Invalidate(FALSE);
|
||||
break;
|
||||
case IDM_EDITREDO:
|
||||
if (toolsModel.GetActiveTool() == TOOL_TEXT && textEditWindow.IsWindowVisible())
|
||||
break;
|
||||
imageModel.Redo();
|
||||
imageArea.Invalidate(FALSE);
|
||||
break;
|
||||
|
@ -557,6 +559,11 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
|
|||
}
|
||||
case IDM_EDITSELECTALL:
|
||||
{
|
||||
if (toolsModel.GetActiveTool() == TOOL_TEXT && textEditWindow.IsWindowVisible())
|
||||
{
|
||||
textEditWindow.SendMessage(EM_SETSEL, 0, -1);
|
||||
break;
|
||||
}
|
||||
HWND hToolbar = FindWindowEx(toolBoxContainer.m_hWnd, NULL, TOOLBARCLASSNAME, NULL);
|
||||
SendMessage(hToolbar, TB_CHECKBUTTON, ID_RECTSEL, MAKELPARAM(TRUE, 0));
|
||||
toolsModel.selectAll();
|
||||
|
@ -662,7 +669,16 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
|
|||
alignChildrenToMainWindow();
|
||||
break;
|
||||
case IDM_FORMATICONBAR:
|
||||
textEditWindow.ShowWindow(textEditWindow.IsWindowVisible() ? SW_HIDE : SW_SHOW);
|
||||
if (toolsModel.GetActiveTool() == TOOL_TEXT)
|
||||
{
|
||||
if (!fontsDialog.IsWindow())
|
||||
{
|
||||
fontsDialog.Create(mainWindow);
|
||||
}
|
||||
registrySettings.ShowTextTool = !fontsDialog.IsWindowVisible();
|
||||
fontsDialog.ShowWindow(registrySettings.ShowTextTool ? SW_SHOW : SW_HIDE);
|
||||
fontsDialog.SendMessage(DM_REPOSITION, 0, 0);
|
||||
}
|
||||
break;
|
||||
case IDM_VIEWSHOWGRID:
|
||||
showGrid = !showGrid;
|
||||
|
|
Loading…
Reference in a new issue