简体   繁体   中英

MFC VS2010 Dialog Box Won't Get Smaller

I am editing a GUI with Visual Studio 2010. In the resource view I have sized the GUI as in the picture below.

在此处输入图片说明

However when I run the program this is what it looks like.

在此处输入图片说明

As you can see the dialog box is bigger than what it's supposed to be. Does anyone know what could be causing this and how to fix it? As some additional information this is the .rc code for the dialog box. Also this is the main application window, not a popup.

在此处输入图片说明

Solved it. Turns out there was a routine called OnGetMaxMinInfo . After changing the values the window sized according to those values.

void GEVPlayerDlg::OnGetMinMaxInfo( MINMAXINFO *lpMMI )
{
    lpMMI->ptMinTrackSize.x = 480; //was 800
    lpMMI->ptMinTrackSize.y = 460; //was 517
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM