Icon on the task bar but not on the window?

I tried this with 2 plain MFC wizard apps

1. MDI application -- the icon is displayed on the task bar and on the top 
left corner of the main Window
2. SDI application -- the icon is displayed on the task bar but not on the 
top left corner of the Window

I am trying to change that icon of the SDI app -- but to no avail.

Any help....please...

Thanks,

Brenda 


0
janiceb (2)
9/30/2005 12:30:48 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
530 Views

Similar Articles

[PageSpeed] 38

Hi,

To change the icon, put the couple of lines into CMainFrame::OnCreate:

HICON hIcon = AfxGetApp()->LoadIcon(IDI_YOURICON);
SetIcon(hIcon, 0);

-- 
======
Arman


"Brenda Black" wrote:

> I tried this with 2 plain MFC wizard apps
> 
> 1. MDI application -- the icon is displayed on the task bar and on the top 
> left corner of the main Window
> 2. SDI application -- the icon is displayed on the task bar but not on the 
> top left corner of the Window
> 
> I am trying to change that icon of the SDI app -- but to no avail.
> 
> Any help....please...
> 
> Thanks,
> 
> Brenda 
> 
> 
> 
0
armancho_x1 (249)
9/30/2005 5:37:01 AM
ok -- i've found the solution in an old thread.
There is a bug in the MFC framework (at least from 1997....) and we should 
add this line:

    AfxGetMainWnd()->SetIcon(AfxGetApp()->LoadIcon(IDR_MAINFRAME), FALSE);

This solves the problem.

"Brenda Black" <janiceb@anonymous.com> wrote in message 
news:uYpieZVxFHA.2212@TK2MSFTNGP15.phx.gbl...
>I tried this with 2 plain MFC wizard apps
>
> 1. MDI application -- the icon is displayed on the task bar and on the top 
> left corner of the main Window
> 2. SDI application -- the icon is displayed on the task bar but not on the 
> top left corner of the Window
>
> I am trying to change that icon of the SDI app -- but to no avail.
>
> Any help....please...
>
> Thanks,
>
> Brenda
> 


0
janiceb (2)
9/30/2005 5:39:23 AM
Reply:

Similar Artilces:

text fields... windows?
i was really surprised to learn that listboxes and edit controls are actually windows (as in stuff you can make with createwindow). what i was wondering is... are text fields (those fields with one line) also windows? are they just a special case of the edit control? thanks for the help. i'm a novice, so plz don't laugh anonymous@coolgroups.com wrote: > i was really surprised to learn that listboxes and edit > controls are actually windows (as in stuff you can make > with createwindow). what i was wondering is... are text > fields (those fields with one line) a...

Can you control the size of the formula bar?
I have been encountering a problem with the excel formula bar and I thought I'd see if anyone here knew of a solution. Some of the formula's in my models can get quite long and when this happens the formual bar expands to 2 sometimes 3 lines. The problem with this is that now my column headers (i.e. AA, AB, AC...etc) are no longer visible. Does anyone know of a way to make sure my column headers are always visible when the formula bar expands to 2 or more lines? Thanks...AJ -- AJ Master ------------------------------------------------------------------------ AJ Master's Pro...

Gray icon from icon
Is there any system-fn to paint a given icon in grayscale? ...

how i do enable icons in excel
some of icons doesnt work like chart , scenario ... when i go to customise its appear active when i closed its back to an active how can slove this problem thanks salah If the workbook is shared Insert>Chart and Tools>Scenarios will be grayed out(unavailable). Check at Tools>Share Workbook to see if book is shared. Gord Dibben Excel MVP On Sun, 24 Apr 2005 03:24:07 -0700, "salah" <salah@discussions.microsoft.com> wrote: >some of icons doesnt work like chart , scenario ... > >when i go to customise its appear active when i closed its back to an activ...

Icons and transparency
Hi guys I have 32*32 16 color icon, but I need a transparent background on it. I'm using it on a column header but I get a white background with what I thought was the transparent colour. I have used the VS7 icon editor, but it's not clear how to set the transparent colours. Any help would be most appreciated. TIA Tony In the header of which control are you trying to show the icon? Is it a list view, an owner drawn control, a third part control...? How are you loading the icon? From where the icon come from? Is it inside an image list? -- Regards Rodrigo Corral Gonz´┐Żlez...

