1. 程式人生 > >vc中對話方塊使用技巧集合

vc中對話方塊使用技巧集合

注:以下程式碼以一個名為CTest6Dlg的對話方塊類為例

--------------------------------------------------------------------------------

1. 在工作列隱藏對話方塊
       ModifyStyleEx(WS_EX_APPWINDOW, WS_EX_TOOLWINDOW);


--------------------------------------------------------------------------------

2. 使對話方塊為頂層視窗
         SetWindowPos(&this->wndTopMost, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);


--------------------------------------------------------------------------------

3. 在執行時新增最大化,最小化按鈕
     SetWindowLong(this->m_hWnd, GWL_STYLE,
                   GetWindowLong(this->m_hWnd, GWL_STYLE) |
                   WS_MINIMIZEBOX | WS_MAXIMIZEBOX); 
      UpdateWindow();

--------------------------------------------------------------------------------

4. 使能對話方塊右上角關閉按鈕

     在OnInitDialog中

     方法一:
        CMenu* menu = GetSystemMenu(FALSE);
        menu->ModifyMenu(SC_CLOSE, MF_BYCOMMAND | MF_GRAYED );

     方法二:
        CMenu* menu = GetSystemMenu(FALSE);
        menu->EnableMenuItem(SC_CLOSE, MF_BYCOMMAND | MF_GRAYED);


--------------------------------------------------------------------------------

5. 當對話方塊一部分在螢幕外時,顯示全部對話方塊
     SendMessage(DM_REPOSITION);


--------------------------------------------------------------------------------

6. 改變滑鼠外形

     新增 WM_SETCURSOR 訊息對映函式

     BOOL CTest6Dlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
     {
          SetCursor(AfxGetApp()->LoadStandardCursor(IDC_HELP));

          return 0;  
     }


--------------------------------------------------------------------------------

7. 改變對話方塊背景色和文字顏色

     在CTest6App的InitInstance中新增

     SetDialogBkColor(RGB(255,0,0), RGB(0,255,0));


--------------------------------------------------------------------------------

8. 改變對話方塊caption上的圖示

     匯入自己的圖示資源到工程中,把原來ID為 IDR_MAINFRAME 的資源刪除,把新的圖示的ID命名為IDR_MAINFRAME


--------------------------------------------------------------------------------

9. 在主對話方塊顯示前,顯示一個login對話方塊

      BOOL CTest6App::InitInstance()
      {
           //...
           int nResponse;
           CLoginDlg loginDlg;

           nResponse = loginDlg.DoModal();
           if (nResponse == IDOK)
           {
           }
           if (nResponse == IDCANCEL)
           {
                return FALSE;
           }
  
           CTest6Dlg dlg;
           m_pMainWnd = &dlg;
           int nResponse = dlg.DoModal();
           if (nResponse == IDOK )
           {
           }
           else if (nResponse == IDCANCEL)
           {
           }
           return FALSE;
      }

然後過載CLoginDlg對話方塊的哦OnOK(),在其中判斷條件
void CLoginDlg::OnOK() 
{
      if (條件滿足)
         CDialog::OnOK();
      else 
         AfxMessageBox(_T("invalid password!"));
}

--------------------------------------------------------------------------------

