有什么办法可以改变向导型属性页按钮的文字?比如说把“下一步”改称“Go”?

TodayIKnow 2003-06-08 11:08:46
有什么办法可以改变向导型属性页按钮的文字?比如说把“下一步”改称“Go”?
...全文
89 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
GoogleGeek 2003-06-08
  • 打赏
  • 举报
回复
没有时间写测试程序!
你自己试试!

你用spy++,看看那个“下一步”按钮的ID是多少然后自己在程序中修改就行了
例如:

假设你发现的ID为:ID_YOUR_NEXTBUTTON

// A CPropertySheet has three wizard property pages: CStylePage,
// CColorPage, and CShapePage. The code fragment below shows how to
// enable and disable the Back and Next buttons on the wizard
// property page.

// CStylePage is the first wizard property page. Disable the Back
// button but enable the Next button.
BOOL CStylePage::OnSetActive()
{
CPropertySheet* psheet = (CPropertySheet*) GetParent();
psheet->SetWizardButtons(PSWIZB_NEXT);

CWnd *pWnd=psheet->GetDlgItem(ID_YOUR_NEXTBUTTON);
if(pWnd!=NULL)
pWnd->SetWindowText("Go");

return CPropertyPage::OnSetActive();
}

// CColorPage is the second wizard property page. Enable both the
// Back button and the Next button.
BOOL CColorPage::OnSetActive()
{
CPropertySheet* psheet = (CPropertySheet*) GetParent();
psheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT);
CWnd *pWnd=psheet->GetDlgItem(ID_YOUR_NEXTBUTTON);
if(pWnd!=NULL)
pWnd->SetWindowText("Go");
return CPropertyPage::OnSetActive();
}

// CShapePage is the third wizard property page. Enable the Back
// button and change the Next button to Finish. If dwFlags is equal
// to PSWIZB_BACK | PSWIZB_DISABLEDFINISH, then the Back
// button is enabled but the Next button is disabled.
BOOL CShapePage::OnSetActive()
{
CPropertySheet* psheet = (CPropertySheet*) GetParent();
psheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_FINISH);

return CPropertyPage::OnSetActive();
}
TodayIKnow 2003-06-08
  • 打赏
  • 举报
回复
THANKS!
GoogleGeek 2003-06-08
  • 打赏
  • 举报
回复
吃完了饭,测试了一下,发现那个next 按钮的ID为:0x3024
我写了个程序在win2000+vc6下测试通过
你可以到我的ftp下下载试试,看在你那边能不能通过!
ftp://justforyou:justforyou@itanynj.dns0755.net:10766

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