why i get the negative value of font height

Win32 Programming


  • 1. Tool tip display
    I am displaying the Tooltip for perticular static control throuht the subclassing in the WM_MOUSEMOVE message the problem is whenevr i hold mouse on that image tooltip is displaying continuously . But i want it to disapear after few second . can help me to implement this?
  • 2. How to refresh right pane in MMC
    Hi, This question is related to MMC snapin. I dont know exact forum. MMC comes under GUI part so i post it here. The question is If i add some items in scope pane (one item which has some chidren is child of another item), and if i click on left pane on any item then i display its child items in right pane. To display child items in right pane i create my own function where i add all child items in ResultData. CComQIPtr<IResultData, IID_IResultData> spResultData(pConsole); where pConsole belongs to result pane spResultData->InsertItem (item text); Now MMC will delete all previous items which were in result pane and display new items which i just added. For one case i want to display all child items in result pane without clicking on its parent in scope pane. I'm success to insert child items in result pane but previous items in result pane are still there. New items are display after them. I want to know how MMC delete previous items from result pane. I have tried to use following function to delete previous items spResultData->DeleteAllRsltItems() but it doesn't delete previous items.
  • 3. ScollBars in CDialogBar
    Hi, Does any one have any sample application using scrollbar in CDialog Bar. I have placed controls on CDialogBar but when toolbar are dropeed on it, its sizes shrink and the controls do not become visible. I have chnaged the setting for CDialogBar to have Horizontal and Vertical bar. When the scroll bars donot become visible and when scrollbar are clicked, nothing happens ? Any idea how to implement it ?
  • 4. How to correctly draw a themed radio button? (my radio button is always centered)
    Hi, I would like to draw a radio button using Visual Styles/Themes. I manage to draw a radio button using DrawThemeBackground, but the radio button is always centered, not left-aligned. Here is my code: hTheme := OpenThemeData(hWindow, 'BUTTON'); GetClientRect(hWindow, rClientRect); DrawThemeBackground(hTheme, hDC, BP_RADIOBUTTON, RBS_CHECKEDNORMAL, rClientRect, nil); How do i make the radio button left-aligned? Thank you, - Gerben
  • 5. Single byte to double byte
    Greetings, 1) I want to do a file read in which I read single byte but store in a double byte buffer. Is there a way to do a direct read that will fill a double-byte buffer with the results of my single byte read? 2) Similarly, I have a very long single byte string in a buffer in memory. What is the fastest way to get that into a double-byte-defined buffer? Thanks in advance, Tony Duff

why i get the negative value of font height

Postby jaimie » Thu, 26 Oct 2006 15:24:56 GMT

Hi, Below is the part of my code. I am wondering why i get the negative
value of font height

lfptr = (LOGFONT*)(&lpIMC->lfFont);
memcpy( &lf2, lfptr, sizeof( lf2) );
// Convert unicode font face to ANSI encoding
		CP_ACP, 0, (LPCWSTR)lfptr->lfFaceName,
		(LPSTR)lf2.lfFaceName, (int)sizeof(lf2.lfFaceName), NULL, NULL);

lf2.lfHeight <--- which is a negative value.
How do i may into the real height to paint the corrent location?
Thanks in advance.

Re: why i get the negative value of font height

Postby Christian ASTOR » Thu, 26 Oct 2006 16:03:40 GMT


Return to Win32 Programming


Who is online

Users browsing this forum: No registered users and 36 guest