Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Resizing SDI app . without using WS_THICKFRAME style

Posted on 2001-09-10
7
Medium Priority
?
1,312 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 3

Accepted Solution

by:
krispols earned 800 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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. …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

719 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