Solved

CFrameWnd icon doesn't appear in Taskbar

Posted on 1997-05-29
8
582 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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
 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Event ID 10010 3 69
Windows Installer 4 76
Changing the installation path of this MSI 5 107
Licensing Sharepoint 2016 for developers 11 60
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

792 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