Announcement

Collapse
No announcement yet.

Creating windows by a needed client size ????

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Semen Matusovski
    replied
    > ConsoleWindow %SHOWMAXIMIZED
    I see terrible combination in my program
    Code:
    ConsoleToForeground %Soft
    ConsoleToForeground %Hard
    ConsoleTopMost %True
    ConsoleStretch
    Unf., console should be topmost, because in some OSes task bar overwrites "stretched" window (unlike GUI).
    %Soft is necessary also (I know one situation under 9x)



    ------------------
    E-MAIL: [email protected]

    Leave a comment:


  • Lance Edmonds
    replied
    Console Tools offers a mode to maximize the console to cover as much of the work-area as possible (I believe):
    Code:
    ConsoleWindow  %SHOWMAXIMIZED
    However, the ability for the console window to completely cover the work-area depends on the font being used and the OS platform. As I understand it, under Win9x and with Courier New being used, ConsoleWindow %SHOWMAXIMIZED will fill the work area.

    I'm sure Eric Pearson will correct or expand on this exxplanation if necessary.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Mike Doty
    replied
    Would like to stay in windowed mode and leave a 1-line
    task bar at any screen resolution.


    ------------------

    Leave a comment:


  • Edwin Knoppert
    replied
    Sorry, thought it was a new request..

    ------------------
    http://www.hellobasic.com

    Leave a comment:


  • Lance Edmonds
    replied
    The console client size is determined by the console font. The window can be resized lower with the automatic introduction of scrollbars within the console.

    Mike, what exactly do you want to achieve?



    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Mike Doty
    replied
    Don't know how everybody finds this stuff!
    I need an index to the index.



    ------------------

    Leave a comment:


  • Edwin Knoppert
    replied
    AdjustWindowRect ??


    ------------------
    http://www.hellobasic.com

    Leave a comment:


  • Mike Doty
    replied
    Is there a similar method with a console program?


    ------------------

    Leave a comment:


  • Dave Navarro
    replied
    Create your window any size.

    In your WM_INITDIALOG (or WM_CREATE) handler, call GetClientRect() to get the size of the client area. Subtract the current height from the height you want and add it to the size of the whole window in a MoveWindow call. Off the top of my head...:
    Code:
    CASE %WM_INITDIALOG
      GetWindowRect wr
      GetClientRect cr
      x  = wr.nLeft
      y  = wr.nTop
      xx = (wr.nRight - wr.nLeft) + (DesiredX - (cr.nRight - cr.nLeft))
      yy = (wr.nBottom - wr.nTop) + (DesiredY - (cr.nBottom - ct.nTop))
      MoveWindow hWnd, x, y, xx, yy, %TRUE
    --Dave

    Leave a comment:


  • E B Knoppert
    Guest replied
    Sure i get it, you'll need a hidden window to determine caption height.
    Yes i know getsystemmetric can help you out but, what if the topmenu is spread out over multiple rows?

    Use clientToscreen to determine height of client <> top of window, same with the border..


    Leave a comment:


  • Chris Boss
    started a topic Creating windows by a needed client size ????

    Creating windows by a needed client size ????

    Hi PB Users;

    I have a question:

    It is easy to create a window by the size of the entire window. What I need is the ability to calculate the needed size of my client area (which will vary) and then figure out how much bigger the actual window will have to be (including title bar and dialog frame and menu ), so my client area is the correct size.

    Lets, say I need my cient area to be 600 X 400 pixels. How would I calculate the extra needed for the Title bar, dialog frame and menu, so I can send the correct size for the window to CreatewindowEX ? Lets say the title bar added 16 pixels, the frame 6 pixels on all sides and the menu 16 pixels. If I needed a 600 x 400 client area, then window would have to be (600 + 6 + 6) x (400 + 6 + 6 + 16 + 16)

    or 612 x 448

    Do you get it ?

Working...
X