|
-
April 13th, 2004, 07:31 PM
#1
just simple one, not important
Why this doesn't work?
public CMyTestView: class CView
BOOL CMyTestView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
cs.cy = 400;
cs.cx = 200;
return CView::PreCreateWindow(cs);
}
the windows is always big, witdh = 1000.( use mouse clikc to check position).
thanks
-
April 13th, 2004, 08:15 PM
#2
cx and cy are definitions of the position of the window. x and y is what you are really looking for.
Need help with anything related to audio programming? I can help!
-
April 14th, 2004, 11:56 AM
#3
are you sure
cx and cy are the width adn the height of the window, x and y is the position of the left top corner.
-
April 14th, 2004, 12:33 PM
#4
Originally posted by sjcguy
cx and cy are the width adn the height of the window, x and y is the position of the left top corner.
Correct.
Why are you trying to change initial size of the view?
Views are always created as child window of the frame. Of course you can create view as a top window but that is not reasonable.
After creation of a frame and view, frame resizes view to fit frame’s client area.
Instead try to adjust parent’s size.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
April 14th, 2004, 05:16 PM
#5
Yes, my mistake. Thanks
Yeah, i was confused. it should be in CFrameWnd.
thanks.
Btway,
Is there anyway I can find out what is the resolution setting on the current screen?
thanks.
-
April 14th, 2004, 05:27 PM
#6
I think this is what you are after:
GetSystemMetrics(SM_CXSCREEN)
GetSystemMetrics(SM_CYSCREEN)
This will return: Width and height, in pixels, of the screen of the primary display monitor. These are the same values you obtain by callingGetDeviceCaps(hdcPrimaryMonitor, HORZRES/VERTRES).
Em
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
|