I have a problem with ClientHeight(), wich return a higher value as it should. How can I set a new window position (using user32), without using width and hieght cords (like SetWindow hWND,x,y)?
Here is the code, that reproduce the bug:
[EDIT]
A workaround was to make a purebasic dll function and reposition that window. In the purebasic dll connected it to user32.dll with SetWindowPos function.
[/EDIT]
Here is the code, that reproduce the bug:
WINDOW=CreateWindow("test", (ClientWidth (Desktop ()) / 2) - 320, (ClientHeight (Desktop ()) / 2) - 240, 640+18, 480, 0, 33) TEST=CreateSlider(640,0, 18, ClientHeight(WINDOW), Window,2) hWND=QueryObject(WINDOW,1) x = GetWindowLong(hWnd, -16) x = x Or $10000 ;THE BUG START HERE SetWindowLong (hWnd, -16, x) UpdateWindowMenu WINDOW For i=1 To 10 SetGadgetShape WINDOW,(ClientWidth (Desktop ()) / 2) - 320, (ClientHeight (Desktop ()) / 2) - 240,ClientWidth(WINDOW),ClientHeight(WINDOW) WaitKey Next
[EDIT]
A workaround was to make a purebasic dll function and reposition that window. In the purebasic dll connected it to user32.dll with SetWindowPos function.
[/EDIT]