如何在C ++中将HWND转换为LPCSTR

时间:2013-10-26 21:41:39

标签: c++ hwnd lpcstr

如何将HWND数据类型转换为LPCSTR。我需要使用OutputDebugStringA函数

将其打印到调试窗口

1 个答案:

答案 0 :(得分:2)

您可以使用std::stringstream

std::stringstream ss;
ss << hwnd;
OutputDebugStringA(ss.str().c_str());