title: MFC CDialog not showing
body: <p>here is my problem :
  In my Solution, I have 2 projects, one is a lib in which I created a ressource file (mylib.rc) and a dialog template in it. Then I made a class which inherits  CDialog and uses this template. But when I instantiate it and call DoModal(), nothing appends...</p>
  
  <p>here the code of my class, is something wrong with it ?</p>
  
  <h2>MyDialog.h</h2>
  
  <pre><code>/*MyDialog.h*/
  #pragma once
  #include "../../../resource.h"
  
  class MyDialog : public CDialog
  {
      enum {IDD=IDD_DLGTEMPLATE};
  public:
      MyDialog(CWnd* pParent = NULL);  
      virtual ~MyDialog();
  
  protected:
      virtual BOOL OnInitDialog();
  
      DECLARE_MESSAGE_MAP()
  private:
      afx_msg void OnBnClickedOk();
      afx_msg void OnBnClickedCancel();
  };
  </code></pre>
  
  <h2>MyDialog.cpp</h2>
  
  <pre><code>/*MyDialog.cpp*/
  #include "stdafx.h"
  #include "MyDialog.h"
  
  MyDialog::MyDialog(CWnd* pParent /*=NULL*/) : CDialog(IDD_DLGTEMPLATE, pParent) {}
  MyDialog::~MyDialog() {}
  
  BOOL MyDialog::OnInitDialog() { return TRUE; }
  
  BEGIN_MESSAGE_MAP(MyDialog, CDialog)
      ON_BN_CLICKED(IDOK, &amp;MyDialog::OnBnClickedOk)
      ON_BN_CLICKED(IDCANCEL, &amp;MyDialog::OnBnClickedCancel)
  END_MESSAGE_MAP()
  
  void MyDialog::OnBnClickedOk() { OnOK(); }
  void MyDialog::OnBnClickedCancel() { OnCancel(); }
  </code></pre>