//窗口标题
#ifdef WIN32
		CCEGLView* pGlView=CCDirector::sharedDirector()->getOpenGLView();
		if (pGlView)
		{
			std::string temp = U8ToA(name.c_str());
			int len=MultiByteToWideChar(CP_ACP, 0, (LPCSTR)temp.c_str(), -1, NULL,0); 
			wchar_t * wszUtf8 = new wchar_t[len+1]; 
			memset(wszUtf8, 0, len * 2 + 2); 
			MultiByteToWideChar(CP_ACP, 0, (LPCSTR)temp.c_str(), -1, (LPWSTR)wszUtf8, len);
			std::wstring szDst = wszUtf8;
			delete[] wszUtf8;

			//LPCWSTR
			HWND _handle= pGlView->getHWnd(); 
			SetWindowTextW(_handle,szDst.c_str());

			
		}
		
#endif

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-07-02
  • 2021-05-10
  • 2022-12-23
  • 2021-12-09
  • 2021-07-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-10
  • 2021-09-15
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案