   Step 1 Creating a window - 1 Issue couple of questions
  Hi,I'm starting from square one and I'm building myself a reusable fully customizable class that handles creating a window for me with a bunch of defaults I specify from another source. In any case I'm having an issue with my initialization...1>c:\users\jakub\documents\visual studio 2008\projects\barebonewindow\winapp.cpp(73) : error C2664: 'CreateWindowExW' : cannot convert parameter 3 from 'std::string' to 'LPCWSTR'bool WinApp::InitWindowsApp(){WNDCLASS wc;wc.style= CS_HREDRAW | CS_VREDRAW;wc.lpfnWndProc= MainWndProc;wc.cbClsExtra= 0;wc.cbWndExtra= 0;wc.hInstance= m_hInstance;wc.hIcon= ::LoadIcon( 0, IDI_APPLICATION );wc.hCursor= ::LoadCursor( 0, IDC_ARROW );wc.hbrBackground= static_cast< HBRUSH >( ::GetStockObject( BLACK_BRUSH ) );wc.lpszMenuName= 0;wc.lpszClassName= _T( "BareBoneD3DClass" );if( !::RegisterClass( &wc ) ){::MessageBox( 0, _T( "RegisterClass - Failed" ), 0, 0 );return false;}m_hWnd = ::CreateWindow( _T( "BareBoneD3DClass" ),   m_strWinCaption,   WS_OVERLAPPEDWINDOW,   CW_USEDEFAULT,   CW_USEDEFAULT,   CW_USEDEFAULT,   CW_USEDEFAULT,   0,   0,   m_hInstance,   0 );if( m_hWnd == 0 ){::MessageBox( 0, _T( "CreateWindow - Failed" ), 0, 0 );return false;}::ShowWindow( m_hWnd, SW_SHOW );::UpdateWindow( m_hWnd );return true;}So the m_strWinCaption is regular std::string and I've tried everything from adding a .c_str() at the end to wrapping it in a _T(), also changing the projects character set (even though I'm not a fan of that solution and I'd want to get this to work threw code). And no luck :(My other question is why are there so many variations to the CreateWindow function. .. .ie CreateWindowEx, CreateWindowExW Whats up with that   
  The regular plain-old std::string will use char's internally.  When you have your VC++ project set to use Unicode, then Win32 functions will expect strings of WCHAR (wchar_t).  Fortunately you can use std::wstring, which uses wchar_t internally and will work correctly for these kinds of situations.I made a blog post about some of these issues, that you might find useful.   ;  Perfect helpful as usual.   