| | |
open each dialog in the same position
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2008
Posts: 42
Reputation:
Solved Threads: 0
hi
i have created adialog based application where each of them call the other using DoModal().
my question is : if Dialog A is in some position on the screen and then called Dialog B...i want for Dialog B to take the same exactly position as Dialog A .(to be on top of it )...
how can i do that??
thanks
i have created adialog based application where each of them call the other using DoModal().
my question is : if Dialog A is in some position on the screen and then called Dialog B...i want for Dialog B to take the same exactly position as Dialog A .(to be on top of it )...
how can i do that??
thanks
•
•
Join Date: Apr 2008
Posts: 42
Reputation:
Solved Threads: 0
•
•
•
•
DialogA is in a separate exe than DialogB?
You will need to play with the STARTUPINFO structure when you call CreateProcess().
Either that or just set both dialogs to center themselves on the screen or on their parent when they are used.
Hope this helps.
and what do u mean by "set both dialogs to center themselves on the screen or on their parent when they are used.
"
That makes it considerably easier. Just set your dialogues to center themselves on the screen or above their parent window.
You can set this several ways:
1. Set the Position property in the Object Inspector.
2. Position the form in the dialog constructor.
3. Override ShowModal as something like the following:
(I just typed this in off the top of my head. Some adjustments may be necessary, since I tend to use Delphi more than C++Builder for Windows GUI development).
Hope this helps.
You can set this several ways:
1. Set the Position property in the Object Inspector.
2. Position the form in the dialog constructor.
3. Override ShowModal as something like the following:
C++ Syntax (Toggle Plain Text)
int TForm1::ShowModal() { // set form position here ... // pass off to inherited return TForm::ShowModal(); }
Hope this helps.
•
•
Join Date: Nov 2007
Posts: 979
Reputation:
Solved Threads: 209
Here is one example about positioning a dialog box
http://msdn.microsoft.com/en-us/libr....aspx#init_box
You can pass the needed 'parent' dialog information through e.g. your dialogs' constructors.
http://msdn.microsoft.com/en-us/libr....aspx#init_box
You can pass the needed 'parent' dialog information through e.g. your dialogs' constructors.
![]() |
Similar Threads
- BlockRead/BlockWrite problem (Pascal and Delphi)
- spyware sucks (Viruses, Spyware and other Nasties)
- Help removing trojan.cachecachekit. HJT report Inc'd (Viruses, Spyware and other Nasties)
- Hacktool.rootkitvirus Plz Help (Viruses, Spyware and other Nasties)
- TROJAN.CACHECACHEKIT and more(hijackthis incl. (Viruses, Spyware and other Nasties)
- World Antispy present in my PC! Help!! (Viruses, Spyware and other Nasties)
- Help - Most Important Windows Maintenance Tasks (IT Professionals' Lounge)
- Set Accessibility Features for People Who are Blind or Who Have Low Vision in WinXP (Windows tips 'n' tweaks)
Other Threads in the C++ Forum
- Previous Thread: Aligning your screen ouput
- Next Thread: Arithmetic operation using STL
| Thread Tools | Search this Thread |
Tag cloud for C++
api array arrays based beginner binary bmp c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file format forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib library linkedlist linker list loop looping loops map math matrix memory microsoft newbie news number output pointer problem program programming project python random read recursion recursive reference rpg simple string strings temperature template templates test text text-file tree unix url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






