Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1013719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:08:50+00:00 2026-05-16T10:08:50+00:00

I’m writing an application for a Pocket PC 2003 device. In it there is

  • 0

I’m writing an application for a Pocket PC 2003 device. In it there is a dialog where various text information is shown. The information is separated so that each piece resides inside its own label, defined as LTEXT in the resource file.

Now my problem is that, at the moment, all text lables have the same font and style (normal or simple, i.e. not bold or italic); I want want one to be set in bold. I know that I can set the font to bold in the resource file, but that sets the style of all labels.

How does one achieve this? I’ve seen it be used in the Windows ‘About’ screen so I know it’s possible. I’ve written the program in C++ using the Win32 API directly (except for certain dialogs where I’ve used the resource file) so I would appreciate if the answer was given in the same language and approach.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:08:51+00:00Added an answer on May 16, 2026 at 10:08 am

    In the resource editor, edit the static text item, and change its control ID to something unique: IDC_BOLD for example.

    In the DialogProc for the dialog boxes that is hosting the control, add a WM_CTLCOLORSTATIC handler:

    case WM_CTLCOLORSTATIC:
      HDC hdc;
      HWND hwndCtl;
      hwndCtl = (HWND) lParam;
      hdc = (HDC) wParam;
    
      if( GetWindowLong(hwndClt, GWL_ID ) == IDC_BOLD )
      {
        SetBkMode(hdc,TRANSPARENT);
        SetTextColor(hdc,RGB(0xff,0,0)); // turn the text red for fun :)
        SelectObject(hdc,hBoldFont);     // but you want this...
        return (INT_PTR)GetSysColorBrush(COLOR_BTNFACE); 
        //return 0L; // if visual themes are enabled (common controls 6) then 0 is better.
      }
      // default processing
      return 0;
    

    You are developing for Pocket PC 2003, I don’t know what buttons styles are available. This Page refers of course to desktop XP. But, if the buttons in the dialogs are not flat grey 95esq buttons, then it might be more appropriate to return 0 as that will paint the text background correctly if the dialogs background is not plain grey.

    Pre-visual styles a return of 0 causes the system to reset the DC so its important to know which return is appropriate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.