Solved

Redraw after WM_SIZE

Posted on 1998-03-19
1
1,162 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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

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…
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 Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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.

810 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