|
I guess you want to display your dialog from within your MDI app ? Can't you simply start it as a new program ? Or do you really need it to be integrated in your app ?
If that's the case, then as the previous poster said, you will have to include the source files from your second app into your first app and add some code to create and use the dialog.
|
|
|
|
|
ok i try to do that.
Thx's for help
singh
|
|
|
|
|
Still your question is not clear . Do you mean you need to call MDI appln from the Dialog based application?
Regards,
Rane
|
|
|
|
|
yes you are 100% right..So can you give me small example
singh
|
|
|
|
|
You may use the API WinExec in your Dialog based application code. Say if you want to call the MDI application on the click of a button in your dialog based appln, then add it to the OnButtonClick() method the below piece of code.
WinExec("c:\\Polopo_MDI.exe",SW_SHOWNORMAL);
Regards,
Rane
modified on Wednesday, September 3, 2008 3:43 AM
|
|
|
|
|
Rane wrote: You may use the API WinExec
This function is provided only for compatibility with 16-bit Windows. New applications should use the CreateProcess function or ShellExecute.
|
|
|
|
|
|
how visual c++ project can be converted into executable form after some installation in any other system where even visual studio is not installed .
i hv used Inno Setup Compiler for this.....
but is there anyother software or method...?
|
|
|
|
|
shaina2231 wrote: i hv used Inno Setup Compiler for this.....
What is the problem with InnoSetup ?
|
|
|
|
|
using inno setup during conversion of visualc++ project into window installer set up ,it provides the option to add necessary files or folder to project. i want to add different foloders(database,songs etc that contain files for my program) but it extracts files (all files from added folder) to current directory of installed program not folders but i need folders ..
|
|
|
|
|
you have to specify the folder for each file, for example:
Source: "MyDir\MyFile.exe"; DestDir: "{app}\MyDir"; DestName: "MyFile.exe";
you can also use DestName to specify different name for the file
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Please don't repost...
You can continue with the same thread.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi all,
I have a Dialog box on which i have made a list control, i have a class which is derived from CWinThread class.... now what happens is when i click on button values from list control is taken and passed to my second class(which is derived from CWinThread i.e i have started a UI thread). Now what i want is i want to pass the value which is calculated from this thread to my list control....
What message i should use for doing so...
Thanks in advance
|
|
|
|
|
You can create a user message and use it.
See here[^]See
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi friends
i want to create one rectangle box in that rectangle box inside displays the system date how to do that in MFC?
please give me your code snippet
Thanks and regards
Nisha.S
|
|
|
|
|
to create rectangle firstly draw group box id (IDC_STATIC) then hide it
and using following code on paint method u can draw rectangle ...
CPaintDC dc(this); // device context for painting
CRect rc;
CWnd * pW = this->GetDlgItem(IDC_STATIC);
pW->GetClientRect(&rc);
pW->ClientToScreen(&rc);
this->ScreenToClient(&rc);
//dc.FillSolidRect(&rc,RGB(50,50,50));
dc.Draw3dRect(rc.left+2, rc.top+5, rc.Width()+1, rc.Height()-3,
RGB(255, 255, 0), RGB(255, 255, 0));
dc.Draw3dRect(rc.left+1, rc.top+4, rc.Width(), rc.Height()-4,
RGB(255, 255, 0), RGB(255, 255, 0));
|
|
|
|
|
hi thanks to replay
its create rectangle successfully .and how to display system time inside this rectangle box
|
|
|
|
|
you have a pointer for the window.
Use GetSystemTime/GetLocalTime to get the time and then CString::Format function to get it in the desired format, after this you can use SetWindowText
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
can u plz write the code snippet for that problem
|
|
|
|
|
I am new to the coding world and in need of money desperately...
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
SYSTEMTIME st;
GetLocalTime(&st);
now in st all values of date time
Use CString Format function to convert in stinrg
|
|
|
|
|
Hi,
I have a class CMainDlg in which there is a button for IPBlocking. I want to take a variable of bool type to show whether the button is clicked or not.
This variable i want to use in another class CSiteVisitor to find out whether the button for IPBlocking was clicked or not.
Please help me what to do.
Thanks In advance.
Dhiraj
|
|
|
|
|
Create the instance of CMainDlg class in your 2nd class and then perform functionality...
|
|
|
|
|
Is there any other way like taking global extern variable
|
|
|
|
|
Dhiraj kumar Saini wrote: I want to take a variable of bool type to show whether the button is clicked or not.
So why not just ask the button if it is currently clicked or not? Do you actually need another variable for this?
"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
|
|
|
|