Solved

CFrameWnd icon doesn't appear in Taskbar

Posted on 1997-05-29
8
571 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
Comment Utility
Icon and text appear in the taskbar if CFrameWnd has WS_CAPTION style. Check this.
0
 
LVL 23

Expert Comment

by:chensu
Comment Utility
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
Comment Utility
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
Comment Utility
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Expert Comment

by:lizer
Comment Utility
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
Comment Utility
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
Comment Utility
There are no WS_EX_APPWINDOW and WS_EX_TOOLWINDOW styles in 16-bit SDK.
0
 

Author Comment

by:scce
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

771 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

10 Experts available now in Live!

Get 1:1 Help Now