Solved

Resizing SDI app . without using WS_THICKFRAME style

Posted on 2001-09-10
7
1,295 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

627 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