Graph question
Hello ! I would like to create a bar graph for say 7 days showing hotel occupancy levels For each day I have this data: A) budget room nights first 5 days at 50 rooms each night, last 2 days 75 rooms each B) Actual room nights (and this is where it gets tricky.) The actual room nights comes from 2 sources: the actual reserved guests who arrived + the "walk-ins" (who didnt have a reservation) Results for the week: Reserved WALK-ins Total Budget Monday 40 5...

how to make sure a xsl document has valid xsl syntax? i tried loading it into an xml document but that doesnt show syntax errors inside attributes such as "foo/bar" vs "bar\foo"
how to make sure a xsl document has valid xsl syntax? i tried loading it into an xml document but that doesnt show syntax errors inside attributes such as "foo/bar" vs "bar\foo" Daniel wrote: > how to make sure a xsl document has valid xsl syntax? i tried loading it > into an xml document but that doesnt show syntax errors inside attributes > such as "foo/bar" vs "bar\foo" System.XML performs only checks for the well-formedness of Documents, not for validity. You need a Schema for XSLT wich defines Regular Expressions to check for "sy...

Assigning task to another resouce in Project server
I have a Project server 2007 installed on a Single server. All users updates their tasks using Outlook 2007 Plug-In synchronized to Project server. One of the task was assigned to a resource X. A new resource Y was added to project and the Task assigned to resource X was re-assigned to resource Y. When resource Y synchronize tasks using outlook 2007, the re-assigned task was reflected in resource Y's tasks list in outlook 2007. But resource X also has the same task listed as it was not removed from outlook 2007 task for resource X. How do I fix this? i,.e I would l...

Is there an "expand all" icon for the "by sender" view?
Wow, was playing around with all the views this morning and came across the "by sender" one. It could be super fantastic. It's not good as it is now as the default mode doesn't help much, and I couldn't seem to find it, but was hoping someone could point me in the right direction to where the "expand all" feature for it. Thanks so much! ...

Printing Task with monthly calendar
I want to only print the tasks on the monthly calendar that are due in that month. Currently all tasks are included for each month printed. I print out 3 to 6 months at a time. Are you using Outlook 2003? If so, the TaskPad printing all tasks is a known issue... -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the newsgroup to preserve the message thread. *** In news:61d601c47516$535d24c0$a601280a@phx.gbl, Mary wrote: > I want to only print the tasks on the monthly calendar > that are due in that month. Cu...

Notification Area System Icons Have Disappeared
When I go to the Notification Area properties, only the "Clock" option is checked. The "Volume", "Network", and "Power" options are un-checked AND grayed-out so I can't check them. How do I get these system icons back? (I'm running Vista Home Premium-SP2, and the only recent changes have been "Windows Updates" - critical updates only.) Thanks. -- Bob C. Updates will do that sometimes. When it happens to me, I reboot a second time and then check the boxes again. If that doesn't work, I go to the Network Manag...

Set task subject in workflow
Hi! I have created a workflow in CRM 4.0 which creates a reminder task every time a case is created. The task subject is based on the task subject and created when I convert an email to a case. I would like to be able to change the case subject, save the case and then let the workflow create the task. Often the customer creates email with subject "Problem" or "Error" which isn't a helpful case subject. How can I let the task creation be "delayed" so that I can correct the case subject and then get a correct task subject? ...

Recovery Storage Group no tasks if i right click
Trying to recover a users mailbox, or some data from it. I have successfully mounted a recovery store. However there are no tasks when I right click. all the mailboxes show up in the list, just can't right click and get tasks. Similar to this how-to guide. Can anyone help please, Thanks http://www.microsoft.com/technet/prodtechnol/exchange/2003/RMD.mspx I suppose that you have SP1 for Exchange ? Nebojsa Seslija <pmettes@gmail.com> wrote in message news:1113086631.119568.122400@f14g2000cwb.googlegroups.com... > Trying to recover a users mailbox, or some data from it. I have ...

HELP Outlook send/receive mail icon every 30 or so seconds
I am running office xp, outlook 2002. I just installed dsl broadband with a dual connect modem. The broadband tech originally set modem up as bridge and all was fine except I had to use windows dialer for connection. Next tech resolved the problem ?? by setting modem up as router. BIG TROUBLE, Outlook would hang, slow loadup and just have all sorts of problems. I did a system restore and brought system back to where modem was before it was changed to a router. Problem is, outlook is now showing the send/receive mail icon every 30 seconds, however it is not actually sending or receivi...

