Hi, I am trying to catch a message when a dead character is pressed: I created a single document project and tried the following: 1. Add ON_WM_DEADCHAR() and a corresponding OnDeadChar() method 2. Implemented WindowProc() and search for WM_DEADCHAR message. To make sure that keyboard message are catched, I catch WM_KEYDOWN as well and it is works fine. Does someone have a clue how to get a message when a dead key is pressed? Thanks, Udi Raz
udiraz
Posts
-
How to receive a dead character message? -
How do I get font width and height in pixels ?Thanks, I know how ( by using DC::Getpixel() ) but will not take a reasonable time...
-
How do I get font width and height in pixels ?Hi Shraddhan, I get the filling that there is no way to get the real height, but as regarding the width, although I can't help you right now, I think in one of my attempts I got the real width using one of the following methods GetTextMetrics(), GetTextExtentPoint32(). It depands whether you are using a raster font or a open type/true type font. I think that is works for me, but don't remember how. I still trying to find the real height... Udi Raz
-
How do I get font width and height in pixels ?Thanks again for your patience. I checked each of the TEXTMETRIC members and didn't see the answer. tmHeight is the font size and tmOverhang is the extra width if I use Italic or Bold which I use none of them. Still, If I choose "Ariel" with the size X and "Comic Sans MS" with the same size, the display font height are different. In addition, Using the same font, the letter 'a' and the letter 'b' have a different height. Therefore to know the real height of a specific font, the query method needs to the recieve the specific text in addition to the HDC. I am not sure there is such a method and I will be satisfied with known the difference between fonts please advise Thanks in advance, Udi Raz
-
How do I get font width and height in pixels ?Thanks but already tried it all and everything else I found in the msdn regarding fonts. The answer for the height in all methods is the font height. The problem is that fonts don't use the whole width to draw their characters. As a result, if I create a rectangle with the size x, a certain font with the size of x will be drawn perfectly well inside my rectangle but a second font (for Hindi fonts) will be drawn very small. What I need (and start to think there is no such a method) is a method that gives me the true height of the character. Any Ideas?
-
How do I get font width and height in pixels ?Hi All, I want to draw text inside a bounding rect.Therefore I want to change the font size to fit the rect. I am trying to find a way to calculate the text width and height, knowing it's font. Why do different fonts with the same size have different height? Thanks, Udi Raz
-
CString inside CMapOK, Thanks, fixed it.. Udi Raz
-
CString inside CMapWhen I wrote:
typedef CMap MyType; MyType myType;
I got the following error: error C2440: 'type cast' : cannot convert from 'CString' to 'DWORD_PTR' do you know why ? Thanks in advance Udi Raz -- modified at 11:03 Sunday 11th December, 2005