Stringizing Operator (#)
The number-sign or “stringizing” operator (#) converts macro parameters (after expansion) to string constants. It is used only with macros that take arguments. If it precedes a formal parameter in the macro definition, the actual argument passed by the macro invocation is enclosed in quotation s and treated as a string literal. The string literal then replaces each occurrence of a combination of the stringizing operator and formal parameter within the macro definition.
The number-sign or “stringizing” operator (#) converts macro parameters (after expansion) to string constants. It is used only with macros that take arguments. If it precedes a formal parameter in the macro definition, the actual argument passed by the macro invocation is enclosed in quotation s and treated as a string literal. The string literal then replaces each occurrence of a combination of the stringizing operator and formal parameter within the macro definition.
解决方案 »
- 显示设备组件 与 “弹出usb时出问题” 俩个问题
- 如何将一幅tif图像转换成保存带α通道数据的png文件
- 怎么在ultraedit 里编译 vc /mfc程序
- Delaunay三角剖分
- 通过IHTMLDocument2对象访问网页元素的问题
- 一个关于绘制鼠标拖拽阴影的C++小程序,和大家分享!!!!
- 帮忙详细注释下,急用……!!!!!!!
- 在线等待 -----各位大哥大姐 小弟在线等待 关于directx9.0 sdk的安装
- 为什么我定义的类没有调用析构函数?
- 怎么调用外部文件?
- 什么时候需要采用CComObjectNoLock而不是CComObject?
- API拦截 DrawText函数 执行了3次。
是不是只能把所有情况都加进去再判断
AfxMessageBox(CString(STRING(WM_CREATE)));
这个我知道, 但是我想要的是这样的:LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
STRING(message);//这个STRING要怎么写
..........
}
return "WM_CREATE";
{
#define __CASE(x) case x: OutputDebugStringA(#x); break;
__CASE(WM_CREATE);
__CASE(WM_PAINT);
__CASE(WM_CLOSE);
__CASE(WM_DESTROY);
#undef __CASE
}
写的太简略,给忘了。一个数字怎么可能没有任何依据转换为字符串?实际上,除了一一映射确实没有什么好方法。