|
Superman please show me sample code on how to do it? I can only compute the result under command button but when i select one radio button nothing will happend, i do not know how to connect radio button and command button to get the result.
Please...
neil
|
|
|
|
|
Superman has given a very good explanation on how to implement this problem. Go Ahead and do the implementation. i am sure it is not a difficult task to complete. When you are stuck there are people to help you.
On selecting the radio button you can pass the value to the function in the command button which does the calculation and display the result in the textbox.
|
|
|
|
|
thanks for the reply... my problem is that i dont have a sample code on how to pass the value of the function to the command button. If i tried to use if else statement the system will say syntax error
here is my sample code:
UpdateData();
if
m_button1.Select = true
m_edit2 = 0;
else
m_edit2 = m_edit1 * .9;
UpdateData(false);
i cant connect to the radio button...please help me...
thank you and i will wait for a reply.
neil
|
|
|
|
|
C
Neil Jigger wrote: how to pass the value of the function to the command button.
Create a Global variable. assign the value and then pass the value to the command button. and why are you using an if-else statement for this?
|
|
|
|
|
hehehe...that's the reason why i posted this query because i only have little knowledge on c++. I am still on the process of studying this language. Please sir give me website to where i can look for sample codes on c++. I really need samples very badly...
thank you again.
neil
|
|
|
|
|
Search radio button in Code Project. there are lots of examples.
Check this link for example on Radio Button [^]
|
|
|
|
|
Lose the calls to UpdateData() . They are completely unnecessary and only add to your confusion. You can easily have a CButton member variable associated with each radio button, and can call the button's GetCheck() method to see if it is checked or not.
BTW, when pasting code snippets, see #5 here. As it is, your code will not compile.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
thanks david for your reply. i cannot continue with my code for the reason that i dont have enough knowledge on it. My code is successful if i will not use radio button in getting the reasult but when i used a radion button to connect to the command button i cannot successfully link to it coz i dont know the code on how to do it. I just need a sample code for my reference...can u send sample code to connect the radio button to a command button please...?
Neil
|
|
|
|
|
Neil Jigger wrote: ...used a radion button to connect to the command button...
What is this supposed to mean? What is a "command button?"
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
How to limit the size of dockable pane
|
|
|
|
|
|
If you're talking about MFC, then look at the CalcDynamicLayout and CalcFixedLayout virtual functions of the CControlBar class - look at how CDialogBar handles it.
If you're talking about a .NET/C# thing... then this is the wrong forum.
If you can't tell the difference, then you may need more local help.
Good luck,
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Hi
Thanks for your reply.
I was talking about mfc.
I am using a CDockablePane Derived class to show a shell tree control. I enabled docking in the left side of mainframe window. I want to limit its horizontal size, so that part of list view area should always be visible. I tried to use CalcFixedLayout() after its creation in mainframe, but nothing happened. Can you tell me how to use it exactly.
thanks
jitendra
|
|
|
|
|
how to find Textbox value in the DirectUI
I did not find the use of API GetWindowText
|
|
|
|
|
If you want the use of GetWindowText API Plese check this link[^]
|
|
|
|
|
I have got handle where this software.
but make API :GetWindowText error
find not Textbox.text
|
|
|
|
|
Hi,
Anyone know how to copy a dialog resource from one project into another with MSDEV 2008. This used to be easy and intuitive with VCPP 6.0 but then again most things were
TIA
Tony
|
|
|
|
|
You can open the other resource in the same devenv and then copy it. Then copy in necessary contents.
|
|
|
|
|
Thanks for the reply but I have tried this without success. I have opened the RC file and selected the dialog resource I want and seleted copy. The problem is that it wont let me paste it into the resorces of my other project - the paste option is disabled
Any ideas why it could be disabled?
Thanks
Tony
|
|
|
|
|
If you open the second RC file in the resource editor, can you drag/drop resources into the resource view of the current solution? That worked in VC 6, although I give no guarantee that the feature has survived into the current VS design.
--Mike--
Dunder-Mifflin, this is Pam.
|
|
|
|
|
Hi,
Yes, that's how I used to do it in VC6 but it doesnt appear to work in MSDEV 2008. I have found using MSDEV 2008 frustrating, some things are done differently and other things you just can't do. In trying to be all things to all languages, it's lost some of it's great features and is soooo slow.
Thanks anyway, I guess I will just have to create the dialog again from scratch.
|
|
|
|
|
It can be done the other way:
Open the project from wich you want to copy the resource.
Open the resource file to witch you want to copy.
And then you can use CTRL-C and CTRL-V.
modified on Friday, July 31, 2009 2:35 AM
|
|
|
|
|
|
This is the C++ forum. Please ask your WPF query in the WPF[^] forum.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Err..Wrong Forum
♫ 99 little bugs in the code,
99 bugs in the code
We fix a bug, compile it again
101 little bugs in the code ♫
|
|
|
|