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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Custome title bar

Custome title bar

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
4 Posts 4 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.
  • J Offline
    J Offline
    john5632
    wrote on last edited by
    #1

    Hello, I need to create some control on title bar of title bar but thought it better to remove title bar and create our own custom title bar. Please suggest how to create own title bar which could move the windows and add other options as well.

    L V _ 3 Replies Last reply
    0
    • J john5632

      Hello, I need to create some control on title bar of title bar but thought it better to remove title bar and create our own custom title bar. Please suggest how to create own title bar which could move the windows and add other options as well.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You probably need to create some sort of subclassed window in order to override the defaults. See Window Styles (Windows)[^] and CWindowImpl Class[^].

      1 Reply Last reply
      0
      • J john5632

        Hello, I need to create some control on title bar of title bar but thought it better to remove title bar and create our own custom title bar. Please suggest how to create own title bar which could move the windows and add other options as well.

        V Offline
        V Offline
        Victor Nijegorodov
        wrote on last edited by
        #3

        This article: [A Technique to Customize the Title Bar of Windows](https://www.codeproject.com/Articles/4471/A-Technique-to-Customize-the-Title-Bar-of-Windows) may be a good start.

        1 Reply Last reply
        0
        • J john5632

          Hello, I need to create some control on title bar of title bar but thought it better to remove title bar and create our own custom title bar. Please suggest how to create own title bar which could move the windows and add other options as well.

          _ Offline
          _ Offline
          _Superman_
          wrote on last edited by
          #4

          The most basic thing to do for your need is to handle the WM_NCHITTEST[^] message. The LPARAM parameter gives you the mouse coordinates on your window and then you figure out if it is over your customized title bar and return HTCAPTION from the message handler. You may also want to check when to return HTCLOSE, HTMAXBUTTON, HTMINBUTTON, HTSYSMENU etc.

          «_Superman_»  _I love work. It gives me something to do between weekends.

          _Microsoft MVP (Visual C++) (October 2009 - September 2013)

          Polymorphism in C

          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