PDA

View Full Version : TBGL_GetWindowClient



Michael Clease
20-01-2008, 11:47
I found a problem with the help material

This Doesnt work


TBGL_GetWindowClient( hWnd, variableX, variableY )

This works


TBGL_GetWindowClient hWnd, variableX, variableY

Perhaps the TBGL section could do with a Help section like the thinbasic one.

and I also have a question about its use, Is it supposed to report the work area of a window like


DIALOG GET CLIENT hwnd TO VarWidth, VarHeight

It seems to just report the total size?

Petr Schreiber
20-01-2008, 11:57
Hi Abraxas,

thanks for reporting this, parenthesis problem will be fixed in release 0.2.2

Regarding functionality, I am sure it is correct.

When you create window, the window resolution parameters specify size of client area ( without any decorations like titlebar and borders ), not whole window in windowed mode. If this is not evident, I will update it in the help file. So you will always get the same "canvas" size in pixels, doesn't matter if fullscreen or windowed. I think this feature brings more pluses than minuses.

Functionality of TBGL_GetWindowClient is the same as DIALOG GET CLIENT, but you don't have to include the UI module.


Hope it is clear now,
Petr

Michael Clease
20-01-2008, 12:03
try this.

Petr Schreiber
20-01-2008, 12:06
Hi Abraxas,

this only affirms what I have just said.

TBGL_CreateWindowEx ( Caption, XRes, YRes, BitDepth, FullscreenFlag )

... XRes, YRes specify size of client area, not whole window. It is setup of targeted resolution of graphics, not window size.


Thanks,
Petr

Michael Clease
20-01-2008, 12:30
add this before making the window

TBGL_GetDesktopInfo( Scrn_SizeX, Scrn_SizeY, Scrn_Depth )

That was what I had done but it reports that the width is the maximum of the screen but when in window mode it has a border down the sides so it cant be.

Petr Schreiber
20-01-2008, 12:37
Hi,

with addition of
TBGL_GetDesktopInfo( Scrn_SizeX, Scrn_SizeY, Scrn_Depth )

it is possible there is problem in windowed mode - you force to create window which will finally be bigger than desktop.
In this case I can see client area width is ok, but height was changed to what it should be.
( passed in my case: 1280, 1024; retrieved 1280, 998 ). In fullscreen all ok.

I will check this!

I have to go now, so I will report a bit later.


Thanks a lot,
Petr