10. 在對話方塊中新增工具欄

     方法一:新增以下程式碼到 OnInitDialog 中

      if ( !m_wndToolBar.Create(this) || !m_wndToolBar.LoadToolBar(IDR_TOOLBAR1) )
      {
           TRACE0("Failed to Create Dialog Toolbar/n");
           EndDialog(IDCANCEL);
      }

      CRect rcClientOld; // 久客戶區RECT
      CRect rcClientNew; // 加入TOOLBAR後的CLIENT RECT
      GetClientRect(rcClientOld); //
      // Called to reposition and resize control bars in the client area of a window
      // The reposQuery FLAG does not really traw the Toolbar.   It only does the calculations.
      // And puts the new ClientRect values in rcClientNew so we can do the rest of the Math.
      //重新計算RECT大小
      RepositionBars(AFX_IDW_CONTROLBAR_FIRST,
                        AFX_IDW_CONTROLBAR_LAST,
                        0,
                        reposQuery,
                        rcClientNew);

     // All of the Child Windows (Controls) now need to be moved so the Tollbar does not cover them up.
      //所有的子視窗將被移動,以免被TOOLBAR覆蓋
      // Offest to move all child controls after adding Tollbar
      //計算移動的距離
      CPoint ptOffset(rcClientNew.left-rcClientOld.left,
        rcClientNew.top-rcClientOld.top);

      CRect rcChild;
      CWnd* pwndChild = GetWindow(GW_CHILD);   //得到子視窗
      while(pwndChild) // 處理所有子視窗
      {
           //移動所有子視窗
          pwndChild->GetWindowRect(rcChild);
           ScreenToClient(rcChild);
           rcChild.OffsetRect(ptOffset);
           pwndChild->MoveWindow(rcChild,FALSE);
           pwndChild = pwndChild->GetNextWindow();
      }

      CRect rcWindow;
      GetWindowRect(rcWindow); // 得到對話方塊RECT
      rcWindow.right += rcClientOld.Width() - rcClientNew.Width(); // 修改對話方塊尺寸
      rcWindow.bottom += rcClientOld.Height() - rcClientNew.Height();
      MoveWindow(rcWindow,FALSE); // Redraw Window

      RepositionBars(AFX_IDW_CONTROLBAR_FIRST,AFX_IDW_CONTROLBAR_LAST,0);

     方法二:


--------------------------------------------------------------------------------

