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++ Library support » TopWindow&PopUp, TrayIcon » How to get top and left position of top window
Re: How to get top and left position of top window [message #31886 is a reply to message #31874] Mon, 04 April 2011 18:29 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

nlneilson wrote on Sun, 03 April 2011 18:14

I had to do a a search with Windows file explorer for "rect" (not case sensitive) and search each file with Notepad++ and finally found "GetRect().left;" and ended with this:
		int leftP = GetRect().left;
		int topP = GetRect().top;

Then it was a simple and straight forward implementation.
Why don't you use theide search functions? E.g. Ctrl+Shift+F for search in files. Also, searching help or this webpage (via the google search box on the left, below menu) is a good idea. Reading Ctrl reference (which you should read just after reading TopWindow reference, since TopWindow inherites from Ctrl) would give you the answer in 15 minutes top.

nlneilson wrote on Sun, 03 April 2011 18:14

I have three computers I use to test with and all have a dual boot with Ubuntu so the Upp window was in 6 slightly different positions. I don't release as finished something like that.

I don't fully understand this... Do you mean that each computer and each OS gives different placement? With default setting or with the position taken from the stored configuration? Also, why do you think it is wrong? There is a lot of factors that influence this: window manager settings, gnome/windows panel width, monitor size etc... If you wish to achieve the same position on all systems (which is IMHO the least important part of design), you can use fixed window size and call CenterScreen() method.


nlneilson wrote on Sun, 03 April 2011 18:14

I don't know anything about "TopWindow::SerializePlacement".
When this is explained with a simple example in the Help docs I may try it.
It IS documented. The description is in the first place where you should look for such function: in the TopWindow reference. There is also an article on saving configuration and even more info can be found on the forum. We all know that U++ documentation is not 100%, but this is not the case. TopWindow, Ctrl and other parts of CtrlCore are very well documented.

Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Windows that cant leave Mainwindow
Next Topic: Restoring TrayIcon control
Goto Forum:
  


Current Time: Thu May 23 21:29:02 CEST 2024

Total time taken to generate the page: 0.02561 seconds