|
bhanu_8509 wrote: I cant understand correctly.
if you are using a property sheet you can use the sheet class to store the common information. [it's like a wizard then]
Objects of class CPropertySheet represent property sheets, otherwise known as tab dialog boxes. A property sheet consists of a CPropertySheet object and one or more CPropertyPage objects [As you have screens while installing some software where you do have to click on next/back/finish buttons with some view of the dialogs changing]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
You have two FirstDlg::OnBnClickedButton1() methods. Why?
bhanu_8509 wrote: After that, if I go back to the first dialog (by a button click event from the second dialog) all the values seems to be disappeared.
Which would be correct based on what you've shown in SecondDlg::OnBnClickedButton1() . The call to DisplayValues() does not happen until after DoModal() has returned.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
DavidCrow wrote: You have two FirstDlg::OnBnClickedButton1() methods. Why?
I am very sorry David. I have done a typing mistake. I am very sorry. Now I have edited my post.
DavidCrow wrote: Which would be correct based on what you've shown in SecondDlg::OnBnClickedButton1(). The call to DisplayValues() does not happen until after DoModal() has returned.
I understand now that call effect to DisplayValues() will happen after DoModal() has returned. Please tell me how to avoid this. I used Singleton objects using Static members but the same problem presists. Please help me.
Thank you very much for your kind reply.
|
|
|
|
|
bhanu_8509 wrote: Please help me.
-- Dialog1 <---
| |
| |
| |
| |
---> Dialog2 --
Having a design such as this is, IMO, a recipe for failure. Why not use a property sheet or tabbed dialog instead?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Sorry David. I cannot understand exactly from your diagram. I am very new to MFC. My requirement is to use Dialogs only, Tabbed dialog and Property sheet should not be used.
Please help me.
|
|
|
|
|
bhanu_8509 wrote: I cannot understand exactly from your diagram.
I was just implying that having dialog1 call dialog2 which calls dialog1 etc is a bad design. I'm not saying it can't be done, but the solution will be neither straight forward nor elegant.
bhanu_8509 wrote: My requirement is to use Dialogs only, Tabbed dialog and Property sheet should not be used.
Since a tabbed dialog and a property sheet are both dialogs, your requirement makes no sense.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Dear David,
Please help me how to proceed with good design for my requirement.
Many thanks in advance.
|
|
|
|
|
Create a dialog with a tab control (CTabControl ), or create a property sheet with four property pages.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi Friends,
I am getting this error in my program. in Stdafx header file...
fatal error C1083: Cannot open include file: 'afximpl.h': No such file or directory.
But this file is available in C:\Program files\Microsoft Visual Studio.Net 2003\vc7\atlmfc\src\mfc\afximpl.h
So i dont know how to resolve this error.
Could any one try to resolve this.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
how are you including the file? #include <afximpl.h> and before doing that you must #include<afxtempl.h>
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi,
I included #include<afxtempl.h> , still its not working..
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
Hi,
Yes i did as you told. I included both the headers
Still its not working..
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
To fix by checking the following possible causes:
1. File does not exist.
2. File, subdirectory, or disk is read-only.
3. No access permission for file or directory.
4. Not enough file handles. Close some applications and recompile.
5. The INCLUDE environment variable is set incorrectly.
This is my suggestion. For the Visual Studio please look
under "Tools - Options - Projects an Solutions --> VC++ Directories" for
the include files directories that the Visual Studio uses to search for include files.
There you can add this directory.
6. An #include directive uses double quotation marks around a path specification, which causes the standard directories to be skipped.
7. You did not specify /clr and your program uses CLR constructs.
8. You attempted to compile a single file in the project without first compiling stdafx.cpp. Before you can compile a single file in the project, you need to compile stdafx.cpp. In the case of the /analyze (Enterprise Code Analysis) compiler option, you will need to use the same /analyze setting for stdafx.cpp that you use for the .cpp file.
|
|
|
|
|
You shouldn't include this file, it's internal to MFC.
Steve
|
|
|
|
|
Hi!
I also had this problem.
Just try to include the file using double quotation marks around the path specification:
use #include "afximpl.h" instead of #include <afximpl.h>.
|
|
|
|
|
venera_soft wrote: Just try to include the file using double quotation marks around the path specification:
use #include "afximpl.h" instead of #include <afximpl.h>.
Why? That instructs the preprocessor to look for the file in the same directory as the #include statement, which it obviously is not going to find.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Dear All,
My project requirement is VC++ application need to open an .trp file using FileReading method.I tried it works proper.But i need to open a .trp file using Thead concept...
It will be much helpful to me to give some advice on this..
Thank you very much,
Yours,
Anitha
|
|
|
|
|
Move the FileReading method into the your thread procedure and do things over there.
Since you can open the .trp file it should not be a problem to achieve this from the thread.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thank you for your kind reply.
If I process the file reading in a thread, the thread starts its separate execution. I need some of the values from the file to proceed further. So please tell me, is it possible to suspend the main thread till the worker thread (File reading method) is completed. Please advice.
|
|
|
|
|
AnithaSubramani wrote: suspend the main thread till the worker thread (File reading method) is completed
If you want to suspend the main thread what is the advantage of using another thread?
Regards,
Sandip.
|
|
|
|
|
it won't be a good idea cause threads are generally used for parallel processing. why start a thread if you want the main thread to get suspended?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi all,
I want to use registration dialog with limit of 30 days.
So i m taking help of this article
http://www.codeproject.com/KB/dialog/regdialog.aspx[^]
it working fine if i increase the date.But when i decrese the date or set back date than also it is count number of days.
i just want it is working only for next date not for back date.
Please help me for this.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
didn't look at the article, but why don't you compare the dates before saving them. On comparison if the selected date is prior to the current date, pop a message box and reset the date to the current date otherwise you can let the user proceed.
I think I got ur query correctly.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
I need to do 3-4 tasks after a fix time interval . the tasks are dependent on each other , i need to do all in parallel.currently I m doing these in separe threads (running 3-4 threads).problem is I m using sleep method in each thread to repeat task after a fix interval .but sleep is not guaranteed to sleeep for exact interval. how can I do parallel tasks after exact interval .
|
|
|
|