Home > Software engineering > Maximize window or adjust the size drop-down list box after Combo box does not display the drop-down
Maximize window or adjust the size drop-down list box after Combo box does not display the drop-down
Time:09-21
I use Visual Studio 2008 set up a dialog box procedure, using MFC to achieve maximum window size or adjust the options in the drop-down list after showed no, can't the drop-down displays all the options, I call GetDlgItem - & gt; ResetContent and GetDlgItem - & gt; AddString doesn't solve the problem, first thank you,
void CSimApplianceDlg: : ReSize (void) { Float FSP [2]. POINT Newp;//get the size of the dialog now CRect recta; GetClientRect (& amp; Recta);//in the client area size Newp. X=recta. Right - recta. Left; Newp) y=recta) bottom - recta. Top; FSP [0]=(float) Newp. X/old. X. FSP [1]=(float) Newp. Y/old. Y; CRect the Rect. Int woc. CPoint OldTLPoint TLPoint;//the top left corner CPoint OldBRPoint BRPoint;//at the bottom right HWND hwndChild=: : GetWindow (m_hWnd, GW_CHILD);//list all control While (hwndChild) { Woc=: : GetDlgCtrlID (hwndChild);//ID GetDlgItem (woc) - & gt; GetWindowRect (the Rect); The ScreenToClient (the Rect); OldTLPoint=the Rect. TopLeft (); TLPoint. X=long (OldTLPoint. * x FSP [0]). TLPoint. Y=long (OldTLPoint. * y FSP [1]). OldBRPoint=the Rect. BottomRight (); BRPoint. X=long (OldBRPoint. * x FSP [0]). BRPoint. Y=long (OldBRPoint. * y FSP [1]). The Rect. SetRect (TLPoint BRPoint); GetDlgItem (woc) - & gt; MoveWindow (the Rect, TRUE); HwndChild=: : GetWindow (hwndChild GW_HWNDNEXT); } Old=Newp; }