Click here to Skip to main content
15,903,385 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCLARM /QRxscale in Embedded Visual c++ 4.0 Pin
Alek26-Sep-02 0:52
Alek26-Sep-02 0:52 
GeneralRe: CLARM /QRxscale in Embedded Visual c++ 4.0 Pin
Daniel Strigl26-Sep-02 1:03
Daniel Strigl26-Sep-02 1:03 
GeneralRe: CLARM /QRxscale in Embedded Visual c++ 4.0 Pin
Alek26-Sep-02 15:33
Alek26-Sep-02 15:33 
GeneralRe: CLARM /QRxscale in Embedded Visual c++ 4.0 Pin
Daniel Strigl29-Sep-02 20:05
Daniel Strigl29-Sep-02 20:05 
GeneralAsk about random number Pin
ooosawaddee326-Sep-02 0:51
ooosawaddee326-Sep-02 0:51 
GeneralRe: Ask about random number Pin
Tomasz Sowinski26-Sep-02 1:03
Tomasz Sowinski26-Sep-02 1:03 
GeneralRe: Ask about random number Pin
jmkhael26-Sep-02 1:37
jmkhael26-Sep-02 1:37 
Generaldraw text with text size problem Pin
chen26-Sep-02 0:46
chen26-Sep-02 0:46 
Hi,

I trying to draw a text on a button. I have code:

-------------------------------------------------------
CRect re = di->rcItem;
CBitmap cbm, *obm;
CDC cdc, mdc;
CFont *cf;

cdc.Attach(di->hDC);
mdc.CreateCompatibleDC(&cdc);
cbm.CreateCompatibleBitmap(&cdc, re.Width(), re.Height());
obm = mdc.SelectObject(&cbm);
mdc.FillSolidRect(re, GetSysColor(COLOR_BTNFACE));
mdc.SetBkMode(TRANSPARENT);
mdc.SetTextColor(m_textcol);
//mdc.SetBkColor(m_bkcol);
cf = mdc.SelectObject(&m_font8);
mdc.DrawText(m_strregion2, re, DT_CENTER | DT_SINGLELINE | DT_VCENTER);
cdc.BitBlt(re.left, re.top, re.Width(), re.Height(), &mdc, 0, 0, SRCCOPY);
mdc.SelectObject(obm);
cdc.Detach();
--------------------------------------------------

It works fine. But my problem is how to adjust the size of the text based on the above code?

Thanks in advance!



chen
GeneralRe: draw text with text size problem Pin
Roman Fadeyev26-Sep-02 0:54
Roman Fadeyev26-Sep-02 0:54 
GeneralPossibly weird question Pin
Venet26-Sep-02 0:39
Venet26-Sep-02 0:39 
GeneralRe: Possibly wierd question Pin
Tomasz Sowinski26-Sep-02 0:51
Tomasz Sowinski26-Sep-02 0:51 
GeneralRe: Possibly wierd question Pin
Venet26-Sep-02 1:01
Venet26-Sep-02 1:01 
GeneralRe: Possibly wierd question Pin
Tomasz Sowinski26-Sep-02 1:11
Tomasz Sowinski26-Sep-02 1:11 
GeneralRe: Possibly wierd question Pin
Tomasz Sowinski26-Sep-02 1:25
Tomasz Sowinski26-Sep-02 1:25 
GeneralRe: Possibly wierd question Pin
Venet26-Sep-02 1:25
Venet26-Sep-02 1:25 
GeneralRe: Possibly wierd question Pin
Jon Hulatt26-Sep-02 2:33
Jon Hulatt26-Sep-02 2:33 
GeneralRe: Possibly wierd question Pin
Tomasz Sowinski26-Sep-02 2:41
Tomasz Sowinski26-Sep-02 2:41 
GeneralGraphs Pin
Kash26-Sep-02 0:37
Kash26-Sep-02 0:37 
GeneralRe: Graphs Pin
Stephane Rodriguez.26-Sep-02 1:30
Stephane Rodriguez.26-Sep-02 1:30 
GeneralRe: Graphs Pin
Kash26-Sep-02 2:15
Kash26-Sep-02 2:15 
GeneralFunny behaviour by operator new Pin
Haakon S.26-Sep-02 0:28
Haakon S.26-Sep-02 0:28 
GeneralRe: Funny behaviour by operator new Pin
Tomasz Sowinski26-Sep-02 0:43
Tomasz Sowinski26-Sep-02 0:43 
GeneralRe: Funny behaviour by operator new Pin
Roman Fadeyev26-Sep-02 1:05
Roman Fadeyev26-Sep-02 1:05 
GeneralRe: Funny behaviour by operator new Pin
Haakon S.26-Sep-02 1:17
Haakon S.26-Sep-02 1:17 
GeneralRe: Funny behaviour by operator new Pin
Roman Fadeyev26-Sep-02 1:47
Roman Fadeyev26-Sep-02 1:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.