resizing a view
-
How would one resize a CView derived view based on a LPRECT structure? I have tried using SetWindowPos() but with no luck. Any help would be appreciated. Thank you.
-
How would one resize a CView derived view based on a LPRECT structure? I have tried using SetWindowPos() but with no luck. Any help would be appreciated. Thank you.
You need to resize the frame window that the view is inside. Neville Franks, Author of ED for Windows. www.getsoft.com Make money with our new Affilate program
-
You need to resize the frame window that the view is inside. Neville Franks, Author of ED for Windows. www.getsoft.com Make money with our new Affilate program
can you eloborate with some sample code. I was under the impression that I needed to resize the Frame window as well I tried to do SetWindowPos(((CMainFrame*)AfxGetMainWnd()), 0, 0, 50, 50, NULL) to see if it worked.. but that didn't work.. I also tried SetWindowPos(GetParent()....) but that didn't work either.
-
can you eloborate with some sample code. I was under the impression that I needed to resize the Frame window as well I tried to do SetWindowPos(((CMainFrame*)AfxGetMainWnd()), 0, 0, 50, 50, NULL) to see if it worked.. but that didn't work.. I also tried SetWindowPos(GetParent()....) but that didn't work either.
To resize the view I'd try:
GetParentFrame()->SetWindowPos( &wndTop, 0, 0, 100, 100, SWP_NOACTIVATE | SWP_NOMOVE );
from within a derived CView class function. ie. 'this' = your view. or use:GetMyView()->GetParentFrame()->SetWindowPos( ... )
from code outside of the view. Of course the parent frame needs to be in its restored (normal) size, not maximized for this to work. Neville Franks, Author of ED for Windows. www.getsoft.com Make money with our new Affilate program