11.響應對話方塊的最大化、最小化、關閉、恢復事件

      方法一:新增 WM_SYSCOMMAND 訊息對映函式

      void CTest6Dlg::OnSysCommand(UINT nID, LPARAM lParam)
      {
           if ( (nID & 0xFFF0) == IDM_ABOUTBOX )
           {
                CAboutDlg dlgAbout;
                dlgAbout.DoModal();
       }
      else
      {
           if ( nID == SC_MAXIMIZE )
           {
                AfxMessageBox(_T("最大化"));
           }
           else if ( nID == SC_MINIMIZE )  
           {
                AfxMessageBox(_T("最小化"));
           }
           else if ( nID == SC_CLOSE )
           {
                AfxMessageBox(_T("關閉"));
           }

           CDialog::OnSysCommand(nID, lParam);
     }

      方法二:新增 WM_SIZE 訊息對映函式

      void CTest6Dlg::OnSize(UINT nType, int cx, int cy)
      {
           CDialog::OnSize(nType, cx, cy);

           if ( nType == SIZE_MAXIMIZED )
           {
                AfxMessageBox(_T("最大化"));
           }
           else if ( nType == SIZE_MINIMIZED )
           {
                AfxMessageBox(_T("最小化"));
           }  
           else if ( nType == SIZE_RESTORED )
           {
                AfxMessageBox(_T("恢復"));
           }
      }


--------------------------------------------------------------------------------

12.程式碼實現視窗最小化,最大化,關閉

PostMessage(WM_SYSCOMMAND,   SC_MINIMIZE);
PostMessage(WM_SYSCOMMAND,   SC_MAXIMIZE);
PostMessage(WM_SYSCOMMAND,   SC_CLOSE);


--------------------------------------------------------------------------------

13.按下ESC和ENTER鍵時禁止關閉對話方塊
   
     方法一:

      (1) 過載OnCancel和OnOk,遮蔽其中的CDialog::OnCancel()和CDialog::OnOk();
      (2) 新增以下程式碼 
      void CTest6Dlg::OnSysCommand(UINT nID, LPARAM lParam)
      {
          if ((nID & 0xFFF0) == IDM_ABOUTBOX)
           {
              CAboutDlg dlgAbout;    //if you have an about dialog
               dlgAbout.DoModal();
           }
           else if ((nID & 0xFFF0) == SC_CLOSE)
           {
               //使用者點選右上角"X"
               EndDialog(IDOK);  
       
           }
           else
           {
               CDialog::OnSysCommand(nID, lParam);
           }
      }

     方法二:

      BOOL CTest6Dlg::PreTranslateMessage(MSG* pMsg)
      {
           if ( pMsg->message == WM_KEYDOWN )
           {
                switch(pMsg->wParam)
                {
                case VK_ESCAPE:
                 return TRUE; //直接返回TRUE
                 break;
                case VK_RETURN:
                 return TRUE;
                 break;
                }
           }
           return CDialog::PreTranslateMessage(pMsg);
      }


--------------------------------------------------------------------------------

14.在對話方塊中處理鍵盤滑鼠訊息

處理PreTranslateMessage訊息

以下程式碼示例只演示了鍵盤WM_KEYDOWN訊息,你也可以處理滑鼠訊息,比如WM_LBUTTONDOWN,WM_LBUTTONUP,WM_RBUTTONDOWN等。

BOOL CTest6Dlg::PreTranslateMessage(MSG* pMsg)  

     /**********************************************************/
     /*     當焦點在combobox(drop down風格)的edit上,響應回車             */ 
     /***********************************************************/ 
     if ( pMsg->message == WM_KEYDOWN ) 
     {         
         switch( pMsg->wParam ) 
         { 
         case VK_RETURN: 
             CEdit *pEdit = (CEdit*)m_combo1.GetWindow(GW_CHILD); 
             if(pMsg->hwnd == pEdit->m_hWnd ) 
             {  
                  AfxMessageBox("在combobox的edit中按下了Enter!"); 
             }             
             return TRUE; 
         } 
     } 

     /****************************************/ 
     /*    ALT為WM_SYSKEYDOWN                   */ 
     /****************************************/
     if( pMsg->message == WM_SYSKEYDOWN ) 
     {    
         switch( pMsg->wParam ) 
         { 
         case VK_F1:     
             if(::GetKeyState(VK_MENU) < 0)//ALT+F1
             { 
                 AfxMessageBox("按下了ALT+F1"); 
                 return TRUE; 
             }             
         }         
     } 
    
     /****************************************/ 
     /*      在clistctrl中按ctrl+A選中所有項   */ 
     /****************************************/ 
     if( pMsg->message == WM_KEYDOWN ) 
     {    
         if(pMsg->hwnd == GetDlgItem(IDC_LIST1)->m_hWnd) 
         { 
             switch( pMsg->wParam ) 
             { 
             case 65://A     
               if(::GetKeyState(VK_CONTROL) < 0)//Shift+enter 
               { 
                     for(int i=0; i<m_list.GetItemCount(); i++) 
                     { 
                         m_list.SetItemState(i, LVIS_SELECTED|LVIS_FOCUSED, 
                                             LVIS_SELECTED|LVIS_FOCUSED); 
                     } 
               } 
               return TRUE; 
             } 
         } 
     }  

     /****************************************/ 
     /*     當焦點在combobox,彈出自定義選單    */ 
     /****************************************/      
     if(pMsg->message == WM_RBUTTONDOWN) 
     { 
         CEdit *pEdit = (CEdit*)m_combo1.GetWindow(GW_CHILD); 
         if(pMsg->hwnd == pEdit->m_hWnd) 
         { 
             DWORD dwPos = GetMessagePos(); 
             CPoint point( LOWORD(dwPos), HIWORD(dwPos) ); 
             ScreenToClient(&point); 
             ClientToScreen(&point); 
             
             CMenu menu; 
             VERIFY( menu.LoadMenu( IDR_MENU1 ) ); 
             CMenu* popup = menu.GetSubMenu(0); 
             ASSERT( popup != NULL ); 
             popup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this ); 
         }         
     } 

     return CDialog::PreTranslateMessage(pMsg); 
}


--------------------------------------------------------------------------------

15.對話方塊啟動即隱藏

     新增 WM_SHOWWINDOW 的訊息對映

      void CTest6Dlg::OnShowWindow(BOOL bShow, UINT nStatus)
      {
           if ( GetStyle() & WS_VISIBLE )
           {
                CDialog::OnShowWindow(bShow, nStatus);
           }
           else
           {
                long Style = ::GetWindowLong(*this, GWL_STYLE);
                ::SetWindowLong(*this, GWL_STYLE, Style | WS_VISIBLE);
                CDialog::OnShowWindow(SW_HIDE, nStatus);
           }
      }


----------------------------------------------------------------------

