Click here to Skip to main content
15,921,884 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: EnableWindow Help Pin
Eytukan5-Jan-07 17:14
Eytukan5-Jan-07 17:14 
AnswerRe: EnableWindow Help Pin
Hamid_RT5-Jan-07 19:06
Hamid_RT5-Jan-07 19:06 
GeneralRe: EnableWindow Help Pin
celllllllll9-Jan-07 8:26
celllllllll9-Jan-07 8:26 
GeneralRe: EnableWindow Help Pin
Hamid_RT9-Jan-07 18:08
Hamid_RT9-Jan-07 18:08 
QuestionSomewhat advanced C++ question... Pin
CAgent0075-Jan-07 13:33
CAgent0075-Jan-07 13:33 
AnswerRe: Somewhat advanced C++ question... Pin
PJ Arends5-Jan-07 13:46
professionalPJ Arends5-Jan-07 13:46 
GeneralRe: Somewhat advanced C++ question... Pin
CAgent0075-Jan-07 13:54
CAgent0075-Jan-07 13:54 
AnswerRe: Somewhat advanced C++ question... Pin
CoffeeAddict195-Jan-07 14:38
CoffeeAddict195-Jan-07 14:38 
AnswerRe: Somewhat advanced C++ question... Pin
Eytukan5-Jan-07 17:08
Eytukan5-Jan-07 17:08 
GeneralRe: Somewhat advanced C++ question... Pin
CAgent0078-Jan-07 8:13
CAgent0078-Jan-07 8:13 
GeneralRe: Somewhat advanced C++ question... Pin
Eytukan8-Jan-07 19:32
Eytukan8-Jan-07 19:32 
QuestionChanging the color of a pen or brush on the fly? Pin
CoffeeAddict195-Jan-07 10:20
CoffeeAddict195-Jan-07 10:20 
AnswerRe: Changing the color of a pen or brush on the fly? Pin
Christian Graus5-Jan-07 10:46
protectorChristian Graus5-Jan-07 10:46 
Questiondt_dll sample of windows platform sdk Pin
jfranzoy5-Jan-07 10:09
jfranzoy5-Jan-07 10:09 
AnswerRe: dt_dll sample of windows platform sdk Pin
Dominik Reichl5-Jan-07 11:22
Dominik Reichl5-Jan-07 11:22 
Questionwhats wrong with this code? Pin
arbster5-Jan-07 9:18
arbster5-Jan-07 9:18 
AnswerRe: whats wrong with this code? Pin
Michael Dunn5-Jan-07 9:29
sitebuilderMichael Dunn5-Jan-07 9:29 
AnswerRe: whats wrong with this code? Pin
David Crow5-Jan-07 10:07
David Crow5-Jan-07 10:07 
GeneralRe: whats wrong with this code? Pin
Cristian Amarie5-Jan-07 20:56
Cristian Amarie5-Jan-07 20:56 
GeneralRe: whats wrong with this code? Pin
Stephen Hewitt7-Jan-07 11:48
Stephen Hewitt7-Jan-07 11:48 
GeneralRe: whats wrong with this code? Pin
Cristian Amarie7-Jan-07 20:16
Cristian Amarie7-Jan-07 20:16 
AnswerRe: whats wrong with this code? Pin
Hamid_RT5-Jan-07 18:55
Hamid_RT5-Jan-07 18:55 
QuestionEnabling and Diabling a Control Pin
celllllllll5-Jan-07 8:07
celllllllll5-Jan-07 8:07 
Hi All,

I have two ComboBox controls
{A(it has items like A1, A2 and A3)and
B (B has B1, B2 and B3)}
and one spin control (Z).

Now, my task is that when from control A, A1 is selected then full control B should be diabled. And for all others A2 and A3, B should get enabled.

This is how my code is:

m_CtrlA.SetCurSel(0);<br />
	m_CtrlB.ResetContent();<br />
	if (m_CtrlA.GetCurSel() == A1)<br />
	{<br />
		m_CtrlB.EnableWindow(FALSE);		<br />
		m_Spin.SetRange(0,1000);			<br />
	}<br />
<br />
	else<br />
	{<br />
		m_CtrlB.EnableWindow(TRUE);<br />
	}<br />


So, the problem is what this code is doing is that it is disabling the full m_CtrlB for every case. But I want to disable it for A1 only.

I would really appreciate if someone could help me.

Thanks a lot in advance

C++Prog

AnswerRe: Enabling and Diabling a Control Pin
Eytukan5-Jan-07 8:19
Eytukan5-Jan-07 8:19 
AnswerRe: Enabling and Diabling a Control Pin
jeron15-Jan-07 8:19
jeron15-Jan-07 8:19 

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.