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   |
|
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
|
|
|
Goto Forum:
Current Time: Fri Jul 18 03:41:06 CEST 2025
Total time taken to generate the page: 0.04393 seconds
|