Click here to Skip to main content
15,923,197 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using libavcodec.dll in VC++ Pin
RahulOP11-May-06 2:09
RahulOP11-May-06 2:09 
Questionsome interview questions Pin
kumar_mk11-May-06 0:18
kumar_mk11-May-06 0:18 
AnswerRe: some interview questions Pin
kiran janaswamy11-May-06 0:49
kiran janaswamy11-May-06 0:49 
GeneralRe: some interview questions Pin
Cedric Moonen11-May-06 1:00
Cedric Moonen11-May-06 1:00 
GeneralRe: some interview questions Pin
toxcct11-May-06 1:30
toxcct11-May-06 1:30 
GeneralRe: some interview questions Pin
Cedric Moonen11-May-06 1:33
Cedric Moonen11-May-06 1:33 
JokeRe: some interview questions Pin
toxcct11-May-06 1:43
toxcct11-May-06 1:43 
QuestionRe: some interview questions Pin
Naveen11-May-06 1:44
Naveen11-May-06 1:44 
AnswerRe: some interview questions Pin
toxcct11-May-06 1:46
toxcct11-May-06 1:46 
GeneralRe: some interview questions Pin
Naveen11-May-06 1:50
Naveen11-May-06 1:50 
GeneralRe: some interview questions Pin
toxcct11-May-06 1:52
toxcct11-May-06 1:52 
GeneralRe: some interview questions Pin
Cedric Moonen11-May-06 1:56
Cedric Moonen11-May-06 1:56 
GeneralRe: some interview questions Pin
toxcct11-May-06 2:03
toxcct11-May-06 2:03 
GeneralRe: some interview questions Pin
Naveen11-May-06 1:57
Naveen11-May-06 1:57 
GeneralRe: some interview questions Pin
toxcct11-May-06 2:03
toxcct11-May-06 2:03 
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 

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.