我用SetWindowPos(&wndTopMost,0,0,0,0,SWP_NOREDRAW);做出的dialog在DEBUG时遮住了调试的代码,如何改正这个问题呢?http://expert.csdn.net/Expert/topic/1597/1597542.xml?temp=.154278

解决方案 »

  1.   


    #ifndef _DEBUG
    SetWindowPos(&wndTopMost,0,0,0,0, SWP_NOREDRAW);
    #endif在debug时,窗体不在最上方
    在release版本运行时,窗体在最上方.我用的是:
    #define TOPMOST #ifndef TOPMOST
    SetWindowPos(&wndTopMost,p.x,p.y,0,0, SWP_NOSIZE );
    #else
    SetWindowPos(0,p.x,p.y,0,0, SWP_NOSIZE | SWP_NOZORDER);
    #endif随时根据需要来定义或者取消 TOPMOST
      

  2.   

    yourdlg *dlg;
    dlg->EnableWindow(flase);
    dlg->DestoryWindow();
    2 个方法随便试一试
      

  3.   

    luxser(Monochrome Coffee) 的方法可行,但我用的时候也在DEBUG模式下,如果不用TOPMOST,我又无法对我的Dialog进行操作。