Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » How to position dialog in relation to parent window (How to position dialog in relation to parent window)
How to position dialog in relation to parent window [message #43317] Sun, 29 June 2014 15:12 Go to next message
awksed is currently offline  awksed
Messages: 61
Registered: April 2012
Member
How do I position a dialog in relation to its parent.

GetRect()/SetRect() in the dialog constructor fails (presumably because the dialog window has not yet been created).

In which function should I reposition the dialog? Are GetRect()/SetRect() the appropriate calls?

Or is there a simpler way to position a dialog relative to its parent?

Thanks,

awksed
Re: How to position dialog in relation to parent window [message #43343 is a reply to message #43317] Thu, 03 July 2014 17:28 Go to previous message
awksed is currently offline  awksed
Messages: 61
Registered: April 2012
Member
FIXED:-

MyDlg dlg(this);

dlg.Open();

Rect pr = GetRect();
Rect r = dlg.GetRect();
Size s = r.GetSize();

r.top = pr.top + 10;
r.SetSize(s);

dlg.SetRect(r);

dlg.Execute();
Previous Topic: CSV file
Next Topic: How do I get parameters for GetTextSize
Goto Forum:
  


Current Time: Thu Mar 28 14:54:12 CET 2024

Total time taken to generate the page: 0.01026 seconds