Click here to Skip to main content
15,896,912 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: ShowNotifyBaloon problem Pin
Richard Andrew x643-Sep-11 8:48
professionalRichard Andrew x643-Sep-11 8:48 
GeneralRe: ShowNotifyBaloon problem Pin
_Flaviu3-Sep-11 8:55
_Flaviu3-Sep-11 8:55 
GeneralRe: ShowNotifyBaloon problem Pin
Chuck O'Toole3-Sep-11 9:20
Chuck O'Toole3-Sep-11 9:20 
GeneralRe: ShowNotifyBaloon problem Pin
Richard Andrew x643-Sep-11 9:27
professionalRichard Andrew x643-Sep-11 9:27 
AnswerRe: ShowNotifyBaloon problem Pin
MicroVirus4-Sep-11 3:12
MicroVirus4-Sep-11 3:12 
GeneralRe: ShowNotifyBaloon problem Pin
_Flaviu5-Sep-11 0:03
_Flaviu5-Sep-11 0:03 
GeneralRe: ShowNotifyBaloon problem Pin
MicroVirus5-Sep-11 11:06
MicroVirus5-Sep-11 11:06 
GeneralRe: ShowNotifyBaloon problem Pin
Chuck O'Toole5-Sep-11 15:07
Chuck O'Toole5-Sep-11 15:07 
This code works for me. You're probably missing some flag in your code.
void CMainFrame::PopupTrayBalloon(CString title, CString msg)
{
	NOTIFYICONDATA tnid;
	OSVERSIONINFO ver;
	ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
	if (!GetVersionEx(&ver)) return;
	if ((ver.dwPlatformId == VER_PLATFORM_WIN32_NT) && (
		((ver.dwMajorVersion == 5) && (ver.dwMinorVersion > 0)) ||	// Windows XP
		((ver.dwMajorVersion == 6) && (ver.dwMinorVersion >= 0)) ))	// Windows Vista
	{
		memset(&tnid, 0, sizeof(tnid));
		tnid.cbSize = sizeof(NOTIFYICONDATA);
		tnid.hWnd = GetSafeHwnd();
		tnid.uFlags = NIF_MESSAGE | NIF_ICON | NIF_INFO;
		tnid.dwInfoFlags = NIIF_INFO;
		tnid.uTimeout = 10000;
		lstrcpyn(tnid.szInfoTitle, title, sizeof(tnid.szInfoTitle));
		lstrcpyn(tnid.szInfo, msg, sizeof(tnid.szInfo));
		tnid.hIcon = LoadIcon(GetMainInstance(), MAKEINTRESOURCE(IDR_MAINFRAME));
		tnid.uCallbackMessage = MY_ICONNOTIFICATION;
		Shell_NotifyIcon(NIM_MODIFY, ((NOTIFYICONDATA *)&tnid));
	}
}

GeneralRe: ShowNotifyBaloon problem Pin
_Flaviu5-Sep-11 19:25
_Flaviu5-Sep-11 19:25 
GeneralRe: ShowNotifyBaloon problem Pin
MicroVirus6-Sep-11 2:39
MicroVirus6-Sep-11 2:39 
GeneralRe: ShowNotifyBaloon problem Pin
MicroVirus6-Sep-11 2:36
MicroVirus6-Sep-11 2:36 
GeneralRe: ShowNotifyBaloon problem Pin
Chuck O'Toole6-Sep-11 4:03
Chuck O'Toole6-Sep-11 4:03 
GeneralRe: ShowNotifyBaloon problem Pin
_Flaviu6-Sep-11 8:46
_Flaviu6-Sep-11 8:46 
GeneralRe: ShowNotifyBaloon problem Pin
Chuck O'Toole6-Sep-11 10:16
Chuck O'Toole6-Sep-11 10:16 
GeneralRe: ShowNotifyBaloon problem Pin
Chuck O'Toole6-Sep-11 10:25
Chuck O'Toole6-Sep-11 10:25 
GeneralRe: ShowNotifyBaloon problem Pin
MicroVirus6-Sep-11 15:45
MicroVirus6-Sep-11 15:45 
GeneralRe: ShowNotifyBaloon problem Pin
_Flaviu7-Sep-11 7:15
_Flaviu7-Sep-11 7:15 
GeneralRe: ShowNotifyBaloon problem Pin
Chuck O'Toole7-Sep-11 13:05
Chuck O'Toole7-Sep-11 13:05 
Question"The system cannot find the file specified" Pin
AndrewG12312-Sep-11 12:07
AndrewG12312-Sep-11 12:07 
AnswerRe: "The system cannot find the file specified" Pin
Cheongwadae2-Sep-11 17:34
Cheongwadae2-Sep-11 17:34 
QuestionIntroducing tests into a legacy application? Pin
Stefan_Lang1-Sep-11 22:18
Stefan_Lang1-Sep-11 22:18 
AnswerRe: Introducing tests into a legacy application? Pin
Orjan Westin1-Sep-11 23:10
professionalOrjan Westin1-Sep-11 23:10 
GeneralRe: Introducing tests into a legacy application? Pin
Stefan_Lang1-Sep-11 23:59
Stefan_Lang1-Sep-11 23:59 
GeneralRe: Introducing tests into a legacy application? Pin
Orjan Westin2-Sep-11 3:30
professionalOrjan Westin2-Sep-11 3:30 
GeneralRe: Introducing tests into a legacy application? Pin
Stefan_Lang2-Sep-11 4:01
Stefan_Lang2-Sep-11 4:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.