Discussion:
Setting CFrameWnd -window boundaries to be a view
(too old to reply)
JiiPee
2015-10-29 20:39:12 UTC
Permalink
When we create a MDI project the childframes do not cross the view
boundaries of the mainframe. I would like to have this same
functionality when I create a SDI project and manually create a
CFrameWnd windows inside the view of the mainframe. So I want this frame
window have the mainframes views boundaries.... it should not go outside
the view. Is this possible and how? I tried all kind of combinations
with the styles when creating the frame but none worked so far.. the
frame always can go anywhere in the screen.
JiiPee
2015-10-29 21:26:44 UTC
Permalink
Well, after trying again more I got it doing this:
wnd->Create( NULL,"title",WS_OVERLAPPEDWINDOW | WS_BORDER | WS_CHILD
| WS_CLIPSIBLINGS | WS_VISIBLE | WS_CAPTION | WS_THICKFRAME |
WS_MAXIMIZEBOX | WS_MINIMIZEBOX ,
CRect(0,0,500,300),pView, NULL,
0, &ccc);

So pView is the mainframes view. Although these styles do not bring
focus frames to the top - have to find why next :).
Post by JiiPee
When we create a MDI project the childframes do not cross the view
boundaries of the mainframe. I would like to have this same
functionality when I create a SDI project and manually create a
CFrameWnd windows inside the view of the mainframe. So I want this
frame window have the mainframes views boundaries.... it should not go
outside the view. Is this possible and how? I tried all kind of
combinations with the styles when creating the frame but none worked
so far.. the frame always can go anywhere in the screen.
JiiPee
2015-10-29 22:54:15 UTC
Permalink
Why does this CFrameWnd window get no messages, like focus, activate or
move messages? If I change it to WS_POPUPWINDOW it gets all messages?
How to get the messages (am trying to set the focus windows topmost/top
in z order so it can be seen fully, now they are behind others)?
Post by JiiPee
wnd->Create( NULL,"title",WS_OVERLAPPEDWINDOW | WS_BORDER | WS_CHILD
| WS_CLIPSIBLINGS | WS_VISIBLE | WS_CAPTION | WS_THICKFRAME |
WS_MAXIMIZEBOX | WS_MINIMIZEBOX ,
CRect(0,0,500,300),pView, NULL,
0, &ccc);
So pView is the mainframes view. Although these styles do not bring
focus frames to the top - have to find why next :).
Post by JiiPee
When we create a MDI project the childframes do not cross the view
boundaries of the mainframe. I would like to have this same
functionality when I create a SDI project and manually create a
CFrameWnd windows inside the view of the mainframe. So I want this
frame window have the mainframes views boundaries.... it should not
go outside the view. Is this possible and how? I tried all kind of
combinations with the styles when creating the frame but none worked
so far.. the frame always can go anywhere in the screen.
Loading...