Home
Virtual Image Printer DriverMiraplacid Publisher converts documents to images
Virtual Text Printer DriverMiraplacid Text Driver extracts text from documents
Miraplacid Data ViewerMiraplacid Data Viewer - access to internal structure of a binary file
Miraplacid Text ViewerMiraplacid Text Viewer - access to internal structure of a text file
Common:   Login | Rules of forum | Register
Management:  New topic | Close topic | Move topic | Delete topic
  

Miraplacid Forum >> Software Development >> OnGetMinMaxInfo does not work in MFCModerator:XMan

Author Topic:  OnGetMinMaxInfo does not work in MFC
jn
Member

From: Norway
Email
posted 2004-04-13 02:26:59 Reply -Delete

I have made a sizable dialog but I cannot set a minimum size.
Now I'm close to call MoveWindow from OnSize %-)
Is there a better way to do this?
I have tried OnGetMinMaxInfo, but it does not work.
According to MSDN, it should be called by framework, but framework never calls it.
I figured, that OnGetMinMaxInfo is member of CWnd, so I added it to virtual function overrides section next to DoDataExchange, but it does not help :(

iking
Member

From: US
posted 2004-04-15 06:00:20 Reply -Delete

Remove it from overrides and add to message map.
afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);

MFC knows that OnGetMinMaxInfo shall be binded to WM_GETMINMAXINFO event
but would not do it unless you explicitly ask.

implementation shall look like

void CdialogDlg::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) {
lpMMI->ptMinTrackSize.x = 400;
lpMMI->ptMinTrackSize.y = 300;
CWnd::OnGetMinMaxInfo(lpMMI);
}

you gonna be Ok than

Your message:
Name, password:
Go to category:  

Technical Support

Copyright © Miraplacid, 2003 - 2024