typedef struct P2COPYDATA
{
char _msg [ MAX_PATH ];
P2COPYDATA() { init(); }
inline void init()
{
memset( this, 0, sizeof ( P2COPYDATA ) );
sprintf( _msg, "test msg" );
}
}
*PP2PCOPYDATA;
(전역 선언)
COPYDATASTRUCT g_CPDATA;
P2COPYDATA _data;
g_CPDATA.dwData = 2;
g_CPDATA.lpData = &_data; (무조건 주소!!)
g_CPDATA.cbData = sizeof( P2COPYDATA );
::SendMessage((HWND)iHWnd, WM_COPYDATA, (WPARAM)this, (LPARAM)(LPVOID)&g_CPDATA);
{
char _msg [ MAX_PATH ];
P2COPYDATA() { init(); }
inline void init()
{
memset( this, 0, sizeof ( P2COPYDATA ) );
sprintf( _msg, "test msg" );
}
}
*PP2PCOPYDATA;
(전역 선언)
COPYDATASTRUCT g_CPDATA;
P2COPYDATA _data;
g_CPDATA.dwData = 2;
g_CPDATA.lpData = &_data; (무조건 주소!!)
g_CPDATA.cbData = sizeof( P2COPYDATA );
::SendMessage((HWND)iHWnd, WM_COPYDATA, (WPARAM)this, (LPARAM)(LPVOID)&g_CPDATA);
최근 댓글