Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

icon on taskbar button 1

Status
Not open for further replies.

stephd

Programmer
Nov 22, 2002
22
0
0
FR
Hi,

I've a dialog without title bar, so the button in the taskbar has no icon and no text. With a SetWindowText in the OnInitDialog, i can set a text for this button, but i really don't know how to set the icon... Is it possible and if yes, how ?

note : when i press alt-tab to show all the window actually opened, there is my dialog based application with its icon...

thanks a lot for any help !

Stephd
 
Have you tried using SendMessage / WM_SETICON ?
I don't know, but who knows.... it might just work
Greetings,
Rick
 
yes, in the OnInitDialog, there is theses two lines :

SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon

So the WM_SETICON message is used... but it does not work...

thanks anyway for your answer

S.
 
In fact, it is quite strange because it depends on the OS. On win 98 or win Me, there is no icon in the task bar button, but on Win XP pro, the icon is well displayed... So i suppose it is a windows problem... Is there anyway to display the icon on win 98/Me ?...

S.
 
Check out Q249291 - "BUG: Dialog Editor Doesn't Permit a Taskbar Icon if the Titlebar Is Off" on the MSDN. I think this explains exactly what your problem is and a workaround...
Greetings,
Rick
 
thanks a lot for your search ! it is exactly my problem :)

S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top