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.
Printable View
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.
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_SIZEBOXQuote:
Originally 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
Right on. Much thanks to ya. Been bugging me for a couple hours hehe
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;
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.