Click here to Skip to main content
15,904,877 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Memory Problems!!! Pin
Paddy20-Nov-02 6:44
Paddy20-Nov-02 6:44 
GeneralRe: Memory Problems!!! Pin
Nitron20-Nov-02 6:52
Nitron20-Nov-02 6:52 
GeneralRe: Memory Problems!!! Pin
Paddy20-Nov-02 8:28
Paddy20-Nov-02 8:28 
GeneralRe: Memory Problems!!! Pin
Ravi Bhavnani20-Nov-02 9:23
professionalRavi Bhavnani20-Nov-02 9:23 
GeneralPropertis Window Pin
ivexx20-Nov-02 4:27
sussivexx20-Nov-02 4:27 
GeneralMessage handler function being called multiple times Pin
Mohit Khanna20-Nov-02 3:55
Mohit Khanna20-Nov-02 3:55 
GeneralRe: Message handler function being called multiple times Pin
Alois Kraus20-Nov-02 4:17
Alois Kraus20-Nov-02 4:17 
GeneralRe: Message handler function being called multiple times Pin
Mohit Khanna20-Nov-02 18:29
Mohit Khanna20-Nov-02 18:29 
Hi Alois,

But the message shoudl be generated only once if at all. Since I click on the radio button only once, and then say "no" in the confirmation dialog. So the state is restored. Below is the code in the handlers "Locked" and "UnLocked" both are radio buttons. m_nRadLocked controls the state.

Why the handler is being called 18 times.. and that too when I am changing to a different property page using the tab control.

Somebody told me that this is a BUG with VC++/MFC. And happens when we use AfxMessageBox/and radio buttons. But I really don't think so. So thats why I had mailed the forum.

property page looks somewhat like this:

/----------------------------------------\
| |
| O Locked O Unlocked |
| |
| some other controls ------ |
\----------------------------------------/

void CSDT12ConfigDCCPage::OnRadUnlocked()
{
UpdateData();

// If Board Admin State locked,
// We shoul not allow to change Admin State of Port to Unclocked state
if(((CSDT12ParentDialog*)m_pParent)->GetAdminState() == 1)
{
m_nRadLocked = 0;
UpdateData(FALSE);
}
}

void CSDT12ConfigDCCPage::OnRadLocked()
{
UpdateData();

/* this condition is to avoid the handler to be called un-neccesarily */
/* if this condition is not present.. dialog is called 18 times while */
/* changing property page to another */
if (m_nRadLocked == 0) /* Check if this msg handler is really being called*/
{
if (AfxMessageBox(IDS_SDT12_BOARD_LOCKED_WARNING,
MB_YESNO | MB_DEFBUTTON2 |MB_ICONQUESTION) == IDNO)
{
m_nRadLocked = 1;
UpdateData(FALSE);
}
}
}

Regards,
Mohit
GeneralShellExecute w/ unknown filename parameter Pin
kubert20-Nov-02 3:25
kubert20-Nov-02 3:25 
GeneralRe: ShellExecute w/ unknown filename parameter Pin
Simon.W20-Nov-02 3:38
Simon.W20-Nov-02 3:38 
GeneralGetting float by reference- low performance Pin
Member 887120-Nov-02 3:02
Member 887120-Nov-02 3:02 
GeneralRe: Getting float by reference- low performance Pin
Simon.W20-Nov-02 3:17
Simon.W20-Nov-02 3:17 
GeneralRe: Getting float by reference- low performance Pin
User 988520-Nov-02 8:56
User 988520-Nov-02 8:56 
GeneralRe: Getting float by reference- low performance Pin
User 988520-Nov-02 8:57
User 988520-Nov-02 8:57 
Generalaccessing view class object from another class Pin
B4u20-Nov-02 2:04
B4u20-Nov-02 2:04 
GeneralRe: accessing view class object from another class Pin
KaЯl20-Nov-02 2:19
KaЯl20-Nov-02 2:19 
GeneralRe: accessing view class object from another class Pin
KarstenK20-Nov-02 2:47
mveKarstenK20-Nov-02 2:47 
GeneralRe: accessing view class object from another class Pin
Simon.W20-Nov-02 3:11
Simon.W20-Nov-02 3:11 
GeneralRe: accessing view class object from another class Pin
dan o20-Nov-02 5:50
dan o20-Nov-02 5:50 
GeneralRe: accessing view class object from another class Pin
B4u20-Nov-02 20:23
B4u20-Nov-02 20:23 
GeneralIncrease resizing border width.... Pin
Neha20-Nov-02 1:43
Neha20-Nov-02 1:43 
GeneralRe: Increase resizing border width.... Pin
RuiSantiago20-Nov-02 1:50
RuiSantiago20-Nov-02 1:50 
GeneralRe: Increase resizing border width.... Pin
Paul M Watt20-Nov-02 6:03
mentorPaul M Watt20-Nov-02 6:03 
GeneralRe: Increase resizing border width.... Pin
Neha20-Nov-02 17:39
Neha20-Nov-02 17:39 
GeneralUninstall question Pin
Jon Hulatt20-Nov-02 1:36
Jon Hulatt20-Nov-02 1:36 

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.