Change the bold effect when create a control.
-
In the VC++, when we create a control (such as button, static,...), the text on this control should be bold. what can we do to make it to normal???
-
In the VC++, when we create a control (such as button, static,...), the text on this control should be bold. what can we do to make it to normal???
I think you are working in Win32. Did you try SetFont(/*params*/)
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
I think you are working in Win32. Did you try SetFont(/*params*/)
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
X| X| X| Can you give me an example :)
modified on Monday, September 22, 2008 4:47 AM
-
In the VC++, when we create a control (such as button, static,...), the text on this control should be bold. what can we do to make it to normal???
If you are using win32 API, then - You can use CreateFont. Be sure the handle returned by CreateFont ( which you will use for the WM_SETFONT message ) is valid throughout the lifetime of the button window. If you want to make the font normal for all texts, then following may be helpful-
HFONT hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
SendMessage(hwnd, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0));It may be helpful, but not sure...... :-D
"We can't solve problems by using the same kind of thinking we used when we created them"
-
X| X| X| Can you give me an example :)
modified on Monday, September 22, 2008 4:47 AM
font.CreatePointFont (100,"Arial"); // TODO: Add your specialized creation code here RECT rect; rect.bottom = 100; rect.left = 0 ; rect.right =100; rect.top = 0; btn.Create ("MyButton",WS_CHILD|WS_VISIBLE,(const RECT &)rect,this,ID_BTN1); btn.SetFont(&font,false);
font and button are both member variables of the classSomethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
In the VC++, when we create a control (such as button, static,...), the text on this control should be bold. what can we do to make it to normal???
nguyenbinh07 wrote:
the text on this control should be bold.
What is it instead?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
-
In the VC++, when we create a control (such as button, static,...), the text on this control should be bold. what can we do to make it to normal???
nguyenbinh07 wrote:
should be
Should be? YOU are responsible for setting the font if you want something different :)
Mark Salsbery Microsoft MVP - Visual C++ :java: