def OnMinMaxInfo(self, hwnd, msg, wparam, lparam):
        """Prevent the dialog from resizing vertically by extracting
        the window's current size and using the minmaxinfo message
        to set the maximum & minimum window heights to be its current height.
        """
        dlg_l, dlg_t, dlg_r, dlg_b = wrapped(win32gui.GetWindowRect, hwnd)
        #
        # If returning from minimization, do nothing
        #
        if wrapped(win32gui.GetClientRect, hwnd) == (0, 0, 0, 0):
            return 0
        #
        # MINMAXINFO is a struct of 5 POINT items, each of which
        # is a pair of LONGs. We extract the structure into a list,
        # set the Y coord of MaxTrackSize and of MinTrackSize to be
        # the window's current height and write the data back into
        # the same place.
        #
        POINT_FORMAT = b"LL"
        MINMAXINO_FORMAT = 5 * POINT_FORMAT
        data = win32gui.PyGetMemory(lparam, struct.calcsize(MINMAXINO_FORMAT))
        minmaxinfo = list(struct.unpack(MINMAXINO_FORMAT, data))
        minmaxinfo[9] = minmaxinfo[7] = dlg_t - dlg_b
        win32gui.PySetMemory(lparam, struct.pack(MINMAXINO_FORMAT, *minmaxinfo))
        return 0
dataset/ETHPy150Open tjguk/winsys/winsys/dialogs.py/Dialog.OnMinMaxInfo/swapped operands of `-`