16.對話方塊自動停靠在螢幕邊

     const int DETASTEP = 50;
      BOOL AdjustPos(CWnd *pWnd, CRect* lpRect)
      {
         //自動靠邊
         int iSX = GetSystemMetrics(SM_CXFULLSCREEN);
         int iSY = GetSystemMetrics(SM_CYFULLSCREEN);
         RECT rWorkArea;
         BOOL bResult = SystemParametersInfo(SPI_GETWORKAREA, sizeof(RECT), &rWorkArea, 0);

         CRect rcWA;
         if ( !bResult )
         {
             //如果呼叫不成功就利用GetSystemMetrics獲取螢幕面積
             rcWA = CRect(0,0,iSX,iSY);
         }
         else
             rcWA = rWorkArea;

         int iX = lpRect->left;
         int iY = lpRect->top;
         if ( iX < rcWA.left + DETASTEP && iX!=rcWA.left )
         {
             //調整左
             pWnd->SetWindowPos(NULL,rcWA.left,iY,0,0,SWP_NOSIZE);
             lpRect->OffsetRect(rcWA.left-iX,0);
             AdjustPos(lpRect);
             return TRUE;
         }
         if ( iY < rcWA.top + DETASTEP && iY!=rcWA.top )
         {
             //調整上
             pWnd->SetWindowPos(NULL ,iX,rcWA.top,0,0,SWP_NOSIZE);
             lpRect->OffsetRect(0,rcWA.top-iY);
             AdjustPos(lpRect);
             return TRUE;
         }
         if ( iX + lpRect->Width() > rcWA.right - DETASTEP && iX !=rcWA.right-lpRect->Width() )
         {
             //調整右
             pWnd->SetWindowPos(NULL ,rcWA.right-rcW.Width(),iY,0,0,SWP_NOSIZE);
             lpRect->OffsetRect(rcWA.right-lpRect->right,0);
             AdjustPos(lpRect);
             return TRUE;
         }
         if ( iY + lpRect->Height() > rcWA.bottom - DETASTEP && iY !=rcWA.bottom-lpRect->Height() )
         {
             //調整下
             pWnd->SetWindowPos(NULL ,iX,rcWA.bottom-rcW.Height(),0,0,SWP_NOSIZE);
             lpRect->OffsetRect(0,rcWA.bottom-lpRect->bottom);
             return TRUE;
         }
         return FALSE;
     }

     //然後在ONMOVEING事件中使用如下過程呼叫
     CRect r=*pRect;
     AdjustPos(this, &r);
     *pRect=(RECT)r;


--------------------------------------------------------------------------------

17.單擊視窗任意位置都可拖動視窗
     方法一:
      新增 WM_LBUTTONDOWN 的訊息對映
      void CTest6Dlg::OnLButtonDown(UINT nFlags, CPoint point)
      {
           PostMessage(WM_NCLBUTTONDOWN, HTCAPTION, 0);

           CDialog::OnLButtonDown(nFlags, point);
      }

     方法二:
     新增 WM_NCHITTEST 的訊息對映
     注意:在classwizard->message中找不到WM_NCHITTEST的,需要在選項卡class info->message filter中選擇window後該訊息才會出現在message中。
       void CTest6Dlg::OnNCHitTest(CPoint point)
      {
             return HTCAPTION;
       //     return CDialog::OnNCHitTest(point);
      }


--------------------------------------------------------------------------------

18.用Enter鍵替換Tab鍵實現焦點切換

      BOOL CTest6Dlg::PreTranslateMessage(MSG* pMsg)
      {
         if ( pMsg->message == WM_KEYDOWN )
           {
               if ( pMsg->wParam == VK_RETURN )
                    pMsg->wParam = VK_TAB;
           } 
           return CDialog::PreTranslateMessage(pMsg);
      }


--------------------------------------------------------------------------------

19.在對話方塊新增快捷鍵

      (1) 在CXXXApp中類中新增宣告
         HACCEL m_haccel;
      (2) 在resource view中右鍵點選樹的根目錄,選擇insert,新增一個新的Accelerator,預設ID為IDR_ACCELERATOR1。
          在其中新增相應選單的快捷鍵。
      (3) 在BOOL CXXXApp::InitInstance()中新增程式碼
         m_haccel = LoadAccelerators(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_ACCELERATOR1));
      (4) 新增CXXXApp類的 ProcessMessageFilter 訊息對映函式
          BOOL CTest6App::ProcessMessageFilter(int code, LPMSG lpMsg)
          {
               if ( m_haccel )
               {
                   if ( ::TranslateAccelerator(m_pMainWnd->m_hWnd, m_haccel, lpMsg) )
                        return TRUE;
               }
               return CWinApp::ProcessMessageFilter(code, lpMsg);
          }

