Form dimension error

Started by Pietro54, September 20, 2023, 06:41:35 AM

Previous topic - Next topic

Pietro54

Greetings
I'm using Windows 11 / BCX 8.0.5 / PellesC 12.
I'm working on a project with BCX and I'm having some problems with sizing of forms and bitmaps.
If I change the width of the form to 683 x 110 of the Test.bas file the width effective becomes double (see image):
GUI "BCX_SET_FORM_COLOR"

SUB FORMLOAD
    GLOBAL Form1 AS HWND
    Form1 = BCX_FORM("BCX_SET_FORM_COLOR 683 x 110", 0, 0, 683, 110)
    BCX_SET_FORM_COLOR(Form1,QBCOLOR(4))
    CENTER(Form1)
    SHOW(Form1)
END SUB

BEGIN EVENTS
    SELECT CASE CBMSG
        CASE WM_CLOSE
        DestroyWindow(Form1)
        EXIT FUNCTION
    END SELECT
END EVENTS

I tested on three different PCs all with 1366 x 768 pixel screen resolution and I always get the same result.
Is there any problem with recent versions of the compiler?
If I compile the last Acquarium.bas file the size is exact.
Greetings everyone.

Jeff

Try adding PIXELS to your GUI statement:

GUI "BCX_SET_FORM_COLOR", PIXELS

Pietro54

Thanks Jeff
now everything works fine.

Pietro54

Thanks again Jeff. I got confused because many examples work without having PIXELS written on the GUI line.
Good day