Results 1 to 6 of 6

Thread: TBGL_GetWindowClient

  1. #1
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    TBGL_GetWindowClient

    I found a problem with the help material

    This Doesnt work

    [code=thinbasic]TBGL_GetWindowClient( hWnd, variableX, variableY )[/code]

    This works

    [code=thinbasic]TBGL_GetWindowClient hWnd, variableX, variableY[/code]

    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

    [code=thinbasic]DIALOG GET CLIENT hwnd TO VarWidth, VarHeight[/code]

    It seems to just report the total size?





    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: TBGL_GetWindowClient

    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

    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #3
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    Re: TBGL_GetWindowClient

    try this.

    Attached Files Attached Files
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  4. #4
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: TBGL_GetWindowClient

    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
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  5. #5
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    Re: TBGL_GetWindowClient

    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.

    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  6. #6
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: TBGL_GetWindowClient

    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

    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •