VC中的一个问题 程序启动时,设置菜单的Enable为False,当点击"矩形"等,在UpdateUI中pCmdUI->SetCheck(m_shape==0)。m_shape为整形变量,你可以设置选择矩形的时候让它为0,依次类推。。对了我想起来《MFC Windows程序设计》里面第四章菜单有一个例子,很好,和你这个类似,你可以看看它的代码 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 CBrush *p=pDC->SelectObject(&m_Brush); if(type==1) { pDC->Rectangle(20,20,200,100); } if(type==2) { pDC->Ellipse(250,100,450,250); } pDC->SelectStockObject(NULL_BRUSH);}......................................................................................void CTC_kuroView::OnJuxing() { // TODO: Add your command handler code here if(type!=1) { type=1; } else { type=0; }}void CTC_kuroView::OnUpdateJuxing(CCmdUI* pCmdUI) { // TODO: Add your command update UI handler code here pCmdUI->SetCheck(type==1);}void CTC_kuroView::OnTuoyuan() { // TODO: Add your command handler code here if(type!=2) { type=2; } else { type=0; }}void CTC_kuroView::OnUpdateTuoyuan(CCmdUI* pCmdUI) { // TODO: Add your command update UI handler code here pCmdUI->SetCheck(type==2);}这是其中涉及的一些。。1是矩形2是椭圆 没有Invalidate()当然不会刷新咯 求救啊:只有LIB和DLL文件没有.h文件,该如何使用里面的函数呢 定制的IE浏览器,遇到页面中有showDialogModal时会用系统默认浏览器打开。 为什么我的小程序运行,占用内存会越来越大 怎样弹出右键系统菜单 请教,怎么得到一文件是否存在,用FileExists不行啊 函数的问题???帮我看下 用什么看应用程序 字符串转换为int64? 新装SQL Sever 200出现提示不支持Win2000,救命 救急!!! 给程序传递参数,并且执行. RTTI的应用场合
if(type==1)
{
pDC->Rectangle(20,20,200,100);
}
if(type==2)
{
pDC->Ellipse(250,100,450,250);
}
pDC->SelectStockObject(NULL_BRUSH);
}......................................................................................
void CTC_kuroView::OnJuxing()
{
// TODO: Add your command handler code here
if(type!=1)
{
type=1;
}
else
{
type=0;
}
}void CTC_kuroView::OnUpdateJuxing(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
pCmdUI->SetCheck(type==1);
}void CTC_kuroView::OnTuoyuan()
{
// TODO: Add your command handler code here
if(type!=2)
{
type=2;
}
else
{
type=0;
}
}void CTC_kuroView::OnUpdateTuoyuan(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
pCmdUI->SetCheck(type==2);
}这是其中涉及的一些。。1是矩形2是椭圆