|
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_
|
|
|
|
|
and this code is work or not work
<br />
CFile file(_T("c:\\test.txt"),CFile::modeNoTruncate | CFile::modeWrite );<br />
file.SeekToEnd();<br />
file.Write(_T("test"),4);<br />
file.Close ();<br />
whitesky
|
|
|
|
|
How do you choose the socket number that you wish to use for a TCP connection?
Is there a band of numbers that you can use, if so what are they?
Thanks for any advice!
Mike
|
|
|
|
|
Mike,
There is no hard fast rule to selecting a port number for your own TCP services. In general the first 1024 are reserved for "well known" services and 49152 to 65535 are reserved for dynamically allocated and/or private port numbers.
Keep in mind where your service will be used, if it is a public service that anyone can connect to via the Internet, then you might want to be fairly selective on what port number you use. However if your service/server is to be used on a private network, then you can just about pick any port you want.
You can find a list of "well known" port numbers at:
http://www.iana.org/assignments/port-numbers[^]
Hope this helps.
|
|
|
|
|
Thanks for this.
My application(s) will be used on a private network, so there shouldnt be any issues with connection over the internet. Looking down the list, the first free block is 3825 - 3835, so I will probably look to us these.
Thanks for you help!
Mike
|
|
|
|
|
Hi
I'm writing some code that uses a set of purchased numerical algorithms. Unfortunately they use c function calls so any array that are passed to the functions are done so with pointers.
I usually use vectors rather than arrays so does anyone know how I can pass the vectors to these functions? Is it as simple as passing vector.front() or is there some other way to convert a c++ vector to a c array/pointer?
cheers
|
|
|
|