|
This seems to be C#, in VC++ I would make it like...
supposing you have member variables for every element...
If (m_rbChoiceA.GetSelect ())
{
m_rbChoiceA_1.ShowWindow (TRUE);
;
m_rbChoiceB_1.ShowWindow (FALSE);
}
and the opossite when B is selected.
I hope it helps you a bit, sorry but I didn't use C# yet.
BTW, I think is better to enable/disable than show/hide, I had a endless loop in OnPaint bcause of ShowWindow because it sends a "redraw" message internally.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Add the code below in the OnInitDialog function call
where IDC_STATIC is ID of Group box and IDC_RADIO3 the ID of the Radio Button. This may be different for your application hence needs to be changed accordingly.
<br />
GetDlgItem(IDC_STATIC)->ShowWindow(SW_HIDE);<br />
GetDlgItem(IDC_STATIC1)->ShowWindow(SW_HIDE);<br />
<br />
GetDlgItem(IDC_RADIO3)->ShowWindow(SW_HIDE);<br />
GetDlgItem(IDC_RADIO4)->ShowWindow(SW_HIDE);<br />
<br />
GetDlgItem(IDC_RADIO5)->ShowWindow(SW_HIDE);<br />
GetDlgItem(IDC_RADIO6)->ShowWindow(SW_HIDE);<br />
This will make sure that the 1st time you start your application, the 2 group boxes are visible.
Now handle the Single Click event of the 2 Radio buttons.
Add the following code in the "Choice A" radio button event handling function.
<br />
GetDlgItem(IDC_STATIC)->ShowWindow(SW_SHOW);<br />
GetDlgItem(IDC_RADIO3)->ShowWindow(SW_SHOW);<br />
GetDlgItem(IDC_RADIO4)->ShowWindow(SW_SHOW);<br />
If you want dont want Group A radio buttons/box to be visible when you click on the 2nd radio button, please hide the same.
|
|
|
|
|
char** Buf[ 8 ] ;
how to allocate and use this pointer ?
Thanks & Regards
|
|
|
|
|
char ** Buf[8];
int i,j;
for (i=0; i<8; i++)
{
Buf[i] = new char * [10];
}
Buf[0][0] = "foo00";
Buf[0][1] = "foo01";
Buf[0][2] = "foo02";
Buf[1][0] = "foo10";
for (i=0; i<8; i++)
{
delete [] Buf[i];
}
BTW: until you can't figure how to use it, don't use it.
BTW2: maybe hard-wired 8 as buffer size is not a good idea. Use an const instead.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
thanks CPallini
|
|
|
|
|
Nice Pointer arithmetics
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Nice Work
|
|
|
|
|
std::vector<std::string> is pretty much better if you code in C++.
|
|
|
|
|
toxcct wrote: std::string
I prefer CString over std::string. as it is much easy to use than std::string and in my way more robust.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
ThatsAlok wrote: as it is much easy to use than std::string and in my way more robust
>> more easy to use
that's only your point of view. std::string is not that difficult to use, and is much more powerful when mixed with the other STL classes, especially the algorithms.
>> more robust
I don't trust this. can you give some proof about this ?
BTW, i really don't like the idea of mixing MFC and STL.
either choose std::vector<std::string> if MFC is not a must, or CStringArray , but vertainly not std::vector<CString> .
|
|
|
|
|
toxcct wrote: MFC is not a must, or CStringArray, but vertainly not std::vector<cstring>.
CStringArray has less capability than vector and CString Mix. this is some time called Mixed mode programming;P
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
typedef vector<CString> vecString;
typedef vector<vecString> vecDoubleDim;
typedef vector<vecDoubleDim> vecTripleDim;
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
ThatsAlok wrote: typedef vector<cstring> vecString
naaaa
check this[^]
|
|
|
|
|
toxcct wrote: check this[^]
sometimes
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hello Everybody,
I have developed an MFC dialog based application which I am launching through an interactive service. The application was running fine with all its functionalities until I installed IE7 on my machine. The problem is that, I can logout safely first time after rebooting the computer, but if I tried to logout second time I get an Event ID 1073 in system event viewer and computer doesn’t logout.
Please help me out…
Thanks in advance,
Sumedh
Thanks
Sumedh
|
|
|
|
|
Sumedh_A wrote: I have developed an MFC dialog based application which I am launching through an interactive service.
What actually your MFC application do? which can't done from Desktop Intreactive service!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Actually my MFC application is designed to control a filter driver.
The application can be configured to decide whether the driver should
be loaded or not at next reboot.
But the exe an using now doesn't contain that driver I am just running the
MFC executable without driver in its resource.
|
|
|
|
|
Hai,
i am working with IOCP server and normal socket Client. i have created 2 threads in my server side(in a thread pool). and trying to connect more number of clients using threads.
But Only 3969 clients are getting connected at a time....
as of use in IOCP we can connect 65000 clients .....but atleast i want 10,000 clients to connect.
What is the issue over here...
reply me,
Mani
Born to win...!
|
|
|
|
|
float fCurZoom = 1.20000 (as per the debugger) - no problem
now
int newVal = (int) ( fCurZoom * 100.0f );
newVal is equal to 119
???????????????
I'm seeing this happen in the debugger and all
all SPs were applied to vc btw.
Has anyone else seen this type of thing?
|
|
|
|
|
Hi, I have tested or code, No problem newval = 120.
|
|
|
|
|
|
I have created a small window on dialog box which looks like just a border. Window is displaying perfectly. I want that this window should not move or resize.
CRect mRect(20, 20, 50, 50);
CWnd* m_pSelWnd->Create(NULL,NULL,WS_CHILD | WS_VISIBLE |WS_THICKFRAME, mRect,this,1234);
How could I handle this?
please help me for this....
Chetan
|
|
|
|
|
Not rezisable is easy to get,
WS_SYSMENU | WS_CAPTION | WS_OVERLAPPED
but non moveable...
I guess you can hold the coordinates that you set to the window and moving yourself the window when they change.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Are you handling the WM_SIZING message?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I have a problem in transferring database file
I am doing a cilent server application, where the server has many database files(.mdb).
When the client wants to query the server's databases, how will the server retrive those datas and send it to the client ? I am using Casynsocket
bhagyashree
|
|
|
|