vendredi 12 mars 2021

Win32api not making window correct size

im using the win32 api and have a basic function that creates a window ->

HWND creWin(HINSTANCE hInst) {
     HWND hwnd = CreateWindow(
        L"sodium2D_class",
        L"name",
        WS_OVERLAPPEDWINDOW | WS_VISIBLE,
        x, y,
        width, height,
        NULL, NULL,
        hInst, NULL
    );
    return hwnd;

but I keep getting out of range errors because I'm trying to write a pixel that is "out" of the bounds of the window, what I need is not to get the size of the window but to set it to the correct size

this is the closest thing I can find on this -> Get exact window region size - CreateWindow window size isn't correct size of window

any help? thanks.

Aucun commentaire:

Enregistrer un commentaire