Click here to Skip to main content
15,895,799 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Minimum Windows Size (CFormView) :: MFC Pin
Shog929-Oct-02 11:35
sitebuilderShog929-Oct-02 11:35 
GeneralRe: Minimum Windows Size (CFormView) :: MFC Pin
valikac29-Oct-02 12:41
valikac29-Oct-02 12:41 
GeneralRe: Minimum Windows Size (CFormView) :: MFC Pin
Shog929-Oct-02 13:09
sitebuilderShog929-Oct-02 13:09 
GeneralRe: Minimum Windows Size (CFormView) :: MFC Pin
valikac29-Oct-02 13:16
valikac29-Oct-02 13:16 
GeneralRe: Minimum Windows Size (CFormView) :: MFC Pin
Shog929-Oct-02 13:24
sitebuilderShog929-Oct-02 13:24 
GeneralRe: Minimum Windows Size (CFormView) :: MFC Pin
valikac29-Oct-02 13:27
valikac29-Oct-02 13:27 
GeneralRe: Minimum Windows Size (CFormView) :: MFC Pin
Shog929-Oct-02 13:29
sitebuilderShog929-Oct-02 13:29 
GeneralRe: Minimum Windows Size (CFormView) :: MFC Pin
Paul M Watt29-Oct-02 14:59
mentorPaul M Watt29-Oct-02 14:59 
kuphryn wrote:
if the user moves the border 100 pixels, then Windows calls WM_GETMINMAXINFO 100 times and have to set the minimux x and y 100 times

That is an artifact of the Window Full Drag feature of windows (When it updates the window while you are resizing or moving it). If this feature is off, you will get a WM_GETMINMAXINFO once so that windows knows where to create the boundaries to resize the window, then when the user lets go and finalizes the resize you will get a WM_WINDOWPOSCHANGING message which its default processor will generate one WM_GETMINMAXINFO, and finally after all of the sizing is done you will get a WM_WINDOWPOSCHANGED, which its default processor will generate another WM_GETMINMAXINFO message.

When the user has Full dragging selected, windows continually finalizes the sizing loop that is generated, in order to force a WM_NCPAINT and WM_PAINT messages to update the window. If the window finalizes this loop 100 times, you will actually get 200 WM_GETMINMAXINFO messages.

Each message has its purpose. When I spent some time looking at the messages that get generated behind the scenes, I was amazed at the sheer number of messages that were generated just to resize a window, or move the mouse.

Resetting the X and Y values each time the message is handled is the proper way to do it. If you do not do it, then windows will in the DefWindowProc. The best way to handle this message is to just have a set of cached values that you use when you want to change these values from the default.


Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!

GeneralRe: Minimum Windows Size (CFormView) :: MFC Pin
valikac29-Oct-02 16:37
valikac29-Oct-02 16:37 
GeneralRe: Minimum Windows Size (CFormView) :: MFC Pin
valikac29-Oct-02 17:47
valikac29-Oct-02 17:47 
Generalmodifiy IHTMLTable via IHTMLCollection Pin
Member 5194329-Oct-02 10:21
Member 5194329-Oct-02 10:21 
GeneralRe: modifiy IHTMLTable via IHTMLCollection Pin
eXplodus29-Oct-02 10:56
eXplodus29-Oct-02 10:56 
GeneralSelection in CListCtrl Pin
Le centriste29-Oct-02 9:50
Le centriste29-Oct-02 9:50 
GeneralRe: Selection in CListCtrl Pin
Atlantys29-Oct-02 9:57
Atlantys29-Oct-02 9:57 
GeneralRe: Selection in CListCtrl Pin
Joaquín M López Muñoz29-Oct-02 9:58
Joaquín M López Muñoz29-Oct-02 9:58 
GeneralRe: Selection in CListCtrl Pin
Le centriste29-Oct-02 10:01
Le centriste29-Oct-02 10:01 
GeneralRe: Selection in CListCtrl Pin
Joaquín M López Muñoz29-Oct-02 10:03
Joaquín M López Muñoz29-Oct-02 10:03 
GeneralRe: Selection in CListCtrl Pin
Le centriste29-Oct-02 10:20
Le centriste29-Oct-02 10:20 
GeneralSimple/Dumb Question! Pin
Anonymous29-Oct-02 9:13
Anonymous29-Oct-02 9:13 
GeneralRe: Simple/Dumb Question! Pin
User 665829-Oct-02 9:15
User 665829-Oct-02 9:15 
GeneralRe: Simple/Dumb Question! Pin
Anonymous29-Oct-02 22:17
Anonymous29-Oct-02 22:17 
GeneralRe: Simple/Dumb Question! Pin
User 665830-Oct-02 1:56
User 665830-Oct-02 1:56 
GeneralRe: Simple/Dumb Question! Pin
Anonymous30-Oct-02 23:21
Anonymous30-Oct-02 23:21 
GeneralRe: Simple/Dumb Question! Pin
Michael P Butler29-Oct-02 9:26
Michael P Butler29-Oct-02 9:26 
GeneralRe: Simple/Dumb Question! Pin
Navin29-Oct-02 10:53
Navin29-Oct-02 10:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.