Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Problem when resizing a CExtEdit Collapse All
Subject Author Date
Cyril Chevalier Nov 21, 2003 - 10:04 AM

Hi,

Resizing a CExtEdit control seems to change the way the content of the edit box is drawed: the text is slightly shifted to the right and the bottom of the control. Some letters like g or p are partially cut when it happens. You can test this with your sample ProfUIS_Controls. I tried this on Win98, WinNT and Win2000.

I think the problem comes from the method CExtEdit::OnNcCalcSize. I have changed the line 214 from rc.DeflateRect(4,4) to rc.DeflateRect(1,1) and all works fine.

I don’t know if this behavior is normal or if I made a mistake somewhere when I use the control.
Thank you for your help.

Technical Support Nov 23, 2003 - 4:52 AM

Dear Cyril,

CExtEdit only allocates the smallest possible size for its non-client area and paints it. It does not paint the contents of the edit control. So, if there is not enough space for some letters in the edit’s client area, you should increase its height. This also applies to the standard CEdit.

Cyril Chevalier Nov 24, 2003 - 10:39 AM

Hi,

I understand that the CExtEdit control only paint the non client area. But it also drives the size and the position of the non client area when resizing the original size of the control (ie. : the OnNcCalcSize method).

The first display of the control shows a ’normal’ CEdit display position, BUT when you resize the control the Non client area seems to grow up and the client area seems to shrink. Once again, you can see this on your samples. This happens only with CExtEdit, all other controls (like the combo box, for example) are ok. When you put a combo and an edit control side by side, you can see the difference.

Sorry for my bad english. If you want, I can send a mail with some screenshots to show you what I mean.

Thanks for your help and your great library.

Technical Support Nov 24, 2003 - 10:54 AM

OK, we are waiting for your e-mail with the dialog project and screen shot(s) of the edit control. We will try to repeat the edit problem.