Search Results

Search found 2 results on 1 pages for 'user545142'.

Page 1/1 | 1 

  • get a button font api

    - by user545142
    hi first sorry for my English i try to get a word under mouse now my problem how to get the font of button i try to use IntPtr dc= GetDC(button1.Handle); IntPtr last_font = SelectObject(dc, Font.ToHfont()); Font fon = Font.FromHdc(dc); but it gave me the font of the form and some time gave me error Only TrueType fonts are supported. This is not a TrueType font any body help me

    Read the article

  • Why does GetTextFace always return "system"?

    - by user545142
    I am trying to get the font of controls in other applications. When I try WM_GETFONT, it returns 0. This my code: [DllImport("User32.DLL")] public static extern IntPtr SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam); IntPtr fx = SendMessage(button1.Handle, 0x31, 0, 0); When I use GetTextFace with a button, it always returns "system". This is my code: StringBuilder Buff = new StringBuilder(256); IntPtr dc = GetDCEx(button1.Handle, IntPtr.Zero, DeviceContextValues.Window |DeviceContextValues.Cache | DeviceContextValues.ClipSiblings | DeviceContextValues.IntersectRgn); IntPtr hfont = GetTextFace(dc, 256, Buff); Of course I'm sure I changed the font type. How can I solve this problem? I am using C# under Windows 7.

    Read the article

1