first time poster with a windows programming question.
First off I would like to say how great this forum is! I have been looking for a site like thise for a while now. I know for sure that I will be spending a lot of time here!
My question is probably a simple one, but the answer has eluded me from the texts I have been reading and from the net... I am using VC++ 6 and I am making a very basic app. I want to be able to assign a minimum size to the window and if the user trys to make it smaller than that, I want the window to go to its minimum size.
I have only been learning windows progamming for about a week so please be patient if your solutions seem too complex to me at first.
thanks
Mucman
"You don''''t get wise with the sleep still in your eyes." - Neil Peart
"You won't get wise with the sleep still in your eyes." - Neil Peart
MFC or Win32 API?
Either way you need to handle the WM_SIZE event, and change the event data to goto the minimum size if they try to change it smaller.
There may be a more elegant way, but that will work.
Magmai Kai Holmlor
- The disgruntled & disillusioned
Either way you need to handle the WM_SIZE event, and change the event data to goto the minimum size if they try to change it smaller.
There may be a more elegant way, but that will work.
Magmai Kai Holmlor
- The disgruntled & disillusioned
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
|
![](http://baskuenen.cfxweb.net/images/title.jpg)
Sorry, I forgot to mention it was for the win32 API
Here is a portion of my code :
case WM_SIZE :
Width = LOWORD(lParam) ;
Height = HIWORD(lParam) ;
GetClientRect (hwnd, ▭) ;
if ( Width < 200 || Height < 200 )
{
}
InvalidateRect(hwnd, NULL, FALSE);
return 0;
I don''t know what attributes I have to modify... am I changing the attributes of hwnd? or rect? Or am I way off?
thanks for the quick reply btw!!!
"You don''''t get wise with the sleep still in your eyes." - Neil Peart
Here is a portion of my code :
case WM_SIZE :
Width = LOWORD(lParam) ;
Height = HIWORD(lParam) ;
GetClientRect (hwnd, ▭) ;
if ( Width < 200 || Height < 200 )
{
}
InvalidateRect(hwnd, NULL, FALSE);
return 0;
I don''t know what attributes I have to modify... am I changing the attributes of hwnd? or rect? Or am I way off?
thanks for the quick reply btw!!!
"You don''''t get wise with the sleep still in your eyes." - Neil Peart
"You won't get wise with the sleep still in your eyes." - Neil Peart
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement