• Prevent garbled text when window is maximized

    From Scott Coffey@21:1/5 to All on Fri Jul 12 08:16:26 2024
    Disclaimer: I have low skills in Clipper/xHarbour programming. I
    know enough to keep apps maintained, but my main skill set lies in IBM
    midrange systems.

    I'm porting an app from an older handheld device to Windows 10 in
    tablet mode. The app will sometimes use the tablet mode's OSK for
    input. When I activate the OSK, the xHarbour app that normally runs
    in a "normal" window becomes maximized, and when that happens the text
    becomes garbled... kind of like a stair-step effect.

    I've done extensive searching to find a Windows setting that prevents
    a window from maximizing when launching the OSK, but I haven't found a solution.

    What can I do within xHarbour to prevent the text from shifting when a
    window is resized? (This also happens in my normal desktop apps, but
    it's easy enough to get the window back to its original size. Not so
    easy in tablet mode while using OSK.)
    --
    Scott at Scott dash(-) Coffey dot net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Fri Jul 12 15:16:47 2024
    Did you try

    SETMODE( 25, 80 )

    ?

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Coffey@21:1/5 to e.m.giordano@emagsoftware.it on Wed Jul 17 09:10:09 2024
    On Fri, 12 Jul 2024 15:16:47 +0200, Enrico Maria Giordano <e.m.giordano@emagsoftware.it> wrote:

    Did you try

    SETMODE( 25, 80 )

    ?

    Doesn't help.

    I tried a test where I stepped through the program in (classic) debug
    mode, viewing the application screen (F4) after each line of text is
    written. Not only did the application screen get jumbled when going
    to full screen, but the debug window itself is also corrupted.

    This behavior is seen on a range of different Windows PC's, so it
    doesn't seem to be related to any local video settings.
    --
    Scott at Scott dash(-) Coffey dot net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Coffey@21:1/5 to e.m.giordano@emagsoftware.it on Wed Jul 17 09:24:22 2024
    On Fri, 12 Jul 2024 15:16:47 +0200, Enrico Maria Giordano <e.m.giordano@emagsoftware.it> wrote:

    Did you try

    SETMODE( 25, 80 )

    ?

    OK, found what's causing it, but it doesn't make sense to me.

    This code works OK. I.E. when switching to full screen, the test
    still looks OK:

    function main()
    setmode( 25, 80 )
    @ 0, 0 clear
    @ 1, 1 say 'line 1'
    @ 2, 1 say 'line 2'
    @ 3, 1 say 'line 3'
    wait
    return

    This code doesn't work. The text becomes garbled when switching to
    full screen:

    function main()
    setmode( 25, 80 )
    setcolor( "RB+" )
    @ 0, 0 clear
    @ 1, 1 say 'line 1'
    @ 2, 1 say 'line 2'
    @ 3, 1 say 'line 3'
    wait
    return

    Why does adding the SETCOLOR statement cause this behavior?
    --
    Scott at Scott dash(-) Coffey dot net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Wed Jul 17 16:33:17 2024
    Il 17/07/2024 15:24, Scott Coffey ha scritto:

    Why does adding the SETCOLOR statement cause this behavior?

    I really don't know... :-(

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rob Fum@21:1/5 to Enrico Maria Giordano on Sun Nov 3 18:00:26 2024
    On 17-Jul-24 16:33, Enrico Maria Giordano wrote:


    Il 17/07/2024 15:24, Scott Coffey ha scritto:

    Why does adding the SETCOLOR statement cause this behavior?

    I really don't know... :-(

    Hi Scott,

    if you are running a console application in cmd.exe (Windows Console
    Host) check the properties of the cmd (by clicking the title bar with
    the mouse right button). In the layout tab, in the screen buffer box
    there is a checkbox (wrap text output on resize). Try uncheking it.

    Roberto

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)