Visual Studio 2012 中的 sendmessage 回调错误 我在此 C 函数中收到以下错误?
error C2220: warning treated as error - no 'object' file generated
warning C4100: 'wParam' : unreferenced formal parameter
warning C4100: 'hwnd' : unreferenced formal parameter
LRESULT CALLBACK WndProc (HWND hwnd,UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case WM_COPYDATA:
{
COPYDATASTRUCT* copy_data = (COPYDATASTRUCT*)(lParam);
const char* str = (const char* )(copy_data->lpData);
/* Also fixed the parameter list for "%.*s" */
printf("Message (%u): %.*s\n", copy_data->dwData, (int)copy_data->cbData, str);
}
}
}