Results 1 to 2 of 2

Thread: CenterWindow bug fix

  1. #1
    Serf
    Join Date
    Apr 2012
    Posts
    1

    Default CenterWindow bug fix

    in windows mode

    log file

    Setting native video mode to 800, 480 - Fullscreen: 0 Aspect Ratio: 0.00
    Setting screen info to 800, 480, mode 1. Original is 800, 480
    :
    :
    Unloading 3 (interface/summary_bg.rttex)
    Setting native video mode to 800, 479 - Fullscreen: 0 Aspect Ratio: 0.00
    Setting screen info to 800, 479, mode 1. Original is 800, 479
    Entering foreground

    windows size changed 800,480 -> 800,479

    How to fix
    in CenterWindow function
    SetWindowPos(hWnd, NULL, wb - wa, hb - ha, wa*2, ha*2, 0);
    =>SetWindowPos(hWnd, NULL, wb - wa, hb - ha, r.right - r.left, r.bottom - r.top, 0);

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,377

    Default

    Quote Originally Posted by neojzs View Post
    in windows mode

    log file

    Setting native video mode to 800, 480 - Fullscreen: 0 Aspect Ratio: 0.00
    Setting screen info to 800, 480, mode 1. Original is 800, 480
    :
    :
    Unloading 3 (interface/summary_bg.rttex)
    Setting native video mode to 800, 479 - Fullscreen: 0 Aspect Ratio: 0.00
    Setting screen info to 800, 479, mode 1. Original is 800, 479
    Entering foreground

    windows size changed 800,480 -> 800,479

    How to fix
    in CenterWindow function
    SetWindowPos(hWnd, NULL, wb - wa, hb - ha, wa*2, ha*2, 0);
    =>SetWindowPos(hWnd, NULL, wb - wa, hb - ha, r.right - r.left, r.bottom - r.top, 0);
    Thanks, will add!
    Seth A. Robinson
    Robinson Technologies

Bookmarks

Bookmarks

Posting Permissions

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