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. how to change the icon in title bar in sdi app.

how to change the icon in title bar in sdi app.

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

    how to change the icon in title bar in sdi app.

    N A E 3 Replies Last reply
    0
    • G GANsJob

      how to change the icon in title bar in sdi app.

      N Offline
      N Offline
      nm_114
      wrote on last edited by
      #2

      WM_SETICON or if you're using MFC SetIcon()

      G 1 Reply Last reply
      0
      • G GANsJob

        how to change the icon in title bar in sdi app.

        A Offline
        A Offline
        Anton Mikhalyov
        wrote on last edited by
        #3

        If you're programming with MFC use SetIcon() in your Main Frame class:

        int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
        {
        ...
        HICON hIcon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_SITYPE));
        SetIcon(hIcon, false);
        ...
        }
        
        G 1 Reply Last reply
        0
        • N nm_114

          WM_SETICON or if you're using MFC SetIcon()

          G Offline
          G Offline
          GANsJob
          wrote on last edited by
          #4

          ITS WORKING THANK U

          1 Reply Last reply
          0
          • A Anton Mikhalyov

            If you're programming with MFC use SetIcon() in your Main Frame class:

            int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
            {
            ...
            HICON hIcon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_SITYPE));
            SetIcon(hIcon, false);
            ...
            }
            
            G Offline
            G Offline
            GANsJob
            wrote on last edited by
            #5

            THANK U ITS WORKING

            1 Reply Last reply
            0
            • G GANsJob

              how to change the icon in title bar in sdi app.

              E Offline
              E Offline
              Eytukan
              wrote on last edited by
              #6

              AfxGetApp()->LoadIcon(IDR_MAINFRAME); Replace IDR_MAINFRAME with our ICON ID. ;)


              --[V]-- [My Current Status]

              G 1 Reply Last reply
              0
              • E Eytukan

                AfxGetApp()->LoadIcon(IDR_MAINFRAME); Replace IDR_MAINFRAME with our ICON ID. ;)


                --[V]-- [My Current Status]

                G Offline
                G Offline
                GANsJob
                wrote on last edited by
                #7

                thank u its working

                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