Solved

Redraw after WM_SIZE

Posted on 1998-03-19
1
1,152 Views
Last Modified: 2013-11-19
I have an mfc-application that I want to be able to resize, so whenever I get a WM_SIZE message  I recalculate the size of each control in the window. If I resize horizontally everything works fine, but if I resize vertically the window and the controlls are not repainted correctly. If I get a WM_PAINT message due to minimize or another window ontop it looks great, but how do I set the window to repaint automaticly as it does when resizing horizontally?

I know there are styles as CS_VREDRAW and CS_HREDRAW which should be set when registrating the class, but since mfc does that for me I have no clue in how to do this.

/ Andreas
0
Comment
Question by:cost
1 Comment
 
LVL 2

Accepted Solution

by:
mnguyen021997 earned 100 total points
ID: 1317095
how about invalidaterect() and updatewindow()?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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: 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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

747 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

11 Experts available now in Live!

Get 1:1 Help Now