Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. titlebar text

titlebar text

Scheduled Pinned Locked Moved C / C++ / MFC
help
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ahmed Kamal Aly
    wrote on last edited by
    #1

    I have a problem: I want to display the text in the caption bar as three parts. first part will be left aligned, second part is centered and the third part is right aligned using the title bar font and that runs correctly using different windows themes. Thanks for co-operation

    B J 2 Replies Last reply
    0
    • A Ahmed Kamal Aly

      I have a problem: I want to display the text in the caption bar as three parts. first part will be left aligned, second part is centered and the third part is right aligned using the title bar font and that runs correctly using different windows themes. Thanks for co-operation

      B Offline
      B Offline
      bikram singh
      wrote on last edited by
      #2

      1. Intercept the WM_NCPAINT message for the window 2. Get the width and height of the Titlebar: see the GetSystemMetrics() function in MSDN. 3. To draw the text, use DrawText() (MSDN), and use the lpRect member to specify the rect to draw in. You would need to calculate the 3 rects needed yourself. (left,center,right) HTH Bikram Singh

      1 Reply Last reply
      0
      • A Ahmed Kamal Aly

        I have a problem: I want to display the text in the caption bar as three parts. first part will be left aligned, second part is centered and the third part is right aligned using the title bar font and that runs correctly using different windows themes. Thanks for co-operation

        J Offline
        J Offline
        Jens Doose
        wrote on last edited by
        #3

        I think the only way you can do that is to owner-draw your window title bar. See here: http://www.microsoft.com/msj/0197/c/c0197.aspx Jens

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups