getting rid of the standard mfc icon (in taskbar)

i made an application based on mfc, and used the standard mfc icon up until 
now. i thought changing it would be a simple task. in the resource editor i 
got rid of all mfc icons in various resolutions, and replaced it with my own 
icon in 3 different resolutions.

it does work in almost all the places: the main window is shown with the 
correct icon, the taskbar shows correctly with the icon, even MessageBox() 
shows the icon now, but as soon as i do open a MessageBox while my 
main-window is shown, the counter in taskbar moves up to two (you know how 
windows xp groups together tasks with their children, in order to save space 
in the task bar), but now instead of showing my icon, the good old mfc icon 
is displayed instead...!

i wonder where that icon is even coming from? i certainly deleted it out of 
my resources, or am i missing something? i guess it is being pulled out of 
some mfc library. anyone having an idea where it comes from?

or even better, why would windows not use the icon that is registered with 
my main window? is there some SetWindowLong() or anything like that, that i 
have to call, in order to get my own icon displayed in the taskbar? 


0
an6284 (11)
12/18/2005 11:17:59 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
553 Views

Similar Articles

[PageSpeed] 24

You need to make sure your program icon is the 1st one in the icon list in 
the resources.  You can just modify the one that is built automatically, you 
don't have to delete it and create others.

Tom

"Erwin Kloibhofer" <an@invalid.email> wrote in message 
news:uuZ4fkCBGHA.2408@TK2MSFTNGP10.phx.gbl...
>i made an application based on mfc, and used the standard mfc icon up until 
>now. i thought changing it would be a simple task. in the resource editor i 
>got rid of all mfc icons in various resolutions, and replaced it with my 
>own icon in 3 different resolutions.
>
> it does work in almost all the places: the main window is shown with the 
> correct icon, the taskbar shows correctly with the icon, even MessageBox() 
> shows the icon now, but as soon as i do open a MessageBox while my 
> main-window is shown, the counter in taskbar moves up to two (you know how 
> windows xp groups together tasks with their children, in order to save 
> space in the task bar), but now instead of showing my icon, the good old 
> mfc icon is displayed instead...!
>
> i wonder where that icon is even coming from? i certainly deleted it out 
> of my resources, or am i missing something? i guess it is being pulled out 
> of some mfc library. anyone having an idea where it comes from?
>
> or even better, why would windows not use the icon that is registered with 
> my main window? is there some SetWindowLong() or anything like that, that 
> i have to call, in order to get my own icon displayed in the taskbar?
> 


0
tserface (3861)
12/18/2005 11:29:44 PM
thank you for your quick answer. being the first icon in the resources is 
definitely one needs to make sure to cover all cases. thanks for that!

however, in the meantime i found out that my problem was caused by the icon 
cache! after clearing it things worked all fine. this also explains where 
the standard mfc icon came from.

"Tom Serface" <tserface@msn.com> wrote in message 
news:ePcswrCBGHA.272@TK2MSFTNGP09.phx.gbl...
> You need to make sure your program icon is the 1st one in the icon list in 
> the resources.  You can just modify the one that is built automatically, 
> you don't have to delete it and create others.
>
> Tom
>
> "Erwin Kloibhofer" <an@invalid.email> wrote in message 
> news:uuZ4fkCBGHA.2408@TK2MSFTNGP10.phx.gbl...
>>i made an application based on mfc, and used the standard mfc icon up 
>>until now. i thought changing it would be a simple task. in the resource 
>>editor i got rid of all mfc icons in various resolutions, and replaced it 
>>with my own icon in 3 different resolutions.
>>
>> it does work in almost all the places: the main window is shown with the 
>> correct icon, the taskbar shows correctly with the icon, even 
>> MessageBox() shows the icon now, but as soon as i do open a MessageBox 
>> while my main-window is shown, the counter in taskbar moves up to two 
>> (you know how windows xp groups together tasks with their children, in 
>> order to save space in the task bar), but now instead of showing my icon, 
>> the good old mfc icon is displayed instead...!
>>
>> i wonder where that icon is even coming from? i certainly deleted it out 
>> of my resources, or am i missing something? i guess it is being pulled 
>> out of some mfc library. anyone having an idea where it comes from?
>>
>> or even better, why would windows not use the icon that is registered 
>> with my main window? is there some SetWindowLong() or anything like that, 
>> that i have to call, in order to get my own icon displayed in the 
>> taskbar?
>>
>
> 


0
an6284 (11)
12/18/2005 11:50:21 PM
Also, there's an icon cache used by explorer (of which the task bar appears to be a specal
case).  There's some trick to flushing the icon cache, but I don't remember it; maybe
someone else reading this message will give the incantation.
					joe

On Mon, 19 Dec 2005 00:17:59 +0100, "Erwin Kloibhofer" <an@invalid.email> wrote:

>i made an application based on mfc, and used the standard mfc icon up until 
>now. i thought changing it would be a simple task. in the resource editor i 
>got rid of all mfc icons in various resolutions, and replaced it with my own 
>icon in 3 different resolutions.
>
>it does work in almost all the places: the main window is shown with the 
>correct icon, the taskbar shows correctly with the icon, even MessageBox() 
>shows the icon now, but as soon as i do open a MessageBox while my 
>main-window is shown, the counter in taskbar moves up to two (you know how 
>windows xp groups together tasks with their children, in order to save space 
>in the task bar), but now instead of showing my icon, the good old mfc icon 
>is displayed instead...!
>
>i wonder where that icon is even coming from? i certainly deleted it out of 
>my resources, or am i missing something? i guess it is being pulled out of 
>some mfc library. anyone having an idea where it comes from?
>
>or even better, why would windows not use the icon that is registered with 
>my main window? is there some SetWindowLong() or anything like that, that i 
>have to call, in order to get my own icon displayed in the taskbar? 
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
12/19/2005 1:47:08 AM
Reply:

Similar Artilces:

getting a users and usergroups
Hi, This isn't really a mfc question more a win32 question. I've googled and search msdn but I havn't found any good information. I need to (on w2k) make a list of users and usergroups on the domain. any thoughts of what functions I should look in to? thanks /Niklas On Thu, 10 Jul 2003 17:32:04 +0200, Niklas Olsson wrote: >But when I try to enum groups I get back "None" (with both NetGroupEnum and >the NetQuery...) You'd better post your code here (just the NetGroupEnum version) so we can take a look. Just the function that sets up the structs and calls N...

How to get the applications folder path
what is the VBA command to get the application folder path in mac office 2004? Can't be done in VBA: look in the AppleScript dictionary. On 4/12/09 1:09 AM, in article A72637CD-D311-45BE-AA70-7B5AE24CADC5@microsoft.com, "Mac Office Developer" <MacOfficeDeveloper@discussions.microsoft.com> wrote: > what is the VBA command to get the application folder path in mac office 2004? -- The email below is my business email -- Please do not email me about forum matters unless I ask you to; or unless you intend to pay! John McGhie, Microsoft MVP (Word, Mac Wo...

