|
please have a look at www.rentacoder.com
ppl there will help you solve other home assignements too and tell this to your other friends too.
-Prakash
|
|
|
|
|
<Ogre Mode>
fi fi fo fum, I smell ..... homework
and WE DONT DO HOMEWORK
</Ogre Mode>
you should try reading point 6 here :-
http://www.codeproject.com/script/comments/forums.asp?msg=1339120&forumid=1647#xx1278597xx[^]
If you really want to become a programmer and learn, how about at least
trying to solve the problem, and post code back here when you're stuck on a particular point - I refuse to beleive you dont have tutors and text books that would help you get started
If its not homework, I apologise - in which case, try rent-a-coder instead !
'g'
-- modified at 7:08 Wednesday 18th January, 2006
|
|
|
|
|
I have a modal dialog box A and when it runs, it stays on top. Is there a way to hide the dialog box or set dialog box A at the back of another modal dialog box? I'm using MFC. I'm kinda desperate for solutions.
waxie
-- modified at 5:30 Wednesday 18th January, 2006
|
|
|
|
|
|
But if we call ShowWindow() say:
int m_nExitCode = dlg.DoModal();
dlg.ShowWindow(SW_SHOWMINIMIZED);
This will pass activation of window A to another window. I want the window to be still running but just invisible.
If only it's a modeless window it will be much easier.
Thanks for the reply by the way.
waxie
|
|
|
|
|
toxcct wrote: CWnd class provides a ShowWindow() function which you could pass SW_HIDE/SW_SHOW parameters...
In Case of Modal Dialog, same will not work!, see my reply to actual poster!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Why do you want to hide your modal dialog box ? Hidding it won't allow you to make it 'non-modal'. In other words, it means that if you hide, you won't be able to close ('cause its hidden) but you won't be able neither to work with the rest of your application because your modal dialog is still opened (even if hidden). Then, your user will have a little problem to close your application, don't you think ?
Maybe a better approach to that is to use modeless dialogs (they will allow you to work with the rest of your application but they are a little bit more complicated to manage)
|
|
|
|
|
The dialog was created with a resource so i have no choice but to display it as modal. Sorry I'm still a novice mfc programmer. I will be the one who will close the modal dialog box and not the user. Say, I have a modal dialog box with a progress bar, and another modal dialog box which runs an update. How do i hide the one which does the update?
waxie
|
|
|
|
|
modal has nothing do deal with resources...
you have a CDialog inherited class, which you associates with a dialog resource...
then, when you create you dialogbox, you can call either .DoModal() on it (to make it modal), or .Create() for a modeless dialog.
if this code wasn't written directly but you but but the wizard, then go to where the dialog is created and where domodal() is called, and change it...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
-- modified at 5:52 Wednesday 18th January, 2006
|
|
|
|
|
Wow, I think your are mixing everything
Ok, first, using a modeless dialog box is still done with a ressource. In fact the only thing that changes is that it lets the user work with the rest of your program. Let's take an example:
CMyModalDlg Dlg;<br />
Dlg.DoModal();<br />
MessageBox("Test message");
If you run this code, you will see that the "Test message" (message box) will only be displayed when you close your modal dialog. It means that your program 'stops' at this line to let the message box receive the inputs from the user. Once the dialog is closed, the DoModal function is exited and your program continues. But this also means that your program main loop is not processed thus you cannot work with the rest of your application (I think you already discovered that).
Now, if instead of using a dialog box, you use a modeless one, you won't call the DoModal function (but rather simply ShowWindow) and thus, your program will continue and show immediatley the message box. This means also that you will still be able to 'work' with the rest of your program (click on buttons,...). I suggest you to search for modeless articles on this website to see how to use them.
In your example, you won't be able to have two moal dialogs (because of what I explained below). Or, the only way to do it is to open one 'inside the code' of the first one. But, then the first one won't be refreshed and processed.
I suggest that you buy yourself a book about the MFC because you are lacking some important concepts there. And it is impossible to explain in detail through a forum.
Hope this helps
|
|
|
|
|
Thank you very much for your reply Cedric! I sorta crashed myself into MFC. I had to do many things immediately, and learn in the process. Yeah, I admit I have a lousy mfc foundation and sorta did not have a good mfc first impression (I was a java kid). I am sort of in an experimenting stage right now. Good thing there are many of you experts here who can share your thoughts.
Thanks!
Waxie
|
|
|
|
|
You're welcome
|
|
|
|
|
Probably you should look at the option of creating modeless dialog box
-Prakash
|
|
|
|
|
Only chance for you is Modaless dialog.
instead of calling DoModal() call Create()
example
MyClass *obj;
obj = new MyClass();
obj->Create(IDD_DIALOG1,this);
obj->ShowWindow(SW_SHOW);
|
|
|
|
|
waxie wrote: Is there a way to hide the dialog box
http://www.voidnish.com/articles/ShowArticle.aspx?code=dlgboxtricks[^]
waxie wrote: r set dialog box A at the back of another modal dialog box?
Use SetWindowPos Api in the OnInitDialog Virtual Function of your Dialog and Instead of returning TRUE from same function return FALSE
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
|
Owner drawn wrote: This will help you...
Hai, i win the race this time
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
|
Owner drawn wrote: I didn't see your post as the page was not refreshed. I only saw it afterwards.
Better Luck next time... Welcome to Fastest Finger Fast Competition
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
|
|
toxcct wrote: Fastest Nose Contest
Opps, i forget the name of contest
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Am working with an MDI application with multiple Views and mutiple doc/views. Have a number of views in Property Pages and have Property Pages with a variety of controls. Would like to combine on one property sheet a number of controls and a CRichEditView of one of the Doc/views instantiated at startup (in the app).
How do I display a smaller frame and view within a single property page that has other controls (buttons, combo-box, other edit controls, etc )
|
|
|
|
|
Hi
I don't know what do you want exacty?
Property page is similar than Dialog window. So the same way you can add frames and controls inside the property page also.
then you should add all the property pages to property sheet class.
regards
Vallikumar A
|
|
|
|
|
Is it possible to change the boring Icon when you create an ActiveX control in VS 7.1
The default - rectangle with circle is pants!
|
|
|
|