What should i do to convert a HWND data type to LPCSTR. I need to print it to debug window using OutputDebugStringA function

有帮助吗?

解决方案

You can use std::stringstream

std::stringstream ss;
ss << hwnd;
OutputDebugStringA(ss.str().c_str());
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top