mirror of
https://github.com/reactos/reactos.git
synced 2025-05-08 19:27:00 +00:00
load the header text from the resources
svn path=/trunk/; revision=30435
This commit is contained in:
parent
0e2f934d30
commit
b0cd70a978
6 changed files with 92 additions and 21 deletions
|
@ -53,6 +53,7 @@ DoOpenFile(PINFO pInfo)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static VOID
|
||||
DoSaveAs(PINFO pInfo)
|
||||
{
|
||||
|
@ -932,6 +933,8 @@ OnMainCreate(HWND hwnd,
|
|||
GWLP_USERDATA,
|
||||
(LONG_PTR)pInfo);
|
||||
|
||||
pInfo->hSelf = hwnd;
|
||||
|
||||
/* add main settings pointer */
|
||||
pInfo->pRdpSettings = pRdpSettings;
|
||||
|
||||
|
@ -1090,16 +1093,79 @@ DlgProc(HWND hDlg,
|
|||
HDC hdcMem = CreateCompatibleDC(hdc);
|
||||
if (hdcMem)
|
||||
{
|
||||
WCHAR lpBuffer[32];
|
||||
RECT bmpRc, txtRc;
|
||||
LOGFONTW lf;
|
||||
HFONT hFont;
|
||||
|
||||
GetClientRect(pInfo->hSelf, &bmpRc);
|
||||
|
||||
SelectObject(hdcMem, pInfo->hHeader);
|
||||
BitBlt(hdc,
|
||||
0,
|
||||
0,
|
||||
pInfo->headerbitmap.bmWidth,
|
||||
pInfo->headerbitmap.bmHeight,
|
||||
hdcMem,
|
||||
0,
|
||||
0,
|
||||
SRCCOPY);
|
||||
StretchBlt(hdc,
|
||||
0,
|
||||
0,
|
||||
bmpRc.right,
|
||||
pInfo->headerbitmap.bmHeight,
|
||||
hdcMem,
|
||||
0,
|
||||
0,
|
||||
pInfo->headerbitmap.bmWidth,
|
||||
pInfo->headerbitmap.bmHeight,
|
||||
SRCCOPY);
|
||||
|
||||
txtRc.left = bmpRc.right * 0.25;
|
||||
txtRc.top = 10;
|
||||
txtRc.right = bmpRc.right * 0.75;
|
||||
txtRc.bottom = pInfo->headerbitmap.bmHeight * 0.5;
|
||||
|
||||
ZeroMemory(&lf, sizeof(LOGFONT));
|
||||
|
||||
if (LoadStringW(hInst, IDS_HEADERTEXT1, lpBuffer, 32))
|
||||
{
|
||||
lf.lfHeight = 24;
|
||||
lf.lfCharSet = OEM_CHARSET;
|
||||
lf.lfQuality = DEFAULT_QUALITY;
|
||||
lf.lfWeight = FW_MEDIUM;
|
||||
wcscpy(lf.lfFaceName, L"Tahoma");
|
||||
|
||||
hFont = CreateFontIndirectW(&lf);
|
||||
if (hFont)
|
||||
{
|
||||
SelectObject(hdc, hFont);
|
||||
|
||||
DPtoLP(hdc, (PPOINT)&txtRc, 2);
|
||||
SetTextColor(hdc, RGB(255,255,255));
|
||||
SetBkMode(hdc, TRANSPARENT);
|
||||
DrawTextW(hdc, lpBuffer, -1, &txtRc, DT_BOTTOM | DT_SINGLELINE);
|
||||
DeleteObject(hFont);
|
||||
}
|
||||
}
|
||||
|
||||
txtRc.left = bmpRc.right * 0.25;
|
||||
txtRc.top = txtRc.bottom - 5;
|
||||
txtRc.right = bmpRc.right * 0.75;
|
||||
txtRc.bottom = pInfo->headerbitmap.bmHeight * 0.9;
|
||||
|
||||
if (LoadStringW(hInst, IDS_HEADERTEXT2, lpBuffer, 32))
|
||||
{
|
||||
lf.lfHeight = 30;
|
||||
lf.lfCharSet = OEM_CHARSET;
|
||||
lf.lfQuality = DEFAULT_QUALITY;
|
||||
lf.lfWeight = FW_EXTRABOLD;
|
||||
wcscpy(lf.lfFaceName, L"Tahoma");
|
||||
|
||||
hFont = CreateFontIndirectW(&lf);
|
||||
if (hFont)
|
||||
{
|
||||
SelectObject(hdc, hFont);
|
||||
|
||||
DPtoLP(hdc, (PPOINT)&txtRc, 2);
|
||||
SetTextColor(hdc, RGB(255,255,255));
|
||||
SetBkMode(hdc, TRANSPARENT);
|
||||
DrawTextW(hdc, lpBuffer, -1, &txtRc, DT_TOP | DT_SINGLELINE);
|
||||
}
|
||||
}
|
||||
|
||||
DeleteDC(hdcMem);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,14 +38,14 @@ BEGIN
|
|||
LTEXT "", IDC_SETTINGS_RESOLUTION_TEXT, 56, 62, 120, 10, SS_CENTER
|
||||
END
|
||||
|
||||
IDD_CONNECTDIALOG DIALOGEX 0, 0, 260, 267
|
||||
IDD_CONNECTDIALOG DIALOGEX 0, 0, 260, 262
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Remote Desktop Connection"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Connect",IDOK,147,249,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,203,249,50,14
|
||||
CONTROL "",IDC_TAB,"SysTabControl32",0x0,7,54,246,190
|
||||
DEFPUSHBUTTON "Connect",IDOK,147,245,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,203,245,50,14
|
||||
CONTROL "",IDC_TAB,"SysTabControl32",0x0,7,50,246,190
|
||||
END
|
||||
|
||||
|
||||
|
@ -60,4 +60,6 @@ BEGIN
|
|||
IDS_PIXEL "%lux%lu Pixels"
|
||||
IDS_FULLSCREEN "Full Screen"
|
||||
IDS_BROWSESERVER "<Browse for more...>"
|
||||
IDS_HEADERTEXT1 "Remote Desktop"
|
||||
IDS_HEADERTEXT2 "Connection"
|
||||
END
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 80 KiB |
Binary file not shown.
|
@ -26,14 +26,17 @@
|
|||
#define IDB_HEADER 1100
|
||||
#define IDB_SPECT 1101
|
||||
|
||||
#define IDI_LOGON 2000
|
||||
#define IDI_CONN 2001
|
||||
#define IDI_REMOTE 2002
|
||||
#define IDI_COLORS 2003
|
||||
#define IDI_MSTSC 2004
|
||||
#define IDI_MSTSC 2000
|
||||
#define IDI_LOGON 2001
|
||||
#define IDI_CONN 2002
|
||||
#define IDI_REMOTE 2003
|
||||
#define IDI_COLORS 2004
|
||||
|
||||
|
||||
#define IDS_TAB_DISPLAY 3000
|
||||
#define IDS_TAB_GENERAL 3001
|
||||
#define IDS_PIXEL 3006
|
||||
#define IDS_FULLSCREEN 3007
|
||||
#define IDS_BROWSESERVER 3008
|
||||
#define IDS_HEADERTEXT1 3009
|
||||
#define IDS_HEADERTEXT2 3010
|
||||
|
|
|
@ -14,7 +14,7 @@ IDI_COLORS ICON "res/colors.ico"
|
|||
IDB_HEADER BITMAP "res/header.bmp"
|
||||
IDB_SPECT BITMAP "res/spectrum.bmp"
|
||||
|
||||
#include "lang/de-DE.rc"
|
||||
//#include "lang/de-DE.rc"
|
||||
#include "lang/en-US.rc"
|
||||
#include "lang/fr-FR.rc"
|
||||
#include "lang/ru-RU.rc"
|
||||
//#include "lang/fr-FR.rc"
|
||||
//#include "lang/ru-RU.rc"
|
||||
|
|
Loading…
Reference in a new issue