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

C / C++ / MFC

 
GeneralConsole Hangs after printf. Pin
Brian van der Beek17-Apr-05 23:29
Brian van der Beek17-Apr-05 23:29 
GeneralRe: Console Hangs after printf. Pin
CodeBeetle18-Apr-05 10:13
CodeBeetle18-Apr-05 10:13 
Questionconvert ascii to char and ascii to string? Pin
nehathoma17-Apr-05 23:13
nehathoma17-Apr-05 23:13 
AnswerRe: convert ascii to char and ascii to string? Pin
Arsalan Malik17-Apr-05 23:58
Arsalan Malik17-Apr-05 23:58 
GeneralColoured Line Pin
javi_jmc17-Apr-05 22:59
javi_jmc17-Apr-05 22:59 
GeneralRe: Coloured Line Pin
Arsalan Malik17-Apr-05 23:55
Arsalan Malik17-Apr-05 23:55 
GeneralDrawText Font Pin
javi_jmc17-Apr-05 22:47
javi_jmc17-Apr-05 22:47 
GeneralMFC DLL's Pin
charu12317-Apr-05 22:34
charu12317-Apr-05 22:34 
Hi,

I want to create a DLL which puts and icon in the taskbar on click of tht icon an exe is run.

I wrote the following code.
The Compiler is not recognising the VERIFY Macro and AfxGetInstanceHandle method.
This code might be wrong becoz i ma jus trying .
Could someone help me out with this.

<br />
#include <windows.h><br />
#include <shellapi.h><br />
#include "example.h"<br />
#define MYWM_NOTIFYICON		(WM_USER+2)<br />
<br />
BOOL WINAPI DllMain (HINSTANCE hinstDLL,  // handle to the DLL module<br />
					 DWORD fdwReason,     // reason for calling function<br />
					 LPVOID lpvReserved)  // reserved<br />
{<br />
	return TRUE;<br />
}<br />
<br />
EXPORT void WINAPI Systray ()<br />
{<br />
//	CString sTip(_T("System Configuration"));	<br />
	DWORD dwMessage=NIM_ADD;<br />
	NOTIFYICONDATA tnd;<br />
	HWND m_hWnd;<br />
	tnd.cbSize		= sizeof(NOTIFYICONDATA);<br />
	tnd.hWnd		= m_hWnd;<br />
	tnd.uID			= IDR_TRAYICON;<br />
<br />
	tnd.uFlags		= NIF_MESSAGE|NIF_ICON;<br />
<br />
	tnd.uCallbackMessage	= MYWM_NOTIFYICON;<br />
<br />
	<br />
	VERIFY( tnd.hIcon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE (IDR_TRAYICON)) );<br />
<br />
	tnd.uFlags		= NIF_MESSAGE|NIF_ICON|NIF_TIP;<br />
<br />
	//lstrcpyn(tnd.szTip, (LPCTSTR)sTip, sizeof(tnd.szTip)/sizeof(tnd.szTip[0]) );<br />
	<br />
	Shell_NotifyIcon(dwMessage, &tnd);<br />
	<br />
	if(dwMessage == MYWM_NOTIFYICON)<br />
	{<br />
		if((LPARAM)tnd.uCallbackMessage==WM_LBUTTONDBLCLK)<br />
		{<br />
			if((WPARAM)tnd.uCallbackMessage==IDR_TRAYICON)<br />
			{<br />
				ShellExecute(NULL, "open", "http://www.brigsoft.com/", NULL, "", SW_SHOW);<br />
			}<br />
<br />
		}<br />
	}<br />
}<br />


Thanks

U get wht u Give
Generaljpeg Dialog Background Pin
lewix17-Apr-05 22:20
lewix17-Apr-05 22:20 
GeneralRe: jpeg Dialog Background Pin
22491717-Apr-05 22:40
22491717-Apr-05 22:40 
Questionhow to convert a string to char so that i can get the ASCII value in vc++? Pin
nehathoma17-Apr-05 21:05
nehathoma17-Apr-05 21:05 
AnswerRe: how to convert a string to char so that i can get the ASCII value in vc++? Pin
GDavy17-Apr-05 21:20
GDavy17-Apr-05 21:20 
AnswerRe: how to convert a string to char so that i can get the ASCII value in vc++? Pin
deldeep17-Apr-05 21:34
deldeep17-Apr-05 21:34 
Generalconvert char to ascii in vc++ Pin
nehathoma17-Apr-05 21:04
nehathoma17-Apr-05 21:04 
GeneralRe: convert char to ascii in vc++ Pin
Anonymous17-Apr-05 21:38
Anonymous17-Apr-05 21:38 
GeneralSize Window Pin
javi_jmc17-Apr-05 21:01
javi_jmc17-Apr-05 21:01 
GeneralRe: Size Window Pin
ThatsAlok17-Apr-05 21:11
ThatsAlok17-Apr-05 21:11 
GeneralRe: Size Window Pin
javi_jmc17-Apr-05 21:15
javi_jmc17-Apr-05 21:15 
GeneralSofware modems Pin
TOMCAT8117-Apr-05 20:23
TOMCAT8117-Apr-05 20:23 
GeneralGlobal Scope in C Pin
Arsalan Malik17-Apr-05 20:15
Arsalan Malik17-Apr-05 20:15 
GeneralRe: Global Scope in C Pin
22491717-Apr-05 20:47
22491717-Apr-05 20:47 
GeneralRe: Global Scope in C Pin
David Crow18-Apr-05 2:45
David Crow18-Apr-05 2:45 
GeneralRe: Global Scope in C Pin
CodeBeetle18-Apr-05 10:16
CodeBeetle18-Apr-05 10:16 
GeneralRe: Global Scope in C Pin
haritadala19-Apr-05 4:07
haritadala19-Apr-05 4:07 
Generalconvert unsigned char to const char in vc++ Pin
nehathoma17-Apr-05 19:11
nehathoma17-Apr-05 19:11 

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.