How to implement edit box and spin control
-
Hi, I am creating a dialog in which I have to use the Spin control.Firstly I am code for the very first time in MFC. I have created the dialog and drag dropped the controls on it. I have taken the Edit control and on its right side I have placed the Spin control. Please tell me that how I will attach the two controls and what are the property setting to be done in both the control. Thanks
Dear friend, i think it will better if you try a hand with the book "Programming Windows with MFC(Jeff prosise)" [^]. The properties you need depends on your requirement, by default some properties are set.
Величие не Бога может быть недооценена.
-
Dear friend, i think it will better if you try a hand with the book "Programming Windows with MFC(Jeff prosise)" [^]. The properties you need depends on your requirement, by default some properties are set.
Величие не Бога может быть недооценена.
Thanks Adam for your reply Regarding properties I want to is that "Can we do it by setting the property or we have to do it by programming."
-
Hi, I am creating a dialog in which I have to use the Spin control.Firstly I am code for the very first time in MFC. I have created the dialog and drag dropped the controls on it. I have taken the Edit control and on its right side I have placed the Spin control. Please tell me that how I will attach the two controls and what are the property setting to be done in both the control. Thanks
You can set 'Auto Buddy' property of the spin control to True. This property will automatically attach spin control to the pervious window (editbox in this case) in z-order. You may have to set the 'Set Buddy Integer' property to True as well.
-
You can set 'Auto Buddy' property of the spin control to True. This property will automatically attach spin control to the pervious window (editbox in this case) in z-order. You may have to set the 'Set Buddy Integer' property to True as well.
I have made the Auto Buddy property of spin control as true and also set the Set Buddy Integer as true. I didn't get "in z-order" Is there any changes to be done in the properties of edit box
-
I have made the Auto Buddy property of spin control as true and also set the Set Buddy Integer as true. I didn't get "in z-order" Is there any changes to be done in the properties of edit box
You will have to make sure that edit box comes before the spin control in tab order. You can open the dialog in resource view and press Ctrl+D to make sure that the tab order is correct.
-
You will have to make sure that edit box comes before the spin control in tab order. You can open the dialog in resource view and press Ctrl+D to make sure that the tab order is correct.
I made the tab order as u said.One more question can we give the range say for example 0 - 40 in the edit box which can be incremented or decremented by the spin control (by clicking upward and downward arrow).If yes then where to put it. Thanks
-
You will have to make sure that edit box comes before the spin control in tab order. You can open the dialog in resource view and press Ctrl+D to make sure that the tab order is correct.
Thanks, I did the same. Now please tell me how set the range
-
Thanks Adam for your reply Regarding properties I want to is that "Can we do it by setting the property or we have to do it by programming."
It depends on your need, if you want to set at run time then surely depend on APIs. else you can set some properties are default.
Величие не Бога может быть недооценена.
-
It depends on your need, if you want to set at run time then surely depend on APIs. else you can set some properties are default.
Величие не Бога может быть недооценена.
I want to set it through properties.I have done with all the other part by the help of Rajeesh. Can u please tell me how to set the range
-
I want to set it through properties.I have done with all the other part by the help of Rajeesh. Can u please tell me how to set the range
For a spin control, for setting range property you have depend on CSpinButtonCtrl::SetRange() [^] function itself.
Величие не Бога может быть недооценена.
-
Thanks, I did the same. Now please tell me how set the range
You can use CSpinButtonCtrl class for setting the range for spin control. You can use CSpinButtonCtrl::SetRange() function. For details on how to use the class please refer http://msdn.microsoft.com/en-us/library/sfac27cz(VS.80).aspx[^] You can refer the sample application in that URL as well.