|
Hi,
I have an MDI application and its have three different views.
When user clicks on new button new types of documents window will com.
Now I want to control only one window for a view type.
How to do this one and where to do this one?
|
|
|
|
|
Your question is not clear at all. What do you mean exactly by "I want to control only one window for a view type" ? Could you please be more explicit and if possible explain with an example ?
|
|
|
|
|
Yes,I want to control only one window for a view type" ?
|
|
|
|
|
You only want one instance of a particular view type?
If so you could set a flag when showing a view.
So if the same view is selected in New, you could bring the already displayed view to the foreground.
|
|
|
|
|
Yes I will take the flag.I will try.
thank you I got it.
|
|
|
|
|
What "Yes" ? I didn't ask a question that can be answered by yes or no. I asked for more details that you still didnt provide. Can you please give a concrete example and a detailed description of your problem (I mean more than one line) ? The verb "control" doesn't mean a lot of things out without knowing the context.
And do you mean by view type exactly ?
|
|
|
|
|
cool cool I got idea.
what i want from superman.
|
|
|
|
|
Cedric Moonen wrote: I didn't ask a question that can be answered by yes or no.
Your second question could be answered with a yes/no response. I know that's not what you intended, however.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi all,
can anybody please tell me how can i change or replace existing formview to another in SDI application.
thanks ina dvance.
|
|
|
|
|
In the CFormView derived class you will find a line like IDD = IDD_XXX .
Replace the IDD_XXX with the ID of the new dialog resource.
Make sure the new dialog has its Border property set to None and Style property set to Child .
|
|
|
|
|
No its not mean,
i have already diffrent FormView classes,
like Cform1,Cform2,Cform3,Cform4, all these have diffreant forms and use for diffreant functions, so according to need how can display these diffrent forms.
|
|
|
|
|
You could use ShowWindow with SW_HIDE and SW_SHOW to show the needed view and hide all the other views.
|
|
|
|
|
How can do this?
by default the CView derived class display here,
how can display diffrent formview on calling of diffrent functions.
|
|
|
|
|
U have to take createcontext structure.
CView* pView = NULL;
//Create the new view:
CCreateContext context;
context.m_pNewViewClass = pNewViewRTClass;
context.m_pCurrentDoc = pDoc;
pView = STATIC_DOWNCAST(CView, pFrame->CreateView(&context));
if(pView != NULL)
{
//destroy the old view:
if ( !pWndToDelete->DestroyWindow() )
{
return;
}
pView->OnInitialUpdate();
//Show and activate view:
pView->ShowWindow(SW_SHOW);
pFrame->SetActiveView(pView);
pFrame->RecalcLayout();
}
|
|
|
|
|
|
Plese see the sample swsplit.exe from MSDN.
If don't find I will give you.
|
|
|
|
|
ya i chk this there is a splitter,can i change the without splitter
|
|
|
|
|
Are you looking some thing like this[^] and this[^]
I hope it helps.
Regards,
Sandip.
|
|
|
|
|
Hi,
In a dialog,im having a button which opens another dialog. I am using a accelerator key to select that button For eg. Im using accelrator key "A". In the same dialog,i am having a text control. I want to write a word "A" in the text box,but it is pointing to the button and opens the another dialog.How to solve this problem?
Thanks,
|
|
|
|
|
For shortcuts you must always use combination keys like Ctrl + A .
The problem you're facing is a classic example of why you should not use single keys as hotkeys.
|
|
|
|
|
|
Hey, lets say i take the hexcode from notepad.exe or whatever, how would i be able to create an executable using the hexcode?
Lets say i write the hexcode into a file, is there any function that would make the file "working" ?
Putting the hexcode into an executable obviously doesnt work.
Kinda hard to explain myself, my english isnt that good so please excuse me.
Greetings me
|
|
|
|
|
ALLERSLIT wrote: lets say i take the hexcode from notepad.exe
What do you define as "hexcode?" Notepad.exe is already an executable.
|
|
|
|
|
I mean the hexcode you see if you open notepad.exe in a hexviewer such as hex workshop etc.
|
|
|
|
|
OK, but exactly what do you want to do? The code you see is already in the form of an executable.
What you see in hexviewer is a text representation of the binary code in notepad.exe, not the actual code.
|
|
|
|