Click here to Skip to main content
15,919,749 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
that's wonderful!

and I thought another way, but there is still a small problem.

I use ClassWizard to create a new CButton-derived class named CFButton.and then create CBTGrid class derived from the MSFlexGrid class.

in CBTGrid class, define CFButton m_fButton;
and create the button in void CBTGrid::::PreSubclassWindow()
m_fButton.Create("button",WS_CHILD|BS_PUSHBUTTON|WS_VISIBLE,CRect(0,0,100,100),this,2000);

in CFButton class,add BN_CLICKED in message map below:
ON_CONTROL_REFLECT(BN_CLICKED, OnClicked)


void CFButton::OnClicked()
{
AfxMessageBox("ok now");
}


It is basically ok now. the only problem is tcan't catch the first time clike.

for example, I use CFButton create a batch of button in flexgrid;
after the first time click on any of the button, every click are ok;
what's the first time click do? how to avoid it?





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 
GeneralRe: Create a child window Pin
v3r50r11-May-06 0:13
v3r50r11-May-06 0:13 
GeneralRe: Create a child window Pin
Cedric Moonen11-May-06 0:56
Cedric Moonen11-May-06 0:56 
GeneralRe: Create a child window Pin
Russell'11-May-06 0:05
Russell'11-May-06 0:05 
GeneralRe: Create a child window Pin
v3r50r11-May-06 0:07
v3r50r11-May-06 0:07 
GeneralRe: Create a child window Pin
Russell'11-May-06 0:17
Russell'11-May-06 0:17 

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.