Board index » Visual Studio » Maximized SDI - No resize or move

Maximized SDI - No resize or move

Visual Studio366
Hi Gurus,



I'm building an MFC SDI App that I want initially maximized. I've got it

maximized in the PreCreateWindow(...) in the MainFrame but it's not exactly

the type of maximize I want.



You see, I'm building a kiosk type app that I need to have maximized to the

point where it cannot be moved or resized, just like clicking the Maximize

Button on top right of the window.

I've already tried using WS_MAXIMIZE in the CREATESTRUCT and SW_MAXIMIZED in

ShowWindow(...) but it still allows you to move the window by dragging the

title bar. Once

you've dragged it enough to see the window frame then you can resize the

window too, which isn't good for my situation.



Does anybody know how this is done?





Thanks in advance for any suggestions.


-
 

Re:Maximized SDI - No resize or move

Showing Window maximized will cause window to fill entire client area of the

desktop window. You have to recalculate position and size of the frame to

make a view size same as desktop client.



Search MSDN for 164162 (older Q164162).

There is an old sample program showing how to implement full screen

application.







"KillJoy" wrote:



Quote
Hi Gurus,



I'm building an MFC SDI App that I want initially maximized. I've got it

maximized in the PreCreateWindow(...) in the MainFrame but it's not exactly

the type of maximize I want.



You see, I'm building a kiosk type app that I need to have maximized to the

point where it cannot be moved or resized, just like clicking the Maximize

Button on top right of the window.

I've already tried using WS_MAXIMIZE in the CREATESTRUCT and SW_MAXIMIZED in

ShowWindow(...) but it still allows you to move the window by dragging the

title bar. Once

you've dragged it enough to see the window frame then you can resize the

window too, which isn't good for my situation.



Does anybody know how this is done?





Thanks in advance for any suggestions.







-

Re:Maximized SDI - No resize or move

That's easy enough, in your InitInstace function for your ShowWindow just

change it to



pMainFrame->ShowWindow( SW_SHOWMAXIMIZED );



--

============

Frank Hickman

NobleSoft, Inc.

============

Replace the _nosp@m_ with @ to reply.





"KillJoy" <waicraft@yahoo.com>wrote in message

Quote
Hi Gurus,



I'm building an MFC SDI App that I want initially maximized. I've got it

maximized in the PreCreateWindow(...) in the MainFrame but it's not

exactly

the type of maximize I want.



You see, I'm building a kiosk type app that I need to have maximized to

the

point where it cannot be moved or resized, just like clicking the Maximize

Button on top right of the window.

I've already tried using WS_MAXIMIZE in the CREATESTRUCT and SW_MAXIMIZED

in

ShowWindow(...) but it still allows you to move the window by dragging the

title bar. Once

you've dragged it enough to see the window frame then you can resize the

window too, which isn't good for my situation.



Does anybody know how this is done?





Thanks in advance for any suggestions.









-

Re:Maximized SDI - No resize or move

Great Info RainMan. Found in MSDN just like that! And it was just what I was

looking for.



If anyone is interested (or doesn't have MSDN) I've included a link to the

online article:



support.microsoft.com/kb/q164162/">support.microsoft.com/kb/q164162/







"RainMan" <RainMan@online.nospam>wrote in message

Quote
Showing Window maximized will cause window to fill entire client area of

the

desktop window. You have to recalculate position and size of the frame to

make a view size same as desktop client.



Search MSDN for 164162 (older Q164162).

There is an old sample program showing how to implement full screen

application.







"KillJoy" wrote:



>Hi Gurus,

>

>I'm building an MFC SDI App that I want initially maximized. I've got it

>maximized in the PreCreateWindow(...) in the MainFrame but it's not

exactly

>the type of maximize I want.

>

>You see, I'm building a kiosk type app that I need to have maximized to

the

>point where it cannot be moved or resized, just like clicking the

Maximize

>Button on top right of the window.

>I've already tried using WS_MAXIMIZE in the CREATESTRUCT and

SW_MAXIMIZED in

>ShowWindow(...) but it still allows you to move the window by dragging

the

>title bar. Once

>you've dragged it enough to see the window frame then you can resize the

>window too, which isn't good for my situation.

>

>Does anybody know how this is done?

>

>

>Thanks in advance for any suggestions.

>

>

>





-