或者參考
Q100770:
How to use accelerator keys and a main menu on the dialog box in Visual C++
http://support.microsoft.com/kb/100770/en-us


--------------------------------------------------------------------------------

20.對話方塊全屏

     int cx, cy;
     HDC dc = ::GetDC(NULL);
     cx = GetDeviceCaps(dc,HORZRES) + GetSystemMetrics(SM_CXBORDER);
     cy = GetDeviceCaps(dc,VERTRES) + GetSystemMetrics(SM_CYBORDER);
     ::ReleaseDC(0,dc);

     // Remove caption and border
     SetWindowLong(m_hWnd, GWL_STYLE,
                     GetWindowLong(m_hWnd, GWL_STYLE) & (~(WS_CAPTION | WS_BORDER)));

     // Put window on top and expand it to fill screen
     ::SetWindowPos(m_hWnd, HWND_TOPMOST,
           -(GetSystemMetrics(SM_CXBORDER)+1),
           -(GetSystemMetrics(SM_CYBORDER)+1),
           cx+1,cy+1, SWP_NOZORDER);
     或參考
        http://www.codeguru.com/cpp/w-d/dislog/dialog-basedapplications/article.php/c1837/


--------------------------------------------------------------------------------

21.控制對話方塊最大最小尺寸

     (1) 對話方塊的屬性的必須是resizing的
     (2) 開啟classwizard->class info標籤頁->message filter中選擇window
     (3) 新增 WM_GETMINMAXINFO 訊息對映
         void CTest6Dlg::OnGetMinMaxInfo(MINMAXINFO *lpMMI)
         {
              lpMMI->ptMinTrackSize = CPoint(200, 200);
         }


--------------------------------------------------------------------------------

22. 建立無模式對話方塊


--------------------------------------------------------------------------------

23.在對話方塊中改變選單項狀態(enable/disable, check/uncheck, change text)

Q242577:
You cannot change the state of a menu item from its command user-interface handler if the menu is attached to a dialog box in Visual C++
http://support.microsoft.com/kb/242577/en-us


--------------------------------------------------------------------------------

24. 按下F1出現幫助

或者如果你要遮蔽按下F1後出現的“找不到*.hlp檔案”的提示對話方塊
新增 WM_HELPINFO 訊息對映
BOOL CTest6Dlg::OnHelpInfo(HELPINFO* pHelpInfo) 
{
      return TRUE;
     //return CDialog::OnHelpInfo(pHelpInfo);//遮蔽該句
}

--------------------------------------------------------------------------------

25. 對話方塊初始化設定輸入焦點的問題
預設情況下,對話方塊初始化顯示的焦點按照在對話方塊編輯期間設定的tab order的第一個控制元件來設定的。(設定tab order可在對話方塊的resource view中用Ctrl+D顯示出來,點滑鼠進行順序設定)。如果想人為的改變初始化時的輸入焦點,可在對話方塊的OnInitDialog中把return   TRUE; 改為 return   FALSE;

MSDN上的解釋如下:

Return Value
Specifies whether the application has set the input focus to one of the controls in the dialog box. If OnInitDialog returns nonzero, Windows sets the input focus to the first control in the dialog box. The application can return 0 only if it has explicitly set the input focus to one of the controls in the dialog box.


--------------------------------------------------------------------------------


26. 在對話方塊間傳遞資料
CDlg1::OnButton1() 

       CDlg2 dlg2; 
       dlg2.m_str = _T("你好"; )
       dlg2.m_bJudge = TRUE; 
       dlg2.DoModal(); 


//Dlg2.h 
public: 
      CString m_str; 
      BOOL m_bJudge; 


//Dlg2.cpp 
CDlg2::OnInitDialog() 

     if (m_bJudge) 
         GetDlgItem(IDC_EDIT1)->SetWindowText(m_str); 
}


--------------------------------------------------------------------------------


27. 在 dlg1 中開啟 dlg2 時,dlg2 能修改 dlg1 中的成員變數

//dlg1.cpp
     #include "dlg2.h"
     CDlg1::OnButton1()
     {
           CDlg2 dlg2;
           dlg2.m_pDlg1 = this;
           dlg2.DoModal();
     }

//dlg2.h
class CDlg1;//新增dlg1類的宣告
class CDlg2 : public CDialog
{
...
public:
     CDlg1 *m_pDlg1;
}

//dlg2.cpp
#include "dlg1.h"

