Hello...
I have to do a text editor and I have a problem with the caret.I tryed this:
/*
TEXTMETRIC tm;
GetTextMetric(hwnd,&tm);
charwidth=tm.AveCharWidth;
*/
When a button is pressed the new caret position will be:
//xpos=xpos+charwidth
It works for a few characthers like 'a,s' but for others the caret moves to far on right and I don't now if I made a mistake in the code(probably no) or there is a problem caused by the width of the characther.Please tell me what should stand for my variable 'charwidth'.
I have to do a text editor and I have a problem with the caret.I tryed this:
/*
TEXTMETRIC tm;
GetTextMetric(hwnd,&tm);
charwidth=tm.AveCharWidth;
*/
When a button is pressed the new caret position will be:
//xpos=xpos+charwidth
It works for a few characthers like 'a,s' but for others the caret moves to far on right and I don't now if I made a mistake in the code(probably no) or there is a problem caused by the width of the characther.Please tell me what should stand for my variable 'charwidth'.