Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.* 1 > Newsgroup comp.lang.xharbour



Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 11-26-2009, 11:26 AM
Michael Hagl
Guest
 
Posts: n/a
Default Is there a wvw_getWindowPos() ??

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


Reply With Quote
Alt Today
Advertising
Google Adsense
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 11-26-2009, 12:09 PM
fatfat
Guest
 
Posts: n/a
Default Re: Is there a wvw_getWindowPos() ??

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
>



Reply With Quote
  #3 (permalink)  
Old 11-26-2009, 01:10 PM
k_dima
Guest
 
Posts: n/a
Default Re: Is there a wvw_getWindowPos() ??

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


Reply With Quote
  #4 (permalink)  
Old 11-26-2009, 01:14 PM
k_dima
Guest
 
Posts: n/a
Default Re: Is there a wvw_getWindowPos() ??

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


Reply With Quote
  #5 (permalink)  
Old 11-26-2009, 05:33 PM
Michael Hagl
Guest
 
Posts: n/a
Default Re: Is there a wvw_getWindowPos() ??

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



Reply With Quote
  #6 (permalink)  
Old 11-26-2009, 08:38 PM
k_dima
Guest
 
Posts: n/a
Default Re: Is there a wvw_getWindowPos() ??

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


Reply With Quote
  #7 (permalink)  
Old 11-27-2009, 07:23 AM
Michael Hagl
Guest
 
Posts: n/a
Default Re: Is there a wvw_getWindowPos() ??

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



Reply With Quote
  #8 (permalink)  
Old 11-27-2009, 03:13 PM
culikr@gmail.com
Guest
 
Posts: n/a
Default Re: Is there a wvw_getWindowPos() ??

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


Reply With Quote
 
Reply

Popular Tags in the Forum
wvwgetwindowpos

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Language 1 | C | C++ | Php | Python | Lisp | Perl | Ruby | Java | Pascal | Basic | Language 2 | Databases | Oracle | Mysql | Access | Drupal
All times are GMT. The time now is 05:24 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.