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 set Icon?

How to set Icon?

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

    I want to set an icon for my app. I am not using MFC. Its plain Win32. How do I do that? Aljechin Alexander :rose:

    N 1 Reply Last reply
    0
    • C color Aljechin

      I want to set an icon for my app. I am not using MFC. Its plain Win32. How do I do that? Aljechin Alexander :rose:

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      Use WM_SETICON.


      Nibu thomas Software Developer

      C 2 Replies Last reply
      0
      • N Nibu babu thomas

        Use WM_SETICON.


        Nibu thomas Software Developer

        C Offline
        C Offline
        color Aljechin
        wrote on last edited by
        #3

        I dont know how to use that. Can you show one code sample please? :rose: Aljechin Alexander

        stefanmihaimogaS 1 Reply Last reply
        0
        • N Nibu babu thomas

          Use WM_SETICON.


          Nibu thomas Software Developer

          C Offline
          C Offline
          color Aljechin
          wrote on last edited by
          #4

          I do not know how to use that. Can you kindly show some code sample of how to do it? :rose: Aljechin Alexander

          stefanmihaimogaS 1 Reply Last reply
          0
          • C color Aljechin

            I do not know how to use that. Can you kindly show some code sample of how to do it? :rose: Aljechin Alexander

            stefanmihaimogaS Offline
            stefanmihaimogaS Offline
            stefanmihaimoga
            wrote on last edited by
            #5

            HICON hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); PostMessage(hWnd, WM_SETICON, TRUE, hIcon);

            J 1 Reply Last reply
            0
            • C color Aljechin

              I dont know how to use that. Can you show one code sample please? :rose: Aljechin Alexander

              stefanmihaimogaS Offline
              stefanmihaimogaS Offline
              stefanmihaimoga
              wrote on last edited by
              #6

              WM_SETICON Message[^]

              1 Reply Last reply
              0
              • stefanmihaimogaS stefanmihaimoga

                HICON hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); PostMessage(hWnd, WM_SETICON, TRUE, hIcon);

                J Offline
                J Offline
                James R Twine
                wrote on last edited by
                #7

                From the OP:

                I am not using MFC. Its plain Win32. How do I do that?

                Peace! -=- James


                If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
                Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
                DeleteFXPFiles & CheckFavorites (Please rate this post!)

                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