ATLTRACE怎么输出宽字符串? 我打印过,ATLTRACE输出宽字符串有问题。怎么办?宽字符串怎么打印到调试输出窗口中? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 先用W2A转换成多字节AtlBase.hUSES_CONVERSION;LPCSTR x = W2A(lpsz); 为什么我这段代码执行不下去,报异常了。求助 m_ToolTip.UpdateTipText(nItemID, m_hWnd); CRect rc; UINT nPos =0, nItemCount = menu.GetMenuItemCount(); // Get Item Position for (; nPos < nItemCount; nPos++) { if (menu.GetMenuItemID(nPos) == nItemID) { break; } } int nRes = menu.GetMenuItemRect(NULL, nPos, &rc); ATLTRACE("GetMenuItemRect() return %d \nMenu item coordinate(right,top):(%d,%d)\n", nRes, rc.right, rc.top); CRect rcTip; CToolInfo toolInfo(TTF_TRACK, m_hWnd); m_ToolTip.GetToolInfo(&toolInfo); m_ToolTip.GetWindowRect(&rcTip); rcTip.MoveToXY(rc.right + 5, rc.top); m_ToolTip.TrackActivate(&toolInfo, TRUE); m_ToolTip.MoveWindow(&rcTip); OutputDebugString(toolInfo.lpsztext); m_ToolTip.MoveWindow(&rcTip);OutputDebugString(toolInfo.lpsztext);前一句MoveWindow异常了。 一般显示中文都会有异常//假定是在unicode环境下setlocale(LC_ALL, "chs"); //使用它下面显示中文正常wchar_t wstr[] = L"中a文BBcc";ATLTRACE(L"my Char :%s\r\n",wstr);ATLTRACE("my Char :%S\r\n",wstr); //注意这里在大S 在线求MFC高手指点 为什么我无法加载DLL? 惨啊,为了看英葡大战,上CSDN打发时间。。。。 截取Ie文本框内容有什么方法!!up给分!!!!! 哇!我有这么多分,散了!祝大家春节快乐! 请问哪可以下载nt的服务包,sp4,sp5???? 在线等。。。 马上给分!!!! VC写的控件的问题 如何获取CListCtrl类报表视图当前列的位置 如何将VS2010写的程序打包成软件 调查中......在外边用VC搞完全的数据库应用开发的请举手。 二维Otsu阈值分割法,发生内存不能“read”,求解答! vc2010插入webbrowser控件后如何调用?
AtlBase.hUSES_CONVERSION;LPCSTR x = W2A(lpsz);
m_ToolTip.UpdateTipText(nItemID, m_hWnd);
CRect rc;
UINT nPos =0, nItemCount = menu.GetMenuItemCount();
// Get Item Position
for (; nPos < nItemCount; nPos++)
{
if (menu.GetMenuItemID(nPos) == nItemID)
{
break;
}
}
int nRes = menu.GetMenuItemRect(NULL, nPos, &rc);
ATLTRACE("GetMenuItemRect() return %d \nMenu item coordinate(right,top):(%d,%d)\n", nRes, rc.right, rc.top);
CRect rcTip;
CToolInfo toolInfo(TTF_TRACK, m_hWnd);
m_ToolTip.GetToolInfo(&toolInfo); m_ToolTip.GetWindowRect(&rcTip);
rcTip.MoveToXY(rc.right + 5, rc.top); m_ToolTip.TrackActivate(&toolInfo, TRUE);
m_ToolTip.MoveWindow(&rcTip);
OutputDebugString(toolInfo.lpsztext);
OutputDebugString(toolInfo.lpsztext);
前一句MoveWindow异常了。
//假定是在unicode环境下
setlocale(LC_ALL, "chs"); //使用它下面显示中文正常
wchar_t wstr[] = L"中a文BBcc";
ATLTRACE(L"my Char :%s\r\n",wstr);
ATLTRACE("my Char :%S\r\n",wstr); //注意这里在大S