Solved

CFrameWnd icon doesn't appear in Taskbar

Posted on 1997-05-29
8
577 Views
Last Modified: 2013-12-03
I've created a setup-style program with the background screen-filling wnd derived from CFrameWnd (MFC 2.5).  The icon and text doesn't appear in the taskbar under Windows 95 although it appears correctly in the Task-switcher (ALT-TAB).

What's going on here? Normal 16-bit MFC apps with CFrameWnd frames normally appear in the taskbar.  What is it that makes a top-level window appear or not?
0
Comment
Question by:scce
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 4

Accepted Solution

by:
AVaulin earned 100 total points
ID: 1397697
Icon and text appear in the taskbar if CFrameWnd has WS_CAPTION style. Check this.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1397698
Sorry, AVaulin. I found some 16-bit applications whose frame windows do not have WS_CAPTION style (no title bars) still appear in the taskbar. I do not know the exact reason.

0
 
LVL 4

Expert Comment

by:AVaulin
ID: 1397699
I said about WS_CAPTION but may be WS_SYSMENU is what I must say. I recently wrote program. MainFrame has only WS_VISIBLE and WS_BORDER styles. Only window text appear in TaskBar (icon appear with text only if ALT-TAB pressed).
0
 

Author Comment

by:scce
ID: 1397700
It seems to be a combination of WS_SYSMENU and WS_CAPTION styles, I've just tried it.  Now I've just got to try and remove the caption without removing the taskbar button!

Thanks both for your help.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Expert Comment

by:lizer
ID: 1397701
A taskbar button is placed on the taskbar whenever an application creates a unowned primary window. To ensure that the window button is placed on the taskbar, create the window by calling CreateWindowEx and include the WS_EX_APPWINDOW style. To prevent the window button from being placed on the taskbar, create the window by calling CreateWindowEx and include the WS_EX_TOOLWINDOW style. As an alternative, you can create a hidden window and make it the owner of your primary window.The window button typically contains the application icon and title. However, if the application does not contain a window menu,the window button is created without the icon.
To remove application from task switcher you have to hide the window.
0
 

Author Comment

by:scce
ID: 1397702
Thanks Lizer,

I'll try that and see where I get to.  I was faced with the choice of either no taskbar button or having a meaningless caption bar at the top of my setup screen background.

It sounds lilke you've given me the answer I needed.


0
 
LVL 23

Expert Comment

by:chensu
ID: 1397703
There are no WS_EX_APPWINDOW and WS_EX_TOOLWINDOW styles in 16-bit SDK.
0
 

Author Comment

by:scce
ID: 1397704
I found them in the Visual C++ 4.0 header files and just used the WS_EX_APPWINDOW style as a manifest constant.  It works fine as a 16-bit app under Windows 95 (I assume the style is ignored by Windows 3.1 as undefined, though I haven't tried that yet).  In any case it's irrelevant to 16-bit Windows, with no taskbar.  Thanks again, Lizer.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now