I am trying to make a windows calculator without using a dialog box but I don't want the main window to change size. Can anyone help with this? I am sure it is probably something simple but I am at a loss.
I am trying to make a windows calculator without using a dialog box but I don't want the main window to change size. Can anyone help with this? I am sure it is probably something simple but I am at a loss.
Dohojar Moajbuj
Time is the greatest teacher, too bad it kills all its students
Don't pass WS_SIZEBOX as a style parameter to CreateWindow. If you're using WS_OVERLAPPEDWINDOW as the window style (as most do) then do: WS_OVERLAPPEDWINDOW & ~WS_SIZEBOXOriginally posted by Dohojar
I am trying to make a windows calculator without using a dialog box but I don't want the main window to change size. Can anyone help with this? I am sure it is probably something simple but I am at a loss.
Right on. Much thanks to ya. Been bugging me for a couple hours hehe
Dohojar Moajbuj
Time is the greatest teacher, too bad it kills all its students
Right on. Much thanks to ya. Been bugging me for a couple hours hehe
Dohojar Moajbuj
Time is the greatest teacher, too bad it kills all its students
if you set the ScreenRect to the desired size and location when the app starts.
Then catch and modify the WM_MOVING (to stop movement if needed) and WM_SIZE (to stop resize)
Then just let the default msg processing do its stuff using your original params.
Code:case WM_MOVING: ((RECT*)lParam)->left=rScreenRect.left; ((RECT*)lParam)->right=rScreenRect.right; ((RECT*)lParam)->top=rScreenRect.top; ((RECT*)lParam)->bottom=rScreenRect.bottom; break;
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
I am a beginner for windows designing. And I am also thinking of entering some data and getting back some calculating results from a window, something like your calculator. Could you post your code so than I can have an idea of how to begin my program?
Thanks.