Outlook 2003
When starting Outlook 2003 I get a message to say that it encountered a problem and needs to close - send error report or dont send. Either response brings up another dialog box advising that Outlook failed to start correctly last time and that I should start in safe mode to help correct or isolate a start up problem etc. Choices are - do you want to start Outlook in safe mode - yes or no. The no response returns me to the previous dialogue box while the yes response starts up Outlook in safe mode with all of its limitations (eg, not able to attach a file with an outgoing emai...

Getting row indexes on Range
(I refer to C# code, but answers in VB are welcome) I have a Range in Excel, which includes several cells (the cells the user selected in the Excel sheet). The range might include the following cells A2, B7, G4. This means that the cells might not be connected. If I look at myRange.Cells.Count, it will return 3. If I look at myRange.Row, it will return 2 (if A2 was the first selected row by the user). Now, I need to get the row numbers of all selected rows, so in the above range, I need an int[] of {2, 7, 4}. But I can't see any solution to go through the Cells and get t...

I cannot read forwarded messages. I only get an email address
For some reason, when someone forwards a message to me all that shows up is the email address of the person who originally sent the message. Any ideas? Change your View>Encoding setting. "Michelle10000" wrote: > For some reason, when someone forwards a message to me all that shows up is > the email address of the person who originally sent the message. Any ideas? ...

How do you get the maximum value to display in text box form
In a form, if I have 4 text boxes and 3 of them will contain a number. How do you get the maximum value to display in the 4th. I have tried many different things, I can make it work for a single field in a table, but that finds the value through all records. I just want it to display the max value from the numbers on the form, which could be different for various records. You could use something like this as the Control Source of the 4th text box (the underscore is for ease of reading here, and must be removed from the Control Source): =IIf([Field1]>[Field2] And [Field1]>[Field3],...

Can't get Date Range to work from Form to Report
Hi, I've followed Allen Browne's directions very closely for creating a form for a date range to limit results to that date range on a report and can not get it to work for some reason. I've read many threads on this board which all say the same thing and it seems to work for everyone else. :( Here's what I have: A form with two unbound text boxes called [txtDateBegin] and [txtDateEnd]. The form is called "frmDateRange" and the report is called "Sales Activity Report". The two unbound text boxes are set to "Short Date" format which the user ...

Clear Formatting Icon
I have a client who has a template with Arial 20 pt regular as the default font, with all the master text in Arial. When she clicks the clear formatting icon, the text changes to Helvetica, Grey, 36pt, bold. She checked the master slides to see if it was picking up Helvetica from any of the place holders there, but that's not the casse. Does anyone know where the Helvetica might be coming from? She's using PowerPoint 2007. Thanks! Might be coming from the default shape or textbox. If you create a new manual textbox, what font is used? -- Echo [MS PPT MVP] http:...

How do I get a split screen for mail and calendar in Outlook?
You used to be able to have your calendar on the right and email in the middle on a split screen. I can't find that option anymore and am wondering if it still exists and if so, where. I don't want to have to toggle between email and calendar. Any suggestions? Outlook 2007 - on the to do bar on far right click the "<<" at the top. Opens the To Do bar with calendar that has days with appointments hilited and upcoming appointments listed below calendar. "rakugirl2001" <rakugirl2001@discussions.microsoft.com> wrote in message news:8A5...

Getting rid of blank rows withouth deleting them
Hi, i have a list that looks like this 22 43 22 41 ... I need the list to be together 22 43 22 41 ... However i can't use a macro or something to delete the entire ro because other worksheets are related to the cells, so when i delte th row, the #ref thing apears, somebody know a formula or something tha can help me? Thanks a lo -- sams ----------------------------------------------------------------------- samsg's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1624 View this thread: http://www.excelforum.com/showthread.php?threadid=27725 You could fi...

need to get rid error message
Last month I tried to install Symantec's Winfax software on my XP Pro machine. For whatever reason, it kept crashing during the installation, and I couldn't figure out a way around it. Now whenever I first start Word or Excel, I get an error message that says: Compile error in hidden module: WinFaxPrintAndMerge I can click OK and it goes away, but what do I need to do to make it so that message doesn't appear again? In other words, how do I fix whatever it is that it thinks is wrong? Any help you can provide would be much appreciated. Thanks. By the way, I'm usin...

Getting local Time and date for the local computer(vista OS)
Hi I am working with Vista(one of a kind), and have a MFC application and would like to add small code that will get current time and date from the local compuetr. i meet an example in MSDN : http://msdn.microsoft.com/en-us/library/aa390423(VS.85).aspx but it looks too long for what i am looking, is there a 1 function API that returns the Date and the time ? thanks for your time Zack >Hi I am working with Vista(one of a kind), >and have a MFC application and would like to add small code that will get >current time and date from the local compuetr. >i meet an example in MSDN...

Disabling Standard Icons
I am running Office 2003 and I want to assign a error message to the SAVE icon on the StandardToolbar to disable the standard save function to get the user to use another save button that I have set up on the spreadsheet. I know it can be done because I have it on a spreadsheet someone else set up but I cannot find where they set it up. It needs to be done in such a way that when I send the document (spreadsheet) to other Pc's it will still be setup. Any help would be most apprciated. Look in the macros on the example workbook. Learning wrote: > I am running Offic...

How can I create a sunken icon in the status bar??
Hi, I creates the indicator, but everytime i tried to create the icon, the sunken shape is missing. How can I create the sunken shape??? My code is: In CMainFrame::OnCreate: m_wndStatusBar.SetPaneInfo(5,ID_ICON,SBPS_NORMAL,30); And then, In update event, I enter the icon (the icon can be changed.) m_StatusIcon.Create(&m_wndStatusBar, ID_ICON, WS_VISIBLE | SS_ICON | SS_CENTERIMAGE); HICON icon = (HICON)::LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_SECURED), IMAGE_ICON, 16, 16, LR_SHARED); m_StatusIcon.SetIcon(icon); (I use the classes that was in the codeguru) ...

How to get the envelope back
Hi, A few days ago I got an email, however after reading it the envelope was still in the task bar so I right clicked on it and selected hide envelope. Now the envelope doesn't appear at all, is there a way to get it back? Thanks for your help. The option to turn that back on should be here in OL2003: Tools menu > Options > Email > Advanced "Shaun" <nospam@nospam.com> wrote in message news:eoTmU8UtFHA.1256@TK2MSFTNGP09.phx.gbl... > Hi, > > A few days ago I got an email, however after reading it the envelope was > still in the task bar so I r...

getting rid of the standard mfc icon (in taskbar)
i made an application based on mfc, and used the standard mfc icon up until now. i thought changing it would be a simple task. in the resource editor i got rid of all mfc icons in various resolutions, and replaced it with my own icon in 3 different resolutions. it does work in almost all the places: the main window is shown with the correct icon, the taskbar shows correctly with the icon, even MessageBox() shows the icon now, but as soon as i do open a MessageBox while my main-window is shown, the counter in taskbar moves up to two (you know how windows xp groups together tasks with th...

How to get the resource from Resource Only Dll
hmod=LoadLibrary("testdll.dll"); hr=FindResource(hmod,MAKEINTRESOURCE(504),"GIF"); if(hr == NULL) MessageBox("This is not working"); else MessageBox("This is working"); here, i am try to get the image(gif) resource,which is stored in the dll(for example testdll.dll). Where as image resource type is "GIF" And resource ID is 504. But i am unable to find the resource. But when i try this FindResource(hmod,MAKEINTRESOURCE(501),RT_BITMAP); Where i have also stored an BITMAP file, and tried find the resource . i have succeded in th...

How to spwan(in MFC)?
how to spwan??? Hello, WinExec() system() ShellExecute[Ex]() CreateProcess() Regards, Elias http://www.codeproject.com/system/newbiespawn.asp -- Regards, Nish [VC++ MVP] "�Ϲο�" <fuerza@kebi.com> wrote in message news:bh79mv$m1n$1@news1.kornet.net... > how to spwan??? > > ...

No Sponsoring - We Advertise
No Sponsoring - We Advertise - You Get $8,100 or else we continue to Advertise! Welcome to DollarsBlaster.com! You are invited to join one of the most rewarding financial ventures - online! There is nothing complicated to learn! The entire process is based on two ONE-TIME payments of $9 and a one time hosting fee of $7. But, as you'll learn very quickly, the revenue returned to you can range anywhere, up to $8,100, and above! Are you sick and tired of Sponsoring and Advertising? <O:P></O:P> Join us and we will keep advertising for you until we blast $8,100 in your Pa...

I am trying to get access to display leading zeros and auto numbe
we use a sequential number system that begins new each month but we need it to hold 4 places 0001, 0002. etc. I would like to know if Access will do this. "Donna" <Donna@discussions.microsoft.com> wrote in message news:484176CC-EFDE-48BB-BF18-C5BEFD695710@microsoft.com... > we use a sequential number system that begins new each month but we need > it > to hold 4 places 0001, 0002. etc. I would like to know if Access will do > this. Yes, but ... You can't use the built-in autonumber field to do what you want. Therefore you'll need so...

Finding Desktop region in MFC
I am working on a commercial application, and recently discovered a bug I have been asked to fix (they threw it back in my lap). Run the application on a 2-monitor system, such as a laptop in a dock with an external monitor. Drag the main window to the second (non-taskbar) window and quit. Now move the laptop to a different dock with the second menu on the other side (or without a second monitor at all) and launch the app. Oops. The app continues to want to go on the side it was last put, even though there is now no monitor there. (Yes, my dock in the office and at home have the second ...

How to get the caption?
I write a program what to get text from a window and its subwindow,but sometimes I input a caption like IE,Outlook etc,it display: Default IME Look: CGettextDlg* gl; BOOL CALLBACK GetCont(HWND hCWnd,LPARAM lParam) { char ss[1000]; ::SendMessage(hCWnd,WM_GETTEXT,1000,(LPARAM)ss); gl->m_strEdit2=ss; gl->UpdateData(false); return true; } void CGettextDlg::OnButton1() { // TODO: Add your control notification handler code here CString strName; UpdateData(); strName=m_strEdit1; gl=this; HWND hWnd=::FindWindow(NULL,strName); EnumChildWindows(hWnd,GetCont,0); } how to get ...

why getting event 9551 warnings?
I thought that when you switched to native mode (which we have) that these problems with zombie ACL's went away. Why are we still getting these errors? (running Exch 2003 SP1) Thx, J. ...

How to get rid of error with WFOLADIN.DLL? TIA!
I uninstalled WinFax but I get an error message when I open Outlook 2003 saying "C:\Doc...etc..\wfoladin.dll is not a valid Office AddIn." I looked in the folder though and the file doesn't exist any more. Suggestions on how to get rid of the error message? Much thanks!!! Remove the WinFax Pro extensions in the Add-in Manager (Tools > Options > Other > Advanced Options...) -- Russ Valentine [MVP-Outlook] "scripteez" <scripteez@yahoo.com> wrote in message news:3gkd105q664tsocnhsak0f12h1cnttc3nl@4ax.com... > I uninstalled WinFax but I get an error me...

Did Publisher 2007 get left behind?
Did Publisher 2007 somehow escape the Office 2007 redesign that was done to Word, Excel, etc. I don't see the ribbon and it doesn't appear to be using the .pubx filetype. Publisher is Office's black sheep... -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Lurfys Maw" <invalid@invalid.invalid> wrote in message news:haql44p59ts3k3j7b9rd2nkldnliqrk9qd@4ax.com... > Did Publisher 2007 somehow escape the Office 2007 redesign that was > done to Word, Excel, etc. I don't see the ribbon and it doesn'...