title: wxWidgets Title bar icon
body: <p>I want to change the default icon that shows up at the top left corner of the frame.
  I have tried many approaches- xpm, ico, bmp,
  using <code>SetIcon(wxIcon(wxT("icon.xpm")));</code> as suggested <a href="http://zetcode.com/gui/wxwidgets/firstprograms/" rel="nofollow">here.</a><br />
  I tried different icon sizes, 16x16, 24x24 and 32x32.<br />
  I've also tried adding <code>MYICON1 ICON "Logo.ico"</code> in the resource.rc file, <code>#define MYICON1 101</code> in the resource.h file and <code>SetIcon(wxIcon(MYICON1));</code> to the frame constructor.. <br />
  <br />
  btw, i'm using wxwidgets 2.8 on visual studio 2010</p>
  
  <p>EDIT:</p>
  
  <blockquote>
    <p>I've also tried adding <code>MYICON1   ICON "Logo.ico"</code> in the resource.rc file, <code>#define MYICON1 101</code> in the resource.h file and <code>SetIcon(wxIcon(MYICON1));</code> to the frame constructor..</p>
  </blockquote>
  
  <p>With this approach, I get an error in the wxIcon(int) constructor.. </p>
  
  <blockquote>
    <p>1>xsframe.cpp(17): error C2248: 'wxString::wxString' : cannot access private member declared in class 'wxString' <br>
    1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\wx/string.h(682) : see declaration of 'wxString::wxString' <br>
    1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\wx/string.h(659) : see declaration of 'wxString'</p>
  </blockquote>
  
  <p>PS, xsframe is my main frame. whose icon i'm trying to change.</p>