Solved

Resizing SDI app . without using WS_THICKFRAME style

Posted on 2001-09-10
7
1,284 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
Independent Software Vendors: 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!

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
iSeries FTP Exit Program 8 174
Folder Comparison 12 56
How do you programatically show and hide the Windows 10 On-Screen-Keyboard? 3 1,030
Is there a simple front-end menu system. 9 148
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Suggested Courses

752 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