Click here to Skip to main content
15,893,564 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: some interview questions Pin
Cedric Moonen11-May-06 1:58
Cedric Moonen11-May-06 1:58 
GeneralRe: some interview questions Pin
Naveen11-May-06 1:09
Naveen11-May-06 1:09 
GeneralRe: some interview questions Pin
ThatsAlok11-May-06 5:08
ThatsAlok11-May-06 5:08 
GeneralRe: some interview questions Pin
Naveen11-May-06 17:13
Naveen11-May-06 17:13 
GeneralRe: some interview questions Pin
ThatsAlok11-May-06 19:17
ThatsAlok11-May-06 19:17 
AnswerRe: some interview questions Pin
NiceNaidu11-May-06 3:53
NiceNaidu11-May-06 3:53 
GeneralRe: some interview questions Pin
NiceNaidu11-May-06 4:05
NiceNaidu11-May-06 4:05 
Questionmessage BN_CLICKED for button in flexgrid Pin
zeus_master10-May-06 23:57
zeus_master10-May-06 23:57 
I create a button in a flexgrid, and want to get the BN_CLICKED message of the button. though I add the ON_BN_CLICKED in MESSAGE_MAP,still can't run into onbutton1().
is it the only way that Override OnCommand()?




.h class
class CProjDlg : public CDialog
{
...
public:
CMSFlexGrid m_FlexGrid;
private:
CButton m_btn;
....
<big>afx_msg void OnButton1();</big>
}

#define IDC_MYBUTTON 1999


.cpp creat button

BEGIN_MESSAGE_MAP(CProg5Dlg, CDialog)
//{{AFX_MSG_MAP(CProg5Dlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
<big>ON_BN_CLICKED(IDC_BUTTON1, OnButton1)</big>
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

create the button from the flexgrid

void CProg5Dlg::InitControls()
{

....
m_btn.Create("btn",WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,CRect(100,40,140,120<big>),&m_FlexGrid</big>,1999);
..
}

void CProjDlg::OnButton1()
{
// TODO: Add your control notification handler code here
AfxMessageBox("button click");

}

AnswerRe: message BN_CLICKED for button in flexgrid Pin
Cedric Moonen11-May-06 0:00
Cedric Moonen11-May-06 0:00 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
zeus_master11-May-06 0:07
zeus_master11-May-06 0:07 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
Cedric Moonen11-May-06 0:09
Cedric Moonen11-May-06 0:09 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
zeus_master11-May-06 0:13
zeus_master11-May-06 0:13 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
zeus_master11-May-06 18:39
zeus_master11-May-06 18:39 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
Cedric Moonen11-May-06 20:59
Cedric Moonen11-May-06 20:59 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
zeus_master11-May-06 21:29
zeus_master11-May-06 21:29 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
zeus_master11-May-06 22:14
zeus_master11-May-06 22:14 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
Cedric Moonen11-May-06 22:19
Cedric Moonen11-May-06 22:19 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
zeus_master11-May-06 22:51
zeus_master11-May-06 22:51 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
Cedric Moonen11-May-06 22:58
Cedric Moonen11-May-06 22:58 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
zeus_master11-May-06 23:13
zeus_master11-May-06 23:13 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
zeus_master11-May-06 23:43
zeus_master11-May-06 23:43 
QuestionCreate a child window Pin
v3r50r10-May-06 23:34
v3r50r10-May-06 23:34 
AnswerRe: Create a child window Pin
Russell'10-May-06 23:57
Russell'10-May-06 23:57 
GeneralRe: Create a child window Pin
v3r50r11-May-06 0:01
v3r50r11-May-06 0:01 
GeneralRe: Create a child window Pin
Cedric Moonen11-May-06 0:05
Cedric Moonen11-May-06 0:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.