Home > Software engineering >  MFCBUTTON two key highlight and do not highlight the mutex is why? To solve the
MFCBUTTON two key highlight and do not highlight the mutex is why? To solve the

Time:09-18

In MFC dialog project dragged into two MFCBUTTON button, using SetState () function to realize the highlights and highlight
Defines two variables respectively s1, s2 implementation program the following

S1=1; S2=1;

Within the ONCLICK function

OnBnClickedBUTTON1 ()
{
MFCBUTTON. SetState (s1);

S1=! S1.
}

OnBnClickedBUTTON2 ()
{
MFCBUTTON. SetState (s2);

S2=! S2.
}

After the operation found two buttons are mutually exclusive concave down after for the click, then click the BUTTON2, BUTTON2 hollows, but for the pop-up,
These two buttons should not be any independent should each other? Pray god to explain

CodePudding user response:

Use the CheckBox to select PushLike style

  • Related