All pastes #370744 Raw Edit

caca

public cpp v1 · immutable
#370744 ·published 2007-02-24 20:56 UTC
rendered paste body
using namespace std; wstring s2ws(const string& s){    int len;    int slength = (int)s.length() + 1;    len = MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, 0, 0);     wchar_t* buf = new wchar_t[len];    MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, buf, len);    wstring r(buf);     delete[] buf;    return r;}SYSTEMTIME st;FILETIME ft;LPDIRECT3D9 D3D = NULL;HWND  hWnd  = NULL;int WINAPI WinMain(	HINSTANCE hInstance,					HINSTANCE hPrevInstance,					LPSTR     lpCmdLine,					int       nCmdShow ){GetSystemTime(&st);stringstream hour,minute,second,day,week;string fHour,fMinute,fSecond,fDay,fWeek;string final;hour<<st.wHour;minute<<st.wMinute;second<<st.wSecond;day<<st.wDay;week<<st.wDayOfWeek;hour>>fHour;minute>>fMinute;second>>fSecond;day>>fDay;week>>fWeek;final = fHour + ":"+ fMinute + ":" + fSecond + "\n" + fDay+"ziua" + fWeek;wstring stemp = s2ws(final); LPCWSTR result = stemp.c_str();