Posted: Wed Apr 23, 2003 7:04 pm
Restored from previous forum. Originally posted by Kendrel.
I have coded a little app where i use SetWindowPos() to position the window... here is the code...
OpenPreferences("setpos.ini")
PreferenceGroup("Settings")
AppName.s=ReadPreferenceString("ApplicationName", "")
WindowX.l=ReadPreferenceLong ("WindowX", 0)
WindowY.l=ReadPreferenceLong ("WindowY", 0)
WindowW.l=ReadPreferenceLong ("WindowW", 0)
WindowH.l=ReadPreferenceLong ("WindowH", 0)
ClosePreferences()
handle=findwindow_(0,AppName)
setwindowpos_(handle,#HWND_BOTTOM,WindowX,WindowY,WindowW,WindowH,#SWP_FRAMECHANGED)
the code works and will set the new position once i run my code, but when i minimize (ive tested with icqlite) the programm and maximize again it has the old coordinates (not the one my code sets).
i have tried UpdateWindow() and some other things, but iam stuck on thos one... i have also played with the SetWindowPlacement(), but i dunno if i did something wrong... please help... iam stuck and getting mad...
THX ALOT
kendrel
I have coded a little app where i use SetWindowPos() to position the window... here is the code...
OpenPreferences("setpos.ini")
PreferenceGroup("Settings")
AppName.s=ReadPreferenceString("ApplicationName", "")
WindowX.l=ReadPreferenceLong ("WindowX", 0)
WindowY.l=ReadPreferenceLong ("WindowY", 0)
WindowW.l=ReadPreferenceLong ("WindowW", 0)
WindowH.l=ReadPreferenceLong ("WindowH", 0)
ClosePreferences()
handle=findwindow_(0,AppName)
setwindowpos_(handle,#HWND_BOTTOM,WindowX,WindowY,WindowW,WindowH,#SWP_FRAMECHANGED)
the code works and will set the new position once i run my code, but when i minimize (ive tested with icqlite) the programm and maximize again it has the old coordinates (not the one my code sets).
i have tried UpdateWindow() and some other things, but iam stuck on thos one... i have also played with the SetWindowPlacement(), but i dunno if i did something wrong... please help... iam stuck and getting mad...
THX ALOT
kendrel