CWnd::SetFont void SetFont( CFont* pFont, BOOL bRedraw = TRUE );ParameterspFontSpecifies the new font.bRedrawIf TRUE, redraw the CWnd object.ResSets the window’s current font to the specified font. If bRedraw is TRUE, the window will also be redrawn.CWnd Overview | Class Members | Hierarchy ChartSee Also CWnd::GetFont,WM_SETFONT
myButton1.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,
CRect(10,10,100,30), pParentWnd, 1);// Create a radio button.
myButton2.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_RADIOBUTTON,
CRect(10,40,100,70), pParentWnd, 2);// Create an auto 3-state button.
myButton3.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_AUTO3STATE,
CRect(10,70,100,100), pParentWnd, 3);// Create an auto check box.
myButton4.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,
CRect(10,100,100,130), pParentWnd, 4);
GetDlgItem()->SetWindowText()
void SetFont( CFont* pFont, BOOL bRedraw = TRUE );ParameterspFontSpecifies the new font.bRedrawIf TRUE, redraw the CWnd object.ResSets the window’s current font to the specified font. If bRedraw is TRUE, the window will also be redrawn.CWnd Overview | Class Members | Hierarchy ChartSee Also CWnd::GetFont,WM_SETFONT
还有点问题
我想使这个按钮有点特技效果
打算使它具有XP风格特征
在VCbase上下载了一个按钮类
但是针对这种动态生成的按钮却无法使用
不知是为何
跟踪了一下
好象没有调用类中的DrawItem函数
大家能再帮我看看吗这个类的下载地址是:http://www.vchelp.net/ASP/cdf_pic/200601/reply_1_1041454.rar