title: Errors after adding wxDialog
body: <p>I have a wxWidgets project in code::blocks with gcc which already worked fine. Now I wanted to add a dialog which gets opened from a menu, but now my compiler throws errors concerning the <code>CreateDialog</code> process. The strange thing is, I already had two fine working dialogs in my project...</p>
  
  <p>These are the errors:</p>
  
  <pre><code>||=== Build: Debug in WindowsDgpsGUI (compiler: GNU GCC Compiler) ===|
  C:\wxWidgets-3.0.2\include\wx\msw\winundef.h||In function 'HWND__* CreateDialog(HINSTANCE, LPCTSTR, HWND, DLGPROC)':|
  C:\wxWidgets-3.0.2\include\wx\msw\winundef.h|38|error: cannot convert 'LPCTSTR {aka const char*}' to 'LPCWSTR {aka const wchar_t*}' for argument '2' to 'HWND__* CreateDialogParamW(HINSTANCE, LPCWSTR, HWND, DLGPROC, LPARAM)'|
  C:\wxWidgets-3.0.2\include\wx\msw\winundef.h||In function 'HFONT__* CreateFont(int, int, int, int, int, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, LPCTSTR)':|
  C:\wxWidgets-3.0.2\include\wx\msw\winundef.h|69|error: cannot convert 'LPCTSTR {aka const char*}' to 'LPCWSTR {aka const wchar_t*}' for argument '14' to 'HFONT__* CreateFontW(int, int, int, int, int, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, LPCWSTR)'|
  C:\wxWidgets-3.0.2\include\wx\msw\winundef.h||In function 'HWND__* CreateWindow(LPCTSTR, LPCTSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, LPVOID)':|
  C:\wxWidgets-3.0.2\include\wx\msw\winundef.h|94|error: cannot convert 'LPCTSTR {aka const char*}' to 'LPCWSTR {aka const wchar_t*}' for argument '2' to 'HWND__* CreateWindowExW(DWORD, LPCWSTR, LPCWSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, LPVOID)'|
  C:\wxWidgets-3.0.2\include\wx\msw\winundef.h||In function 'HMENU__* LoadMenu(HINSTANCE, LPCTSTR)':|
  C:\wxWidgets-3.0.2\include\wx\msw\winundef.h|111|error: cannot convert 'LPCTSTR {aka const char*}' to 'LPCWSTR {aka const wchar_t*}' for argument '2' to 'HMENU__* LoadMenuW(HINSTANCE, LPCWSTR)'|
  C:\wxWidgets-3.0.2\include\wx\msw\winundef.h||In function 'HWND__* FindText(LPFINDREPLACE)':|
  C:\wxWidgets-3.0.2\include\wx\msw\winundef.h|126|error: cannot convert 'LPFINDREPLACE {aka FINDREPLACEA*}' to 'LPFINDREPLACEW {aka FINDREPLACEW*}' for argument '1' to 'HWND__* FindTextW(LPFINDREPLACEW)'|
  C:\wxWidgets-3.0.2\include\wx\msw\winundef.h||In function 'HICON__* LoadIcon(HINSTANCE, LPCTSTR)':|
  C:\wxWidgets-3.0.2\include\wx\msw\winundef.h|311|error: cannot convert 'LPCTSTR {aka const char*}' to 'LPCWSTR {aka const wchar_t*}' for argument '2' to 'HICON__* LoadIconW(HINSTANCE, LPCWSTR)'|
  C:\wxWidgets-3.0.2\include\wx\msw\winundef.h||In function 'HBITMAP__* LoadBitmap(HINSTANCE, LPCTSTR)':|
  C:\wxWidgets-3.0.2\include\wx\msw\winundef.h|324|error: cannot convert 'LPCTSTR {aka const char*}' to 'LPCWSTR {aka const wchar_t*}' for argument '2' to 'HBITMAP__* LoadBitmapW(HINSTANCE, LPCWSTR)'|
  D:\WindowsDgpsGui\RecordDialog.cpp||In member function 'void RecordDialog::OnButtonTrackNumberClick(wxCommandEvent&amp;)':|
  D:\WindowsDgpsGui\RecordDialog.cpp|142|warning: unused variable 'numberOfTracks' [-Wunused-variable]|
  ||=== Build failed: 7 error(s), 1 warning(s) (0 minute(s), 1 second(s)) ===|
  </code></pre>
  
  <p>This is how I open the dialog in main.cpp:</p>
  
  <pre><code>void WindowsDgpsGUIFrame::onRecordClick(wxCommandEvent&amp; event)
  { 
      RecordDialog* recordDialog = new RecordDialog(NULL);
      recordDialog-&gt;SetGnssPort(m_usedVariables.gnssPort);
      recordDialog-&gt;ShowModal();
      recordDialog-&gt;Destroy();
  }
  </code></pre>
  
  <p>RecordDialog.h</p>
  
  <pre><code>#ifndef RECORDDIALOG_H
  #define RECORDDIALOG_H
  
  #include "Serial.h"
  #include &lt;wx/string.h&gt;
  #include &lt;wx/textfile.h&gt;
  
  //(*Headers(RecordDialog)
  #include &lt;wx/sizer.h&gt;
  #include &lt;wx/stattext.h&gt;
  #include &lt;wx/textctrl.h&gt;
  #include &lt;wx/panel.h&gt;
  #include &lt;wx/choice.h&gt;
  #include &lt;wx/button.h&gt;
  #include &lt;wx/dialog.h&gt;
  //*)
  
  class RecordDialog: public wxDialog
  {
      public:
  
          RecordDialog(wxWindow* parent,wxWindowID id=wxID_ANY,const wxPoint&amp; pos=wxDefaultPosition,const wxSize&amp; size=wxDefaultSize);
          virtual ~RecordDialog();
          void SetGnssPort(wxString gnssPort);
  
          //(*Declarations(RecordDialog)
          wxButton* ButtonStartRecording;
          wxTextCtrl* TextCtrlNumber;
          wxStaticText* StaticTrackNumberText;
          wxStaticText* StaticStatusText;
          wxButton* ButtonFileName;
          wxPanel* Panel1;
          wxStaticText* StaticText1;
          wxTextCtrl* TextCtrlFileName;
          wxChoice* ChoiceTrack;
          wxButton* ButtonTrackNumber;
          wxStaticText* StaticTextFileName;
          //*)
  
      protected:
  
          //(*Identifiers(RecordDialog)
          static const long ID_STATICTEXT2;
          static const long ID_TEXTCTRL1;
          static const long ID_BUTTON2;
          static const long ID_STATICTEXT3;
          static const long ID_TEXTCTRL2;
          static const long ID_BUTTON3;
          static const long ID_STATICTEXT4;
          static const long ID_CHOICE1;
          static const long ID_STATICTEXT1;
          static const long ID_BUTTON1;
          static const long ID_PANEL1;
          //*)
          static const int STANDARD_BAUDRATE;
  
      private:
  
  
  
          //(*Handlers(RecordDialog)
          void OnButtonStartRecordingClick(wxCommandEvent&amp; event);
          void OnTextCtrl1Text(wxCommandEvent&amp; event);
          void OnButtonFileNameClick(wxCommandEvent&amp; event);
          void OnButtonTrackNumberClick(wxCommandEvent&amp; event);
          //*)
  
          DECLARE_EVENT_TABLE()
  };
  
  #endif
  </code></pre>
  
  <p>RecordDialog.cpp</p>
  
  <pre><code>#include "RecordDialog.h"
  #include "Serial.h"
  
  #include &lt;wx/textfile.h&gt;
  #include &lt;wx/valtext.h&gt;
  //(*InternalHeaders(RecordDialog)
  #include &lt;wx/intl.h&gt;
  #include &lt;wx/string.h&gt;
  //*)
  
  //(*IdInit(RecordDialog)
  const long RecordDialog::ID_STATICTEXT2 = wxNewId();
  const long RecordDialog::ID_TEXTCTRL1 = wxNewId();
  const long RecordDialog::ID_BUTTON2 = wxNewId();
  const long RecordDialog::ID_STATICTEXT3 = wxNewId();
  const long RecordDialog::ID_TEXTCTRL2 = wxNewId();
  const long RecordDialog::ID_BUTTON3 = wxNewId();
  const long RecordDialog::ID_STATICTEXT4 = wxNewId();
  const long RecordDialog::ID_CHOICE1 = wxNewId();
  const long RecordDialog::ID_STATICTEXT1 = wxNewId();
  const long RecordDialog::ID_BUTTON1 = wxNewId();
  const long RecordDialog::ID_PANEL1 = wxNewId();
  //*)
  
  const int RecordDialog::STANDARD_BAUDRATE = 9600;
  
  BEGIN_EVENT_TABLE(RecordDialog,wxDialog)
      //(*EventTable(RecordDialog)
      //*)
  END_EVENT_TABLE()
  
  RecordDialog::RecordDialog(wxWindow* parent,wxWindowID id,const wxPoint&amp; pos,const wxSize&amp; size)
  {
      //(*Initialize(RecordDialog)
      wxBoxSizer* BoxSizer4;
      wxBoxSizer* BoxSizer6;
      wxBoxSizer* BoxSizer5;
      wxBoxSizer* BoxSizer2;
      wxBoxSizer* BoxSizer1;
      wxBoxSizer* BoxSizer3;
  
      Create(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("wxID_ANY"));
      Panel1 = new wxPanel(this, ID_PANEL1, wxPoint(208,288), wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL1"));
      BoxSizer1 = new wxBoxSizer(wxVERTICAL);
      BoxSizer4 = new wxBoxSizer(wxVERTICAL);
      StaticTextFileName = new wxStaticText(Panel1, ID_STATICTEXT2, _("Name the place file you want to create."), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT2"));
      BoxSizer4-&gt;Add(StaticTextFileName, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
      TextCtrlFileName = new wxTextCtrl(Panel1, ID_TEXTCTRL1, _("File name"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL1"));
      BoxSizer4-&gt;Add(TextCtrlFileName, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
      ButtonFileName = new wxButton(Panel1, ID_BUTTON2, _("Set File Name"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
      BoxSizer4-&gt;Add(ButtonFileName, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
      BoxSizer1-&gt;Add(BoxSizer4, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
      BoxSizer5 = new wxBoxSizer(wxVERTICAL);
      StaticTrackNumberText = new wxStaticText(Panel1, ID_STATICTEXT3, _("How many tracks are there\?"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT3"));
      BoxSizer5-&gt;Add(StaticTrackNumberText, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
      TextCtrlNumber = new wxTextCtrl(Panel1, ID_TEXTCTRL2, _("Number of Tracks"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL2"));
      BoxSizer5-&gt;Add(TextCtrlNumber, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
      ButtonTrackNumber = new wxButton(Panel1, ID_BUTTON3, _("Set Number of Tracks"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON3"));
      BoxSizer5-&gt;Add(ButtonTrackNumber, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
      BoxSizer1-&gt;Add(BoxSizer5, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
      BoxSizer6 = new wxBoxSizer(wxVERTICAL);
      StaticText1 = new wxStaticText(Panel1, ID_STATICTEXT4, _("Select which track you wnat to record."), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT4"));
      BoxSizer6-&gt;Add(StaticText1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
      ChoiceTrack = new wxChoice(Panel1, ID_CHOICE1, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T("ID_CHOICE1"));
      ChoiceTrack-&gt;Disable();
      BoxSizer6-&gt;Add(ChoiceTrack, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
      BoxSizer1-&gt;Add(BoxSizer6, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
      BoxSizer2 = new wxBoxSizer(wxVERTICAL);
      StaticStatusText = new wxStaticText(Panel1, ID_STATICTEXT1, _("Label"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT1"));
      BoxSizer2-&gt;Add(StaticStatusText, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
      BoxSizer1-&gt;Add(BoxSizer2, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
      BoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
      ButtonStartRecording = new wxButton(Panel1, ID_BUTTON1, _("Start Recording"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
      ButtonStartRecording-&gt;Disable();
      BoxSizer3-&gt;Add(ButtonStartRecording, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
      BoxSizer1-&gt;Add(BoxSizer3, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
      Panel1-&gt;SetSizer(BoxSizer1);
      BoxSizer1-&gt;Fit(Panel1);
      BoxSizer1-&gt;SetSizeHints(Panel1);
  
      Connect(ID_TEXTCTRL1,wxEVT_COMMAND_TEXT_UPDATED,(wxObjectEventFunction)&amp;RecordDialog::OnTextCtrl1Text);
      Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&amp;RecordDialog::OnButtonFileNameClick);
      Connect(ID_BUTTON3,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&amp;RecordDialog::OnButtonTrackNumberClick);
      Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&amp;RecordDialog::OnButtonStartRecordingClick);
      //*)
  
      TextCtrlNumber-&gt;SetValidator(wxTextValidator(wxFILTER_DIGITS));
  
  }
  
  RecordDialog::~RecordDialog()
  {
      //(*Destroy(RecordDialog)
      //*)
  }
  
  
  void RecordDialog::OnButtonStartRecordingClick(wxCommandEvent&amp; event)
  {
      ;
  }
  
  
  void RecordDialog::SetGnssPort(wxString gnssPort)
  {
      ;
  
  }
  
  void RecordDialog::OnTextCtrl1Text(wxCommandEvent&amp; event)
  {
  }
  
  void RecordDialog::OnButtonFileNameClick(wxCommandEvent&amp; event)
  {
    ;
  }
  
  void RecordDialog::OnButtonTrackNumberClick(wxCommandEvent&amp; event)
  {
    ;
  }
  </code></pre>
  
  <p>Does anyone know what is wrong?</p>