Click here to Skip to main content
15,921,542 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: I got lines written over by other text in a CEdit control Pin
JWood22-Sep-03 9:25
JWood22-Sep-03 9:25 
GeneralRe: I got lines written over by other text in a CEdit control Pin
ASchunk22-Sep-03 9:30
ASchunk22-Sep-03 9:30 
GeneralRe: I got lines written over by other text in a CEdit control Pin
ElizabethC22-Sep-03 11:06
ElizabethC22-Sep-03 11:06 
GeneralRe: I got lines written over by other text in a CEdit control Pin
ElizabethC22-Sep-03 11:21
ElizabethC22-Sep-03 11:21 
GeneralRe: I got lines written over by other text in a CEdit control Pin
JWood22-Sep-03 11:35
JWood22-Sep-03 11:35 
GeneralRe: I got lines written over by other text in a CEdit control Pin
ElizabethC22-Sep-03 12:18
ElizabethC22-Sep-03 12:18 
GeneralRe: I got lines written over by other text in a CEdit control Pin
JWood22-Sep-03 12:32
JWood22-Sep-03 12:32 
GeneralRe: I got lines written over by other text in a CEdit control Pin
ASchunk22-Sep-03 12:56
ASchunk22-Sep-03 12:56 
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;<br />
int cxChar, cyChar; // width and height of a character<br />
cxChar = tm.tmAveCharWidth //the average width of a char<br />
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 straightforwardSuspicious | :suss:

Hope it works
Regards.
Alex
GeneralProgrammers week! Pin
Anonymous22-Sep-03 8:39
Anonymous22-Sep-03 8:39 
GeneralRe: Programmers week! Pin
ASchunk22-Sep-03 9:27
ASchunk22-Sep-03 9:27 
GeneralMaking an interactive periodic table of the elements using VC++ Pin
b_girl22-Sep-03 8:38
b_girl22-Sep-03 8:38 
GeneralRe: Making an interactive periodic table of the elements using VC++ Pin
Terry O'Nolley22-Sep-03 9:32
Terry O'Nolley22-Sep-03 9:32 
GeneralRe: Making an interactive periodic table of the elements using VC++ Pin
b_girl22-Sep-03 9:41
b_girl22-Sep-03 9:41 
GeneralRe: Making an interactive periodic table of the elements using VC++ Pin
Terry O'Nolley22-Sep-03 12:58
Terry O'Nolley22-Sep-03 12:58 
GeneralRe: Making an interactive periodic table of the elements using VC++ Pin
Joaquín M López Muñoz22-Sep-03 10:33
Joaquín M López Muñoz22-Sep-03 10:33 
GeneralRe: Making an interactive periodic table of the elements using VC++ Pin
act_x22-Sep-03 11:02
act_x22-Sep-03 11:02 
GeneralRe: Making an interactive periodic table of the elements using VC++ Pin
Jason Henderson22-Sep-03 11:05
Jason Henderson22-Sep-03 11:05 
GeneralRe: Making an interactive periodic table of the elements using VC++ Pin
Terry O'Nolley22-Sep-03 13:29
Terry O'Nolley22-Sep-03 13:29 
GeneralRe: Making an interactive periodic table of the elements using VC++ Pin
Jason Henderson22-Sep-03 16:18
Jason Henderson22-Sep-03 16:18 
GeneralRe: Making an interactive periodic table of the elements using VC++ Pin
Terry O'Nolley22-Sep-03 16:41
Terry O'Nolley22-Sep-03 16:41 
GeneralRe: Making an interactive periodic table of the elements using VC++ Pin
Jason Henderson22-Sep-03 17:01
Jason Henderson22-Sep-03 17:01 
GeneralRe: Making an interactive periodic table of the elements using VC++ Pin
Terry O'Nolley22-Sep-03 17:14
Terry O'Nolley22-Sep-03 17:14 
GeneralRe: Making an interactive periodic table of the elements using VC++ Pin
b_girl23-Sep-03 3:09
b_girl23-Sep-03 3:09 
GeneralRe: Making an interactive periodic table of the elements using VC++ Pin
Jason Henderson25-Sep-03 9:04
Jason Henderson25-Sep-03 9:04 
GeneralRe: Making an interactive periodic table of the elements using VC++ Pin
b_girl25-Sep-03 9:24
b_girl25-Sep-03 9:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.