|
-
September 22nd, 1999, 05:25 AM
#1
HowTo limit the minimal size of window during the usage of a program???
Hi, friends,
i have a problem about the size of framewindow.
My program shows several images with the same size .They are lined regularly . Now when the user resizes the framewindow, namely reduces the width, there should be at least one image to be showed im view area.
I have inserted following codes in CMyView::OnSize().
CRect rect;
GetClientRect(&rect);
if (rect.right <= IMAGEWIDTH)
//IMAGEWIDTH is a macro for the width of the image
{
//SetWindowPos(NULL,0,0,IMAGEWIDTH,rect.bottom,SWP_NOMOVE);
MoveWindow(0,0,IMAGEWIDTH,rect.bottom,TRUE);
return;
}
Now the client area is correctly configured. When the size of the window is per mouse reduced, there is at least one image to be shown in the window.
But the minimal size of the framewindow is lesser than the size of client area. A part of the image is not showed.
How can i limit the minimal size of window during the usage , not at the beginning of the program??
Thanx, ur Softchen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|