Solved

minimise to toolbar

Posted on 2000-02-20
4
244 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 50 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

Suggested Solutions

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 …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

726 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