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 » Top starting position of GUI changes.
Re: Top starting position of GUI changes. [message #33130 is a reply to message #33125] Sat, 09 July 2011 13:14 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Neil!

The problem is that you use different coordinates when saving the positions then when setting it. GetRect() in you exit function returns absolute position in pixels, while TopPosZ() and LeftPosZ() work with "zoomed coordinates".

The solution you probably want is to use the "non-Z" functions:
LeftPos(leftP, 280).TopPos(topP, 135);


Best regards,
Honza

PS:
#include <windows.h>
#include <iostream>
#include <fstream>
#include <string>

#include <sstream>
#include <time.h>

#include <iostream>
#include <fstream>
using namespace std;

using namespace std;
These includes at the beginning of your files are useless, and especially the windows.h kind of scared me - it obviously fails to compile on non-windows sytems Wink
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem with GUI_APP_MAIN - example
Next Topic: umk is a virus! according to avira
Goto Forum:
  


Current Time: Fri Jul 18 03:41:06 CEST 2025

Total time taken to generate the page: 0.04393 seconds