MFC中如何获取按钮控件的尺寸
答案:2 悬赏:60
解决时间 2021-02-18 16:18
- 提问者网友:房东的猫
- 2021-02-17 20:06
MFC中如何获取按钮控件的尺寸,望各位VC达人们能告诉我,谢谢!
最佳答案
- 二级知识专家网友:桑稚给你看
- 2021-02-17 20:21
CRect rectTemp;
GetDlgItem(IDC_BUTTON1)->GetWindowRect(rectTemp);
GetDlgItem(IDC_BUTTON1)->GetWindowRect(rectTemp);
全部回答
- 1楼网友:請叫我丶偏執狂
- 2021-02-17 20:48
cwnd::getcurrentmessage
static const msg* pascal getcurrentmessage( );
return value
returns a pointer to the msg structure that contains the message the window is currently processing. should only be called when in an onmessage handler.
你应该是多个按钮共享clicked事件的处理函数吧?调用下面语句获取当前响应on_clicked消息的控件id:
word id=loword(getcurrentmessage()->wparam);
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯
• 手机登qq时,显示手机磁盘不足,清理后重新登 |
• 刺客的套装怎么选啊? |