|
|||
|
Hi,
I'm searching for a way to get the position of the curent window. I'm using gtwvw. Here there is a function wvw_SetWindowPos() to position the Window. But how to get the pos to save the coordinates ? Michael Hagl |
|
|
||||
|
||||
|
|
|
|||
|
row(), col()
"Michael Hagl" <haglmi@hagl.de> glsD:helokv$qov$1@online.de... > Hi, > > I'm searching for a way to get the position of the curent window. > I'm using gtwvw. Here there is a function wvw_SetWindowPos() to position > the Window. But how to get the pos to save the coordinates ? > > Michael Hagl > |
|
|||
|
As i can see, you need to pass position in pixels to wvw_setwindowpos
() function. So, row(),col() doesn't help. If you need to get absolute position in pixels, use GetWindowInfo api call, instead. http://msdn.microsoft.com/en-us/libr...16(VS.85).aspx On 26 ноя, 13:26, "Michael Hagl" <hag...@hagl.de> wrote: > Hi, > > I'm searching for a way to get the position of the curent window. > I'm using gtwvw. Here there is a function wvw_SetWindowPos() to position the > Window. But how to get the pos to save the coordinates ? > > Michael Hagl |
|
|||
|
As i can see, wvw_SetWindowPos(), have parameters in pixels, so ,
row(), col() will not help you. Use api call GetWindowInfo http://msdn.microsoft.com/en-us/libr...16(VS.85).aspx, to get position in pixels instead row, col On 26 ноя, 13:26, "Michael Hagl" <hag...@hagl.de> wrote: > Hi, > > I'm searching for a way to get the position of the curent window. > I'm using gtwvw. Here there is a function wvw_SetWindowPos() to position the > Window. But how to get the pos to save the coordinates ? > > Michael Hagl |
|
|||
|
Hi,
I have also find the GetWindowInfo() function in user32.dll, but I hoped there is a simpler function. wstruc := {} // or "" or ?? I have no idea nResult := DllCall("User32.DLL",,"GetWindowInfo",wvw_getWindo wHandle(),@wstruc) I dont know how to initialize wstruc ? Michael "k_dima" <dcostenco@gmail.com> schrieb im Newsbeitrag news:2a148892-4bc5-49f7-8c7d-846103b05ce8@j14g2000yqm.googlegroups.com... As i can see, you need to pass position in pixels to wvw_setwindowpos () function. So, row(),col() doesn't help. If you need to get absolute position in pixels, use GetWindowInfo api call, instead. http://msdn.microsoft.com/en-us/libr...16(VS.85).aspx On 26 ???, 13:26, "Michael Hagl" <hag...@hagl.de> wrote: > Hi, > > I'm searching for a way to get the position of the curent window. > I'm using gtwvw. Here there is a function wvw_SetWindowPos() to position > the > Window. But how to get the pos to save the coordinates ? > > Michael Hagl |
|
|||
|
Ok, use this wrapper function, to get info in pixels
func main local l,t,r,b GetWindowInfo(wvw_getWindowHandle(),@l,@t,@r,@b) return #pragma BEGINDUMP #include <windows.h> #include "hbapi.h" HB_FUNC( GETWINDOWINFO ) { WINDOWINFO wi ; GetWindowInfo( (HWND) hb_parnl( 1 ), &wi ); hb_storni(wi.rcWindow.left, 2); hb_storni(wi.rcWindow.top, 3); hb_storni(wi.rcWindow.right, 4); hb_storni(wi.rcWindow.bottom, 5); } On 26 ноя, 19:33, "Michael Hagl" <hag...@hagl.de> wrote: > Hi, > > I have also find the GetWindowInfo() function in user32.dll, but I hoped > there is a simpler function. > > wstruc := {} * // or "" or ?? I have no idea > > nResult := > DllCall("User32.DLL",,"GetWindowInfo",wvw_getWindo wHandle(),@wstruc) > > I dont know how to initialize wstruc ? > > Michael > > "k_dima" <dcoste...@gmail.com> schrieb im Newsbeitragnews:2a148892-4bc5-49f7-8c7d-846103b05ce8@j14g2000yqm.googlegroups.com... > As i can see, you need to pass position in pixels to wvw_setwindowpos > () function. > So, row(),col() doesn't help. > If you need to get absolute position in pixels, use GetWindowInfo api > call, instead.http://msdn.microsoft.com/en-us/libr...16(VS.85).aspx > > On 26 ???, 13:26, "Michael Hagl" <hag...@hagl.de> wrote: > > > > > Hi, > > > I'm searching for a way to get the position of the curent window. > > I'm using gtwvw. Here there is a function wvw_SetWindowPos() to position > > the > > Window. But how to get the pos to save the coordinates ? > > > Michael Hagl |
|
|||
|
It works fine !!!
You are the best !! Thank you very much !! That is also a very good example that show how to use winapi Michael "k_dima" <dcostenco@gmail.com> schrieb im Newsbeitrag news:7250c6a3-b73d-4c11-928d-b3f93a5fba8d@d21g2000yqn.googlegroups.com... Ok, use this wrapper function, to get info in pixels func main local l,t,r,b GetWindowInfo(wvw_getWindowHandle(),@l,@t,@r,@b) return #pragma BEGINDUMP #include <windows.h> #include "hbapi.h" HB_FUNC( GETWINDOWINFO ) { WINDOWINFO wi ; GetWindowInfo( (HWND) hb_parnl( 1 ), &wi ); hb_storni(wi.rcWindow.left, 2); hb_storni(wi.rcWindow.top, 3); hb_storni(wi.rcWindow.right, 4); hb_storni(wi.rcWindow.bottom, 5); } On 26 ???, 19:33, "Michael Hagl" <hag...@hagl.de> wrote: > Hi, > > I have also find the GetWindowInfo() function in user32.dll, but I hoped > there is a simpler function. > > wstruc := {} // or "" or ?? I have no idea > > nResult := > DllCall("User32.DLL",,"GetWindowInfo",wvw_getWindo wHandle(),@wstruc) > > I dont know how to initialize wstruc ? > > Michael > > "k_dima" <dcoste...@gmail.com> schrieb im > Newsbeitragnews:2a148892-4bc5-49f7-8c7d-846103b05ce8@j14g2000yqm.googlegroups.com... > As i can see, you need to pass position in pixels to wvw_setwindowpos > () function. > So, row(),col() doesn't help. > If you need to get absolute position in pixels, use GetWindowInfo api > call, instead.http://msdn.microsoft.com/en-us/libr...16(VS.85).aspx > > On 26 ???, 13:26, "Michael Hagl" <hag...@hagl.de> wrote: > > > > > Hi, > > > I'm searching for a way to get the position of the curent window. > > I'm using gtwvw. Here there is a function wvw_SetWindowPos() to position > > the > > Window. But how to get the pos to save the coordinates ? > > > Michael Hagl |
|
|||
|
Hi
you can use WVW_GETXYFROMROWCOL(row(),Col()) and se this to setwindowpos Regards Luiz On 26 nov, 09:26, "Michael Hagl" <hag...@hagl.de> wrote: > Hi, > > I'm searching for a way to get the position of the curent window. > I'm using gtwvw. Here there is a function wvw_SetWindowPos() to position the > Window. But how to get the pos to save the coordinates ? > > Michael Hagl |
|
|
![]() |
| Popular Tags in the Forum |
| wvwgetwindowpos |
| Thread Tools | |
| Display Modes | |
|
|