?
Solved

minimise to toolbar

Posted on 2000-02-20
4
Medium Priority
?
264 Views
Last Modified: 2010-04-02
I have a mfc-based app that I need to have minimise itself to the windows toolbar when it starts.  Not a button on the taskbar, but on the toolbar to the right of that where the clock/volume/etc sits.
Ive looked everywhere and found tons about toolbars in general but nothing about the main windows toolbar.
Can anyone help?
0
Comment
Question by:tekwini
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Expert Comment

by:nutsnuts
ID: 2541183
Hi, telkwini

I think you are going to put an icon on the systray area, try the API Shell_NotifyIcon. If still any questions, just ask.
0
 
LVL 2

Expert Comment

by:bbousquet
ID: 2541185
You might want to check out www.codeguru.com - they have a number of examples / class wrappers doing just that.
0
 
LVL 3

Expert Comment

by:akalmani
ID: 2541218
HI !!
   
      hIcon = LoadIcon(IDR_MAINFRAME);//Icon for taskbar
      NOTIFYICONDATA pnid;
      pnid.cbSize = sizeof(NOTIFYICONDATA);
      pnid.hWnd = AfxGetMainWnd()->m_hWnd;
      pnid.uID = IDR_MAINFRAME;
      pnid.uFlags = NIF_ICON;
      pnid.hIcon = hIcon;
      pnid.uCallbackMessage = WM_USER1;
      ::Shell_NotifyIcon(NIM_ADD,&pnid);

       Try this it works
0
 
LVL 3

Accepted Solution

by:
akalmani earned 150 total points
ID: 2541220
HI !!
   
      hIcon = LoadIcon(IDR_MAINFRAME);//Icon for taskbar
      NOTIFYICONDATA pnid;
      pnid.cbSize = sizeof(NOTIFYICONDATA);
      pnid.hWnd = AfxGetMainWnd()->m_hWnd;
      pnid.uID = IDR_MAINFRAME;
      pnid.uFlags = NIF_ICON;
      pnid.hIcon = hIcon;
      pnid.uCallbackMessage = WM_USER1;
      ::Shell_NotifyIcon(NIM_ADD,&pnid);

       Try this it works but u have to handle the mouse clicks over it and hide the application at start.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

777 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