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 » U++ TheIDE » U++ TheIDE: Layout (Forms) Designer » Child window position
Child window position [message #20565] Mon, 23 March 2009 15:34 Go to next message
darthspawn is currently offline  darthspawn
Messages: 58
Registered: February 2009
Member
I tried in every way to set the position of a ControlOkCancelLayout, but every time the window is opening at the center of the application.
SetPos, SetFramePos, SetRect, SetFrameRect... I don't know how to move that window!

The only difference is whent i do a noCenter on the new layout, and it's opening in Top and left part of the monitor, but I can't be able to move it.

Thanks to everyone
Re: Child window position [message #20567 is a reply to message #20565] Mon, 23 March 2009 15:52 Go to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Are you trying to set the window position before calling CtrlLayout? CtrlLayout calls GetRect, so you must make your changes after it:

	CtrlLayoutOKCancel(*this, "Window title");
	// Set only the size of the window
	Rect r = GetRect();
	r.SetSize(100, 100);
	SetRect(r);
	
	// Set size and position
	SetRect(50, 50, 200, 200);
	NoCenter();

Previous Topic: Creating OCX Controls Using U++ Tutorial
Next Topic: Can't return to Visual Layout Designer
Goto Forum:
  


Current Time: Sun Aug 18 06:36:18 CEST 2019

Total time taken to generate the page: 0.09380 seconds