Just minimizing to the tray, some tooltips, buttons. All standard stuff really. I've been following the stromcode tutorial but pulling what I want in my app as apposed to his portscanner.
I had wanted to have the client drop to the tray and post a balloon when someone messags you. My tray icon works but the apps tays in the taskbar as minimized.
Could it be my animation?
Heres everything I have in the minimize function
void ChatApp::miniMizeTray(const int icon)<br />
//We are checking to see if the user<br />
//has turned off animations<br />
ANIMATIONINFO anii;<br />
anii.cbSize = sizeof(anii);<br />
SystemParametersInfo(SPI_GETANIMATION, sizeof(anii), &anii, 0);<br />
RECT desktopRect, thisWindowRect;<br />
GetWindowRect(m_hWnd, &thisWindowRect);<br />
if (anii.iMinAnimate)<br />
//Animate Command<br />
DrawAnimatedRects(m_hWnd, IDANI_CAPTION, &thisWindowRect, &desktopRect);<br />
//Hide the Window completly<br />
ShowWindow(m_hWnd, SW_HIDE);<br />
//Show the notification icon<br />
NOTIFYICONDATA nid;<br />
ZeroMemory(&nid, sizeof(nid));<br />
nid.cbSize = sizeof(nid);<br />
nid.hWnd = m_hWnd;<br />
nid.uID = 0;<br />
nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP | NIF_INFO;<br />
nid.uCallbackMessage = WM_USER;<br />
nid.hIcon = LoadIcon(m_hInstance, MAKEINTRESOURCE(icon));<br />
nid.uTimeout = 1000;<br />
nid.dwInfoFlags = NIIF_INFO;<br />
lstrcpy(nid.szTip, "Double-Click To Maximize.");<br />
lstrcpy(nid.szInfo, "ChatApp has been minimized to the system tray.\nClick this icon to restore the application.");<br />
lstrcpy(nid.szInfoTitle, "Chat App");<br />
Shell_NotifyIcon(NIM_ADD, &nid);<br />
If I dont get back to you today I will definately on Monday. I'm going to make another run through the code and see if I find anything. Ill come back in the afternoon to see if you guys have any ideas. Thanks for the help!
Originally I did not have the ShowWindow command here, for kicks I added it before the DefWindowProc command, then I added it after. As soon as I added it after it worked correctly. Now due to the way I have my app setup, I am using a bool to let the app know whether or not it's in the tray, I had to setup a simple if statement for the same reason.
Any ideas on why I have to place this after the DefWindowProc command?
-- modified at 9:43 Monday 8th October, 2007
Just to add, I figured it out making another smaller app with nothing in it accept an edit window and the same minimize functions. Thanks for that advise David! =)
Yea I am running that command right after ShowWindow, makes no difference.
It sounds like I am callig the wrong HWND handle, but my main window is m_hWnd, everything else is a child of that. I just breifly double checked all my other HWND handles and found them all WS_CHILD. with m_hWnd as the parent accept the tooltips. My tooltips are children to the window in which they tip. I thought thats how I was suppose to do it but I dont think that will make a difference here.
Is anyone of you familiar with Anti-Grain Geometry? I just stumbled across it this week and would love to use it in my program but I can't figure out HOW to use it!
I am trying to use the C# wrapper created by the guys at CreativeDocs.Net --> http://www.creativedocs.net/
I just need someone to quickly explain how to replace gdi with agg.
Just so you know, I have exhuasted google trying to find some kind of documentation.
Any pointers would be greatly appreciated!
may your code be error free.
(okay, maybe two lines.)
Thank you for your help!
The CImage class is not the same as the CxImage class,isn't it?I want to make sure it.
I have to realize the convert from jpg to bmp.But the new probrom come up.Because the jpg is 24 bit,when it was converted to bmp,the bmp was 24 bit too.But i want to 8 biBitCount(256 color),how should i do?
Yeah thats right they are different sometimes some people think they are same but it has a X. and for second section of your question I done previous and I dont remember it I suggest ask at the new thread.
I was think about convert
24 bit true color jpg->24 bit bmp->8 biBitCount bmp(256 color)-> gray bmp->binarization bmp
But i find it will distortion when from 24 bit bmp to 8 biBitCount bmp(256 color)
So i think about the process about:
24 bit true color jpg->8 bit gray jpg->8 biBitCount bmp(256 color)->binarization bmp.
I now think about the step of 24 bit true color jpg->8 bit gray jpg,i know the photoshop can realize it,but i don't know how does it realize it?