|
TheinstruTara wrote: ...how do set then as a group...
Use the WS_GROUP style for the first one.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Add Handler's for them in message map section
ON_BN_CLICKED(ID_RADBUTTON ,OnRadioClicked) // Defined ID_RADBUTTON
//in the header file
afx_msg void OnRadioClicked();
//and in the cpp file
void CCheck1Dlg::OnRadioClicked(){
//Some COde
}
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
The problem is I do now know how many will be needed. It dependes upon how many budget entries a user makes.
Fortitudine Vinsinues!
|
|
|
|
|
Can I not create another radio button using the same CButton object, newRadio?
Fortitudine Vinsinues!
|
|
|
|
|
Yes, but newRadio will need to be a pointer.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
A CButton object is for one radio button. If you need more, define another CButton data member.
In case of variable number, you can define a dynamic collection of such objects. For instance, you can try CTypedPtrArray< CObArray, CButton * > .
You have to create new buttons with new CButton , then call Create , and then add to collection with Add . Do not forget to delete the unneded buttons with delete .
|
|
|
|
|
Oh no I just dont have the time to figure out that. I guess I use good'ol combo box or a list box instead!!
Thanks a lot for the help everybody. I will definitly try it out later, and maybe post an article;)
Fortitudine Vinsinues!
|
|
|
|
|
Move the line CButton newRadio to the header file Budget.h
What i think is that you are going to create these buttons dynamically and more than once. So it would be better for you to change the function definition to
CreateRadioButton(int,int,int,int);// Specifying where to place the buttons.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
TheinstruTara wrote: CButton newRadio;
This object has function-level scope. It needs to be a member of the CBudget class.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I created one win32 console application .I want to collect the content of console application window from another utility. when ever i want to collect content of that console window just initiating utility is enough.it will dump the content in to one text file. can any one help me to create that utility?
|
|
|
|
|
May be this can help you.
See Here[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
If the utility will be spawning the console application, see here and here. Otherwise, you'll need to go this route.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello all,
By following article at http://www.codeproject.com/internet/rpcintro1.asp and http://www.codeproject.com/internet/rpcintro2.asp, I was able to have RPC feature in my application.
However, I realize that even I successfully call the RpcServerUseProtseqEp for the first time. I will have problem calling the same function, with same parameters at the second time, after I close all the RPC resource using RpcMgmtStopServerListening. I will get the following error result:
RpcServerUseProtseqEp failed. The endpoint is a duplicate. (1740)
The sequence of my RPC server is as follow, RpcServerUseProtseqEp-> RpcServerRegisterIf-> RpcServerListen (In another thread)-> RpcMgmtStopServerListening-> RpcServerUseProtseqEp (Opps! Fail at here)
Any idea on how I can restart the RPC service after I end it?
Thank you
yccheok
|
|
|
|
|
Hai I have a project which need to be build in win32 console, But I have build it in win32application. is there any small modification helps me to change the project win32 app to console instead doing all again.
Thanks in advance.
Krishna
|
|
|
|
|
AFAIK the interface used by the two types is all together different with very little similarities being shared between them.It would be easier for you to put your code again in console based application.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Any classes you have that are not related to User Interface should be reusable.
|
|
|
|
|
In your compiler options, remove the _WINDOWS preprocessor symbol and change it to _CONSOLE
In your linker options, change /subsystem:windows to /subsystem:console
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
VB > soccer
|
|
|
|
|
Hello comunity,
is there any function to read all contentens from an CTreeCtrl object, in order wich ist showed?
Mean like this:
Root
-Item1
-Item2
-Item3
--Child1
--Child2
--Child3
---Child_a
---Child_b
---Child_c
-Item4
....
-Item_n
in this order to print out or stored in an file!
i make my own but i cant read in the order like this sample
thanx
break;
|
|
|
|
|
You have to use GetNextItem(TVGN_CHILD) / GetNextItem(TVGN_NEXT) in a recursive function to iterate through all items. Start at TVI_ROOT.
Some of us walk the memory lane, others plummet into a rabbit hole
Tree<t> in C# || Fold With Us! || sighist
|
|
|
|
|
Hi,
thank you, i try to solve this..
regards
break;
|
|
|
|
|
use GetRootItem for get root and then use GetNextItem(TVGN_CHILD) maybe it is some helpful to you
whitesky
|
|
|
|
|
HI,
A file "ABC.txt" has already been created using CFile and modes
CFile::modeCreate | CFile::modeWrite | CFile::typeBinary
Now I am opeing it using modes
CFile::modeNoTruncate | CFile::modeWrite | CFile::typeBinary
and write the data in it
but it do not appeand the data at its end.
I am also using CFile::SeekToEnd();
Whats the write ways to add data at the end of already existing file?
thanks
Regards.
|
|
|
|
|
I had a file with some text in it. And this code successfully appends text to it.
CStdioFile file;
file.Open ("C:\\abc.txt",CFile::modeCreate | CFile::modeNoTruncate | CFile::modeWrite );
file.SeekToEnd ();
file.WriteString ("Anshuman");
file.Close ();
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Was there any problem with my way stated in above query?
Regards.
|
|
|
|
|
You can achieve the same with your method.(using CFile) Post some code about how you are going with that and then we can comment on the change or modification you need to make. My Guess is that you may not be closing the file after creating it.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|