Hi,
I need to convert the following C#, delegate statement to VC++2010...
Is it possible..?
notifyIcon1.BalloonTipClosed += delegate { notifyIcon1.Dispose(); };
Thanks....
Printable View
Hi,
I need to convert the following C#, delegate statement to VC++2010...
Is it possible..?
notifyIcon1.BalloonTipClosed += delegate { notifyIcon1.Dispose(); };
Thanks....
Well you could use CALLBACKS or function pointers.
The syntax won't be the same, but you will get close.
http://www.cprogramming.com/tutorial...-pointers.html
C++0x (or whatever they're calling it now):
C++/CLI:Code:notifyIcon1::BalloonTipClosed += [&] ()
{
delete notifyIcon1;
};
Code:void test()
{
notifyIcon1::BalloonTipClosed += AnonymousMethod1;
}
void AnonymousMethod1()
{
delete notifyIcon1;
}
To David Anton:
My heartiest thanks to those kindness... Your reply cleared me...
Thanks Again..
Similar question. My app worked in debug build, but once i moved to release build the namespace of the C# DLL I'm using can not be found. What do i need to do to fix.
Thanks in advance
Code:#include "stdafx.h"
#include "BL Control Test.h"
#include "BL Control TestDlg.h"
using namespace ATL;
using namespace USBHIDDRIVER;
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CBLControlTestApp
BEGIN_MESSAGE_MAP(CBLControlTestApp, CWinAppEx)
ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
END_MESSAGE_MAP()
// CBLControlTestApp construction
CBLControlTestApp::CBLControlTestApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
USBInterface ^ usb = gcnew USBInterface( "vid_0123", "pid_0456");
if ( usb->Connect() == FALSE )
MessageBox( (HWND)this->m_pMainWnd, _T("Failed to connect"), _T("Fail"), MB_ICONEXCLAMATION);
}