Solved

Resizing SDI app . without using WS_THICKFRAME style

Posted on 2001-09-10
7
1,244 Views
Last Modified: 2013-11-20
Please help,

I want to create an SDI app WITHOUT the WS_THICKFRAME style' cause my app is a a bitmap skin app. It doesn't look good with a border around it.
So I put following call in the OnCreate () handler.
     ModifyStyle (0, WM_THICKFRAME);  

The thick frame is gone alright, but this would also disable the resizing features of MFC framework. Does anyone know how to turn resizing feature on without the WS_THICKFRAME style?

I don't want to resort to OnLButtonDown()& OnMouseMove() to manually move the main frame window. That would be too much work. Plus, I would also have to manually take care of changing cursor shapes also.

Any help will be appreciated,
Thanks
 
0
Comment
Question by:duchi
7 Comments
 
LVL 3

Expert Comment

by:krispols
ID: 6473462
hmmm, if I understood, you want to redraw the non client area like winamp? In this case you must overwrite the NC_PAINT, and then you keep the resizing.
0
 
LVL 1

Expert Comment

by:TarekEslim
ID: 6474060
well,

did you tried WS_BORDER or WS_SIZEBOX (This last one similar to THICKFRAME)

try to test it.

Now, for no frame window you can not use windows resizing tools and you should do your code for that. If you did, you should do your NC_PAINT.

Regards

Tarek
0
 

Author Comment

by:duchi
ID: 6475267
Hi guys,
When we remove the THICK_FRAME style, we no longer have the "NON CLIENT" area at the edges at the frame; therefore I can't even use OnNCHitTest () and return appropriate values to fool the main frame to resize itself. Check out Paul DiLascia's Q&A in Feb 2001 issue.

So the only option left is to use a brutal force approach: Track mouse movements and resize the main frame using our code. MFC can't help no more when you remove the thick frame style.

Hey, did I give 200 points for this question. I'd take it back, OK.

Cheers,
Duchi
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 3

Accepted Solution

by:
krispols earned 200 total points
ID: 6475896
why you reinvent the wheel? Keep THICKFRAME and overwrite NC_PAINT, I think is easier.
0
 

Author Comment

by:duchi
ID: 6477348
Hi Krispois,

You're right. I've never thought of that.
I'd give it a try. But still I have to paint the areas surounding the view with appropriate images that blend in with its background image. Good suggestion though!

Thanks,
Duchi
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9532226
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: krispols

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Roshan Davis
EE Cleanup Volunteer
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now