SDI应用程序中的按钮 [英] Button in SDI application

查看:120
本文介绍了SDI应用程序中的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想澄清一下我的SDI应用程序中的一件事.我在SDI中有一个按钮.我知道在基于Dialog的应用程序中执行操作很容易,但是可以在SDI中单击按钮时发生事件.我已经在SDI中创建了一个按钮,如下所示,

Hi everyone,

I want to glarify one thing in my SDI application.I have a button in SDI.I know it is easy to do an action in Dialog based application, but is it possible to make an event on the button click in SDI. I have created a button in SDI as follows,

CButton *pButton;
pButton = new CButton;
//OnInitialUpdate()
pButton->Create("&Sub",WS_VISIBLE,CRect(782,682,806,716),this,0x302);



如何在按钮单击上执行操作(例如更改椭圆颜色,背景颜色)?.

Shiva ..



How to make an action on Button click(like changing ellipse color,background color)?.

Shiva..

推荐答案

尝试一下:)
Try it :)
// resource.h
#define IDC_YOUR_BTN  0x302
 
// yourview.cpp
BEGIN_MESSAGE_MAP(CYourView, CBaseOfYourView)
  ON_COMMAND(IDC_YOUR_BTN, OnYourButtonClick)
...
END_MESSAGE_MAP()
 
...
/*afx_msg*/ void CYourView::OnYourButtonClick()
{
  /* wir are inside :) */
}


这篇关于SDI应用程序中的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