Click here to Skip to main content
15,905,233 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Enabling and Diabling a Control Pin
celllllllll5-Jan-07 8:28
celllllllll5-Jan-07 8:28 
GeneralRe: Enabling and Diabling a Control Pin
Eytukan5-Jan-07 8:36
Eytukan5-Jan-07 8:36 
Questionhiding variables Pin
swjam5-Jan-07 7:37
swjam5-Jan-07 7:37 
AnswerRe: hiding variables Pin
Eytukan5-Jan-07 7:52
Eytukan5-Jan-07 7:52 
GeneralRe: hiding variables Pin
Chris Losinger5-Jan-07 11:10
professionalChris Losinger5-Jan-07 11:10 
GeneralRe: hiding variables Pin
Eytukan5-Jan-07 16:45
Eytukan5-Jan-07 16:45 
GeneralRe: hiding variables Pin
S Douglas7-Jan-07 0:24
professionalS Douglas7-Jan-07 0:24 
GeneralRe: hiding variables Pin
Chris Losinger7-Jan-07 4:35
professionalChris Losinger7-Jan-07 4:35 
GeneralRe: hiding variables Pin
S Douglas7-Jan-07 14:15
professionalS Douglas7-Jan-07 14:15 
QuestionHow to minimize exposed resources Pin
Joe Smith IX5-Jan-07 6:40
Joe Smith IX5-Jan-07 6:40 
AnswerRe: How to minimize exposed resources Pin
Dominik Reichl5-Jan-07 6:59
Dominik Reichl5-Jan-07 6:59 
AnswerRe: How to minimize exposed resources Pin
James R. Twine5-Jan-07 7:24
James R. Twine5-Jan-07 7:24 
Questiondebug_hex command error Pin
ikbahrian5-Jan-07 5:08
ikbahrian5-Jan-07 5:08 
QuestionRe: debug_hex command error Pin
David Crow5-Jan-07 6:07
David Crow5-Jan-07 6:07 
AnswerRe: debug_hex command error Pin
ikbahrian6-Jan-07 0:56
ikbahrian6-Jan-07 0:56 

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.