设置对话框应用程序的窗口大小,应该在什么事件中创建呢?

解决方案 »

  1.   

    BOOL CMyDlg::OnInitDialog()
    {
    CDialog::OnInitDialog();
      

  2.   

    楼上的说的差不多,应该在oninitDialog中调用。
      

  3.   

    http://www.iscoding.com/showthread.aspx?postid=21805WM_NCHITTEST
    SetWindowPos
    MoveWindow
      

  4.   

    OnInitDialog()在函数中用SetWindowPos()和MoveWindow()函数即可
      

  5.   

    BOOL CMyDlg::OnInitDialog()
    {
    //.........

    // TODO: Add extra initialization here
    int cx,cy;
    cx=cy=200;
     this->SetWindowPos(NULL,1,0,cx,cy,SWP_NOMOVE );//效果:窗口长宽均为:200象素,位置不变
    }