dialog taskbar icon

This is a discussion on dialog taskbar icon within the Windows Programming forums, part of the Platform Specific Boards category; i cant set the small icon for my dialog. here is what i have tried. Code: HICON hIcon = LoadIcon(Instance, ...

  1. #1
    Unregistered
    Guest

    dialog taskbar icon

    i cant set the small icon for my dialog. here is what i have tried.

    Code:
    HICON hIcon = LoadIcon(Instance, MAKEINTRESOURCE(IDI_ICON));
    			if(hIcon == NULL)
    			{
    				sprintf(str, "%i", GetLastError());
    				MessageBox(hwnd_main, str, "NOTE", MB_OK);
    			}
    				
    			SendMessage(hDlg, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
    but it just makes a blank space in the taskbar next to the dialog name. Any ideas?

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Ok....are you sure the icon is created correctly?....

    The code looks ok.....

    Here's an example I just did to test this with a dailog.......its written for VC++.....have a look and see if there is anything really different....

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789

    Doh

    Would help if I posted the code & stuff..!!..
    Attached Files Attached Files

  4. #4
    Registered User cppdude's Avatar
    Join Date
    Jan 2002
    Posts
    62
    cheers fordy

    i thought that the taskbar icon was a 16x16 and i hadnt made one yet

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with taskbar icon
    By maxorator in forum Windows Programming
    Replies: 2
    Last Post: 05-16-2006, 01:55 AM
  2. Dialog Icon?
    By Devil Panther in forum Windows Programming
    Replies: 1
    Last Post: 08-18-2005, 03:38 PM
  3. Problem with an icon in the TaskBar status area
    By dit6a9 in forum Windows Programming
    Replies: 2
    Last Post: 08-16-2004, 10:33 PM
  4. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM
  5. How do you add an icon to a menu on a dialog?
    By pinkcheese in forum Windows Programming
    Replies: 1
    Last Post: 04-27-2002, 04:27 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21