views:

110

answers:

1

I have a dialog written in VC++ as shown below:


Label1 Control1


Button1


If Control1 is disabled, using Label1's hotkey results in Button1's Click event. How could I avoid that? As Control1 is disabled shouldn't the hotkey for Label1 too?

+1  A: 

If it's a CStatic, have you tried disabling it at the same time as the control it's referencing?

Jon Cage
+1 - definitely try disabling the label as well as the control
ChrisF
Disabling will work for sure. I wonder, what they achieved by propagating the hotkey to another control?
gneash