tekwini
asked on
minimise to toolbar
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?
Ive looked everywhere and found tons about toolbars in general but nothing about the main windows toolbar.
Can anyone help?
You might want to check out www.codeguru.com - they have a number of examples / class wrappers doing just that.
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
hIcon = LoadIcon(IDR_MAINFRAME);//
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
Try this it works
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think you are going to put an icon on the systray area, try the API Shell_NotifyIcon. If still any questions, just ask.