cocos2d设置窗口标题

	//窗口标题
#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

  

上一篇:手推机器学习公式(一) —— BP 反向传播算法


下一篇:NFS客户端挂载失败之authenticated unmount request from