I got lines written over by other text in a CEdit control
-
I have a CEdit control mapped to a large size text field. When the Read Only box was unchecked, all lines were showing up fine when I scrolled up and down the control. But I have to set the box to Read Only. Once Read Only was checked, when I scrolled up and down using the scrollbar, all text in the edit box was over written by other text. I looked into help but unfortunately was not able to find any information on this problem. Eilzabeth
-
I have a CEdit control mapped to a large size text field. When the Read Only box was unchecked, all lines were showing up fine when I scrolled up and down the control. But I have to set the box to Read Only. Once Read Only was checked, when I scrolled up and down using the scrollbar, all text in the edit box was over written by other text. I looked into help but unfortunately was not able to find any information on this problem. Eilzabeth
-
Sound like an error in Comctl32.dll. Try to get the latest version from MS. (I don't have a link - it can be done with MS's download utility)
-
Hi, the same phenomenon occurs from time to time in Word. Don't know what causes this problem. Are you using the TRANSPARENT property anywhere in your code??? Regards. Alex
Yes, I have to use TRANSPARENT property to set static labels background while setting background color to the form. Eilzabeth
-
Sound like an error in Comctl32.dll. Try to get the latest version from MS. (I don't have a link - it can be done with MS's download utility)
The only download I saw was for Window95, too old. Can you send me the link? Eilzabeth
-
The only download I saw was for Window95, too old. Can you send me the link? Eilzabeth
-
Use the download utility - the one with the the little hard drives on it. J. ---------------------------- I got this "baby on board" sign - Now people will stop intentionally ramming our car.
Can not find it. A url would be greatly appreciated. Eilzabeth
-
Can not find it. A url would be greatly appreciated. Eilzabeth
-
Sound like an error in Comctl32.dll. Try to get the latest version from MS. (I don't have a link - it can be done with MS's download utility)
Hi, you told me that you are using the TRANSPARENT mode for displaying your data. The TRANSPARENT mode usually hides a given rectangle around a text in a window. This rectangle would usually require a certain space to be displayed - visible or not - on the screen. So if you don't leave enough space for your characters - that is the height of a character in a certain font and the space for the rectangle - you may overlap the rectangle of one line with another. Note: the rectangle i am speaking of is an abstract rectangle which cannot be physically displayed. You can calculate the necessary number of space for a specific character by using the following code:
TEXTMETRIC tm; int cxChar, cyChar; // width and height of a character cxChar = tm.tmAveCharWidth //the average width of a char cyChar = tm.tmHeight + tm.tmExtarnalLeading
The TEXTMETRIC structure encapsualtes almost all avaiable information of chars. What your code suffers is a lack of external leading that is the space around a character that is needed to display is. For more information on this structure I refer you to the MFC documentation or Charles Petzold's Programming Windows 5th edition. This may look a bit comlicated but in the end its somewhat straightforward:suss: Hope it works Regards. Alex