| | |
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 application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator getline givemetehcodez graph iamthwee ifstream image input int java lib list loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






