Solved

Resizing SDI app . without using WS_THICKFRAME style

Posted on 2001-09-10
7
1,255 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

786 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