Icon Sets Conditional Formatting in Excel 2007
So, I want to be able to use the Icon Sets in conditional formatting with text values. I bet there are a bunch of other people out there that would like to have the text "green", "yellow" or "red" converted to the appropriate stoplight icon, but I cannot figure out how to make this work. Is it possible? Excel 2007 Icons Maybe not quite what you wanted... http://www.mediafire.com/file/dytjrggnxbm/09_26_09.xlsx On Sep 26, 9:27=A0am, Herbert Seidenberg <herbds7-ms...@yahoo.com> wrote: > Excel 2007 > Icons > Maybe not quite what you wanted...http://ww...

Spitter windows and dialog bars
Can just 1 pane in a splitter window have a dialog bar and if so how do I add the dialog bar or is there a sample somewhere? ...

Same name for Windows Server and DNS
Hello everyone! I have a question... Is there any problem to give the DNS the same name as the Computer name of the Server? (I have a Small Business Server 2003 installed) Thanks a lot! ...

How to remove system menu and title bar
In an application I have a main form that is tabbed. The system menu does not appear, and this is what I would like. But when I open a report in preview mode from within the application the system menu does appear . What visual basic code is needed to suppress the system menu in report preview? Also, when in the tabbed form the application title bar does appear, and does not contain a minimize, maximize or close button. Again this is what I prefer. However, the title bar in report preview does contain each of these buttons. What code is needed to hide or remove them? Bill On ...

more than 16 colors icon
Can I use more than 16 colors icon in OutlookBar's shortcut? Even I use a true color icon, it shows in 16 colors. :-< ...

System Attendant Task is blocked
I have been troubleshooting this issue for over a month. Every evening at ~8:16:46pm, I get a event ID of 1031 on my E2k3 server (running on a 2 node WS2k3 cluster). The description simply states: Event Type: Error Event Source: MSExchangeSA Event Category: General Event ID: 1031 Date: 1/19/2006 Time: 8:16:46 PM User: N/A Computer: UEMAILNODE01 Description: One of the System Attendant's task is blocked. Function: CMonitoringTask::Work For more information, click http://www.microsoft.com/contentredirect.asp. I have turned on logging for the services mentioned in the above li...

workbook specific macro icons
I have written a graph analysis macro using VB (Excel 2000 Premium) and assigned a customized toolbar / icon to the macro. It runs well, but it's helpful to rename the file after an analysis is complete under a more desriptive name. When I do this however, even though the macro is still present in the newly named file (under Tools-macro-macros...) the icon is looking for the macro from the original file, and then opens the original file to run the macro in the newly created file. So I end up with 2 different instances of Excel running. Is there any way that an icon can be assigned to m...

All Task bars gone How do I get them back?
All of a sudden the other day everything at the top of my screen disappeared. I can load my word documents by searching my files and double clicking on the name but I can not Open a document inside word. I have never seen anything like this where all the buttons for using Word are gone. How do I get them back. http://www.gmayor.com/my_toolbars_are_missing.htm or http://word.mvps.org/FAQs/AppErrors/MissingMenusEtc.htm -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP ...

Restore Backup from Outlook 2003 into Windows 7(64)
Old laptop running XP; did backup of Outlook 2003 pst files using microsoft personal folders backup tool, to ext. hard drive. Connected hard drive to new laptop running Win 7(64). How do i restore the bu? All attempts met with error message saying I do not have authorization to access the file. Then tried to export the pst files from old laptop to ext hard drive. Connected hard drive to new laptop and tried to import the exported files into Outlook 2003. Got a similar message saying I did not have permission to access the selected files. Please help Bill. Submitted using http:/...

What are the meanings of the icons in the icon column
I cannot find any help information anywhere on the meanings of the different icons in the icon column of the folder viewing pane. What are their meanings and where is the help located (if it exists)? ...

Attach a tool bar to a specific BOOK
Hi I have a custom tool bar called DIP I want to have that tool bar show up ONLY when I am working on a book called MONEY and not be visible at other time Excel is opend Can this be done Thanks I think you'll need some application event code for this. Chip Pearson has some nice notes at: http://www.cpearson.com/excel/AppEvent.htm (and an example workbook, too) Another option is to add a check to each of your macros: If LCase(ActiveWorkbook.Name) <> "money.xls" Then MsgBox "cannot work on this workbook" Exit Sub End If ...