至此,你可以在dlg2.cpp中通過m_pDlg1操作CDlg1類中的成員變量了。

--------------------------------------------------------------------------------


28. 改變對話方塊字型,對話方塊大小改變的問題

Q145994:
How to calculate dialog box units based on the current font in Visual C++
http://support.microsoft.com/kb/q145994/

--------------------------------------------------------------------------------


29. 進行大資料量計算的時候,導致介面掛起無響應的問題

     當在程式中需要進行大資料量計算的時候(比如搜尋磁碟,大資料量傳輸等),由於這些計算過程是在介面執行緒(UI Process)中,由此引發了介面執行緒的訊息阻塞。我們建立一個工作執行緒(worker thread)來處理計算過程,以解決該問題。
下面是一個簡單的建立一個工作執行緒的實現:
//xxxdlg.h
static UINT MyThread(LPVOID pParam);
CWinThread* pMyThread;

//xxxdlg.cpp
CXXXDlg::OnButton1()
{
      pMyThread = AfxBeginThread(MyThread, this);
      pMyThread = NULL;
}

UINT CXXXDlg::MyThread(LPVOID pParam)
{
      CXXXDlg *pDlg = (CXXXDlg *)pParam;

      //這裡新增計算過程

      return 0;
}


--------------------------------------------------------------------------------

30. 工程資源的合併

以把B對話方塊的資源插入到A對話方塊為例:

(1) 生成一個*.ogx檔案
     開啟B工程,在ClassView中滑鼠右鍵點選所需的對話方塊類,單擊"Add to Gallery"。
     這時,會在 " C:/Program Files/Microsoft Visual Studio/Common/MSDev98/Gallery/工程B " 的目錄下產生一個ogx檔案。

(2) 插入該*.ogx檔案
     開啟A工程,選擇選單Project->Add To Project->components and controls... ,選擇剛生成的ogx檔案,然後Insert。

這時B對話方塊資源和對話方塊類就插入到A中了。。


--------------------------------------------------------------------------------

31. 在網上可以找到很多有用的程式碼,我只是把一些常用的功能列出連結,方便檢視


改變對話方塊大小時同時改變控制元件大小


--------------------------------------------------------------------------------
如何在可變大小(resizing)的對話方塊中實現滾動視窗


--------------------------------------------------------------------------------
從某一點或某一邊逐漸變大顯示對話方塊


--------------------------------------------------------------------------------
一個過載的MessageBox類


--------------------------------------------------------------------------------
option設定對話方塊(左邊是樹,右邊是子對話方塊)

實現原理:create多個child型別的對話方塊,然後全部hide,點選左邊樹的item時,顯示相應子對話方塊。


--------------------------------------------------------------------------------
實現MSN的右下角的訊息彈出提示視窗


--------------------------------------------------------------------------------
不規則對話方塊
     
http://www.codeproject.com/dialog/SimpleIrregular.asp


--------------------------------------------------------------------------------
擴充套件和收縮對話方塊
     
http://www.codeproject.com/dialog/dlgexpand.asp


--------------------------------------------------------------------------------
對話方塊漸變色
     
http://www.codeproject.com/dialog/WinMakeInactive.asp


--------------------------------------------------------------------------------
螢幕捕捉
     
http://www.codeproject.com/dialog/screencap.asp


--------------------------------------------------------------------------------
對話方塊選單新增“最近使用檔案列表”功能
     
http://www.codeproject.com/dialog/rfldlg.asp


--------------------------------------------------------------------------------
在對話方塊中建立view
    
http://www.codeguru.com/cpp/w-d/dislog/article.php/c5009/


--------------------------------------------------------------------------------
Splash Screen

Q817372:
How to insert a splash screen in a dialog-based application by using Visual C++ .NET or Visual C++ 2005
http://support.microsoft.com/kb/817372/en-us  

Q815376:
How to create and insert a splash screen in an SDI application or in an MDI application by using Visual C++ .NET or Visual C++ 2005
http://support.microsoft.com/kb/815376/en-us


--------------------------------------------------------------------------------
分割對話方塊


--------------------------------------------------------------------------------
新增狀態列statusbar和工具欄toolbar


--------------------------------------------------------------------------------
Tooltip

--------------------------------------------------------------------------------
從對話方塊邊緣平滑彈出對話方塊