home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / tema / SW602 / Winbase / data1.cab / SDK_Files / C-lang / MFC / WBMFC.CPP next >
Encoding:
C/C++ Source or Header  |  2000-03-16  |  16.5 KB  |  624 lines

  1. // wbmfc.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "afxpriv.h"
  6. #include "wbmfc.h"
  7.  
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CWBApp
  16.  
  17. IMPLEMENT_DYNAMIC(CWBApp, CWinApp)
  18.  
  19. BOOL CWBApp :: WBAppInit(const char *ApplName, const char *UserName,
  20.                          const char *Password, const char *ServerPath)
  21. {
  22.     int err;
  23.  
  24.     err = ::link_kernel((LPSTR)ServerPath, SW_MINIMIZE);
  25.     if (err != KSE_OK)
  26.     {
  27.         OnInitErr(err);
  28.         return FALSE;
  29.     }
  30.  
  31.     err = ::interf_init(m_cdp, 0);
  32.     if (err != KSE_OK)
  33.     {
  34.         ::unlink_kernel();
  35.         OnInitErr(err);
  36.         return FALSE;
  37.     }
  38.     m_Linked = TRUE;
  39.     if (UserName == WBAPPI_NOLOGIN)
  40.         return TRUE;
  41.  
  42.     if (UserName == NULL)
  43.     {
  44.         HWND hAct = GetActiveWindow();
  45.         SetForegroundWindow(hAct);
  46.         m_LoggedOn = ::Alogin(hAct);
  47.     }
  48.     else
  49.     {
  50.         if (Password == NULL)
  51.             Password = "";
  52.         m_LoggedOn = !::Login((LPSTR)UserName, (LPSTR)Password);
  53.         if (!m_LoggedOn)
  54.             OnLoginErr();
  55.         m_pMainWnd->SetFocus();
  56.     }
  57.     if (!m_LoggedOn)
  58.     {
  59.         ::interf_close();
  60.         ::unlink_kernel();
  61.         return FALSE;
  62.     }
  63.  
  64.     if (ApplName && Set_application((LPSTR)ApplName))
  65.     {
  66.         OnSetAppErr();
  67.         ::interf_close();
  68.         ::unlink_kernel();
  69.         m_Linked   = FALSE;
  70.         m_LoggedOn = FALSE;
  71.         return FALSE;
  72.     }
  73.     return TRUE;
  74. }
  75.  
  76.  
  77.  
  78. BEGIN_MESSAGE_MAP(CWBApp, CWinApp)
  79.     //{{AFX_MSG_MAP(CWBApp)
  80.         // NOTE - the ClassWizard will add and remove mapping macros here.
  81.     //}}AFX_MSG_MAP
  82. END_MESSAGE_MAP()
  83.  
  84. /////////////////////////////////////////////////////////////////////////////
  85. // CWBApp message handlers
  86. /////////////////////////////////////////////////////////////////////////////
  87. // CWBFrameWnd
  88.  
  89. const char USERMENUH[]  = "USERMENUH";
  90. const char USERMENUHW[] = "USERMENUHW";
  91.  
  92. IMPLEMENT_DYNCREATE(CWBFrameWnd, CMDIFrameWnd)
  93.  
  94. void CWBFrameWnd::UpdateMenuProps(HMENU hMainMenu, HMENU hWinMenu)
  95. {
  96.     ::SetProp(m_hWnd, USERMENUH, (HANDLE)hMainMenu);
  97.     if (hWinMenu == (HMENU) -1)
  98.     hWinMenu = GetWindowMenuPopup(hMainMenu);
  99.     ::SetProp(m_hWnd, USERMENUH, (HANDLE)hWinMenu);
  100. }
  101.  
  102. BEGIN_MESSAGE_MAP(CWBFrameWnd, CMDIFrameWnd)
  103.     //{{AFX_MSG_MAP(CWBFrameWnd)
  104.     ON_WM_ACTIVATE()
  105.     ON_WM_CREATE()
  106.     ON_WM_CLOSE()
  107.     ON_WM_DESTROY()
  108.     ON_WM_INITMENUPOPUP()
  109.     ON_WM_SIZE()
  110.     //}}AFX_MSG_MAP
  111. END_MESSAGE_MAP()
  112.  
  113. /////////////////////////////////////////////////////////////////////////////
  114. // CWBFrameWnd message handlers
  115.  
  116. LRESULT CWBFrameWnd::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) 
  117. {
  118.     // TODO: Add your specialized code here and/or call the base class
  119.     if (message == WM_CREATE && FramePars.Flags)
  120.         return 0;
  121.     if (::WinBaseFrameProc(m_hWnd, message, wParam, lParam) == 0L)
  122.         return 0L;
  123.     return CMDIFrameWnd::DefWindowProc(message, wParam, lParam);
  124. }
  125.  
  126. static CWBViewWnd *OpenViewPtr;
  127.  
  128. BOOL CWBFrameWnd::OnCommand(WPARAM wParam, LPARAM lParam) 
  129. {
  130.     // TODO: Add your specialized code here and/or call the base class
  131.     
  132.     HWND hView = GetCmdHWND(wParam, lParam);
  133.     WORD ID    = GetCmdID(wParam, lParam);
  134.     WORD Cmd   = GetCmdCMD(wParam, lParam);
  135.  
  136.     if (ID == IDM_HELP_GENERIC)
  137.         return FALSE;
  138.     else if (ID == 999 && ::IsWindow(hView))
  139.     {
  140.         if (Cmd == 1 && OpenViewPtr && OpenViewPtr->m_hWnd == NULL)
  141.         {
  142.             OpenViewPtr->SubclassWindow(hView);
  143.             OpenViewPtr = NULL;
  144.         }
  145.         else if ((Cmd == 1 || Cmd == 11 || Cmd == 13) && (::GetParent(hView) == m_hWndMDIClient))
  146.         {
  147.             CWBAuxMDIWnd *MDIWnd = new CWBAuxMDIWnd();
  148.             if (MDIWnd)
  149.                 MDIWnd->SubclassWindow(hView);
  150.         }
  151.         return FALSE;
  152.     }
  153.     return CMDIFrameWnd::OnCommand(wParam, lParam);
  154. }
  155.  
  156. int CWBFrameWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) 
  157. {
  158.     if (FramePars.Flags == WBF_NO_TOOLBAR || WBF_NO_STATUSBAR)
  159.     {
  160.         int res = CMDIFrameWnd::OnCreate(lpCreateStruct);
  161.         if (res)
  162.             return(res);
  163.         Init_window_env(m_hWnd, m_hWndMDIClient, 0, FramePars.Flags);
  164.     }
  165.     else
  166.     {
  167.         if (FramePars.WinMenu == 0x8000)
  168.         {
  169.             HMENU hMenu = ::GetMenu(m_hWnd);
  170.             if (hMenu != NULL)
  171.                 FramePars.WinMenu = ::GetMenuItemCount(hMenu) - 2;
  172.         }
  173.         lpCreateStruct->lpCreateParams = (LPVOID)&FramePars;
  174.         if (::WinBaseFrameProc(m_hWnd, WM_CREATE, 0, LPARAM(lpCreateStruct)) == -1)
  175.             return -1;
  176.  
  177.         m_hWndMDIClient = ::GetDlgItem(m_hWnd, CLIENT_ID);
  178.     }
  179.     HMENU hMenu = ::GetMenu(m_hWnd);
  180.     ::SetProp(m_hWnd, USERMENUH, hMenu);
  181.     hMenu = ::GetSubMenu(hMenu, FramePars.WinMenu);
  182.     ::SetProp(m_hWnd, USERMENUHW, hMenu);
  183.     
  184.     // TODO: Add your specialized creation code here
  185.     
  186.     return 0;
  187. }
  188.  
  189. void CWBFrameWnd::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) 
  190. {
  191.     // TODO: Add your message handler code here
  192.     Default();
  193. }
  194.  
  195.  
  196. void CWBFrameWnd::OnClose() 
  197. {
  198.     // TODO: Add your message handler code here and/or call default
  199.     Default();
  200. }
  201.  
  202. void CWBFrameWnd::OnDestroy() 
  203. {
  204.     CMDIFrameWnd::OnDestroy();
  205.     
  206.     // TODO: Add your message handler code here
  207.     ((CWBApp *)AfxGetApp())->Logout();
  208. }
  209.  
  210. void CWBFrameWnd::OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu) 
  211. {
  212.     if (::WinBaseFrameProc(m_hWnd, WM_INITMENUPOPUP, (UINT)pPopupMenu->m_hMenu, MAKELPARAM(nIndex, bSysMenu)) == 0L)
  213.         return;
  214.     if (!bSysMenu)
  215.     {
  216.         HWND hAct = (HWND)::SendMessage(m_hWndMDIClient, WM_MDIGETACTIVE, 0, 0);
  217.         if (hAct)
  218.         {
  219.             LRESULT chtype = ::SendMessage(hAct, SZM_MDI_CHILD_TYPE, 0, 0);
  220.             if (chtype == EDIT_MDI_CHILD)
  221.                 return;
  222.             if (pPopupMenu->m_hMenu == GetWindowMenuPopup(::GetMenu(m_hWnd)))
  223.             {
  224.                 UINT Cnt = pPopupMenu->GetMenuItemCount();
  225.                 for (UINT ID = 0; ID < Cnt; ID++)
  226.                 {
  227.                     UINT Stat = pPopupMenu->GetMenuState(ID, MF_BYPOSITION);
  228.                     if (Stat & MF_SEPARATOR)
  229.                         break;
  230.                     pPopupMenu->EnableMenuItem(ID, MF_BYPOSITION | MF_ENABLED);
  231.                 }
  232.                 return;
  233.             }
  234.         }
  235.     }
  236.     CMDIFrameWnd::OnInitMenuPopup(pPopupMenu, nIndex, bSysMenu);
  237.     
  238.     // TODO: Add your message handler code here
  239. }
  240.  
  241. void CWBFrameWnd::OnSize(UINT nType, int cx, int cy) 
  242. {
  243.     // TODO: Add your message handler code here
  244.     if (FramePars.Flags)
  245.         CMDIFrameWnd::OnSize(nType, cx, cy);
  246.     else
  247.         Default();
  248. }
  249.  
  250. void CWBFrameWnd::RecalcLayout(BOOL bNotify) 
  251. {
  252.     // TODO: Add your specialized code here and/or call the base class
  253.     if (FramePars.Flags)
  254.     {
  255.         CMDIFrameWnd::RecalcLayout(bNotify);
  256.         return;
  257.     }
  258.     if (m_bInRecalcLayout)
  259.         return;
  260.     m_bInRecalcLayout = TRUE;
  261.  
  262.     CRect Rect;
  263.     GetClientRect(&Rect);
  264.     if (Rect.right == 0 || Rect.bottom == 0)
  265.         SetWindowPos(NULL, 0, 0, 640, 480, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER);
  266.  
  267. #ifdef WIN32
  268.     RepositionBars(0, (UINT)-1, GetWindowLong(m_hWndMDIClient, GWL_ID));
  269. #else
  270.     RepositionBars(0, (UINT)-1, GetWindowWord(m_hWndMDIClient, GWW_ID));
  271. #endif
  272.     m_bInRecalcLayout = FALSE;
  273. }
  274.  
  275.  
  276. /////////////////////////////////////////////////////////////////////////////
  277. // CWBViewWnd
  278.  
  279. IMPLEMENT_DYNCREATE(CWBViewWnd, CMDIChildWnd)
  280.  
  281. BOOL CWBViewWnd :: Open(const char *ViewDef, tcursnum Base, uns32 Flags,
  282.                         trecnum Pos, FARPROC Filter, CWBViewWnd *ParWnd)
  283. {
  284.     if (OpenViewPtr)
  285.         return(FALSE);
  286.     OpenViewPtr = this;
  287.  
  288.     window_id hView = ::Open_view((LPSTR)ViewDef, Base, Flags, Pos, Filter, ParWnd ? ParWnd->m_hWnd : NULL, NULL);
  289.     return((BOOL)hView);
  290. }
  291.  
  292.  
  293. BOOL CWBViewWnd :: Open_query_view(const char * ViewDef, tcursnum Base, BOOL Order,
  294.                                         char *Query, FARPROC Filter, CWBViewWnd *ParWnd)
  295. {
  296.     if (OpenViewPtr)
  297.         return(FALSE);
  298.     OpenViewPtr = this;
  299.  
  300.     window_id hView = ::Open_view(ViewDef, Base, QUERY_VIEW, 0, Filter, ParWnd ? ParWnd->m_hWnd : NULL, NULL);
  301.     return((BOOL)hView);
  302. }
  303.  
  304. BOOL CWBViewWnd :: Select_records(const char *ViewDef, tcursnum Base, uns32 Flags,
  305.                                   short Limit, trecnum *Bindl, FARPROC Filter, CWBViewWnd *ParWnd)
  306. {
  307.     if (OpenViewPtr)
  308.         return(FALSE);
  309.     OpenViewPtr = this;
  310.  
  311.     window_id hView = ::Select_records((LPSTR)ViewDef, Base, Flags, Limit, Bindl, Filter, ParWnd ? ParWnd->m_hWnd : NULL, NULL);
  312.     return((BOOL)hView);
  313. }
  314.  
  315.  
  316. BOOL CWBViewWnd :: Relate_record(const char *LocalAttr, const char *ViewDef, tcursnum Base,
  317.                                  uns32 Flags, FARPROC Filter, const char *RemoteAttr)
  318. {
  319.     if (OpenViewPtr)
  320.         return(FALSE);
  321.     OpenViewPtr = this;
  322.  
  323.     window_id hView = ::Relate_record(LocalAttr, (LPSTR)ViewDef, Base, Flags, Filter, NULL, RemoteAttr);
  324.     return((BOOL)hView);
  325. }
  326.  
  327.  
  328. BEGIN_MESSAGE_MAP(CWBViewWnd, CMDIChildWnd)
  329.     //{{AFX_MSG_MAP(CWBViewWnd)
  330.     ON_WM_CLOSE()
  331.     ON_WM_DESTROY()
  332.     ON_WM_MDIACTIVATE()
  333.     ON_WM_SIZE()
  334.     ON_WM_HSCROLL()
  335.     ON_WM_VSCROLL()
  336.     //}}AFX_MSG_MAP
  337. END_MESSAGE_MAP()
  338.  
  339. /////////////////////////////////////////////////////////////////////////////
  340. // CWBViewWnd message handlers
  341.  
  342. BOOL CWBViewWnd::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
  343. {
  344.     *pResult = ViewWndProc(m_hWnd, WM_NOTIFY, wParam, lParam);
  345.     if (*pResult)
  346.         return(TRUE);
  347.     return(CMDIChildWnd::OnNotify(wParam, lParam, pResult));
  348. }
  349.  
  350. LRESULT CWBViewWnd::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) 
  351. {
  352.     // TODO: Add your specialized code here and/or call the base class
  353.     
  354.     return ViewWndProc(m_hWnd, message, wParam, lParam);
  355. }
  356.  
  357. void CWBViewWnd::PostNcDestroy() 
  358. {
  359.     // TODO: Add your specialized code here and/or call the base class
  360.     delete this;
  361. }
  362.  
  363. void CWBViewWnd::OnClose() 
  364. {
  365.     // TODO: Add your message handler code here and/or call default
  366.     
  367.     Default();
  368. }
  369.  
  370. void CWBViewWnd::OnDestroy() 
  371. {
  372.     Default();
  373.     
  374.     // TODO: Add your message handler code here
  375.     
  376. }
  377.  
  378. void CWBViewWnd::OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd) 
  379. {
  380.     Default();
  381.     
  382.     // TODO: Add your message handler code here
  383.     CMDIChildWnd::OnMDIActivate(bActivate, pActivateWnd, pDeactivateWnd);
  384. }
  385.  
  386. void CWBViewWnd::OnUpdateFrameMenu(BOOL bActive, CWnd* pActivateWnd, HMENU hMenuAlt)
  387. {
  388.     HMENU hMenu = hMenuAlt;
  389.     if (bActive && !hMenu && pActivateWnd->IsKindOf(RUNTIME_CLASS(CWBViewWnd)))
  390.         hMenu = ((CWBViewWnd *)pActivateWnd)->GetMenu();
  391.     CMDIChildWnd::OnUpdateFrameMenu(bActive, pActivateWnd, hMenu);
  392. }
  393.  
  394. void CWBViewWnd::OnSize(UINT nType, int cx, int cy) 
  395. {
  396.     Default();
  397.     
  398.     // TODO: Add your message handler code here
  399.     
  400. }
  401.  
  402. void CWBViewWnd::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) 
  403. {
  404.     // TODO: Add your message handler code here and/or call default
  405.     
  406.     Default();
  407. }
  408.  
  409. void CWBViewWnd::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) 
  410. {
  411.     // TODO: Add your message handler code here and/or call default
  412.     
  413.     Default();
  414. }
  415. /////////////////////////////////////////////////////////////////////////////
  416. // CWBModalViewWnd
  417.  
  418. IMPLEMENT_DYNCREATE(CWBModalViewWnd, CFrameWnd)
  419.  
  420. BOOL CWBModalViewWnd :: Open(const char *ViewDef, tcursnum Base, uns32 Flags,
  421.                              trecnum Pos, FARPROC Filter, CWBViewWnd *ParWnd)
  422. {
  423.     if (OpenViewPtr)
  424.         return(FALSE);
  425.     OpenViewPtr = (CWBViewWnd *)this;
  426.  
  427.     window_id hView = ::Open_view((LPSTR)ViewDef, Base, Flags | MODAL_VIEW, Pos, Filter, ParWnd ? ParWnd->m_hWnd : NULL, NULL);
  428.     return((BOOL)hView);
  429. }
  430.  
  431. BOOL CWBModalViewWnd :: Open_query_view(const char * ViewDef, tcursnum Base, BOOL Order,
  432.                                         char *Query, FARPROC Filter, CWBViewWnd *ParWnd)
  433. {
  434.     if (OpenViewPtr)
  435.         return(FALSE);
  436.     OpenViewPtr = (CWBViewWnd *)this;
  437.  
  438.     window_id hView = ::Open_view(ViewDef, Base, QUERY_VIEW, 0, Filter, ParWnd ? ParWnd->m_hWnd : NULL, NULL);
  439.     return((BOOL)hView);
  440. }
  441.  
  442. BOOL CWBModalViewWnd :: Select_records(const char *ViewDef, tcursnum Base, uns32 Flags,
  443.                                        short Limit, trecnum *Bindl, FARPROC Filter, CWBViewWnd *ParWnd)
  444. {
  445.     if (OpenViewPtr)
  446.         return(FALSE);
  447.     OpenViewPtr = (CWBViewWnd *)this;
  448.  
  449.     window_id hView = ::Select_records((LPSTR)ViewDef, Base, Flags | MODAL_VIEW, Limit, Bindl, Filter, ParWnd ? ParWnd->m_hWnd : NULL, NULL);
  450.     return((BOOL)hView);
  451. }
  452.  
  453.  
  454. BOOL CWBModalViewWnd :: Relate_record(const char *LocalAttr, const char *ViewDef, tcursnum Base,
  455.                                       uns32 Flags, FARPROC Filter, const char *RemoteAttr)
  456. {
  457.     if (OpenViewPtr)
  458.         return(FALSE);
  459.     OpenViewPtr = (CWBViewWnd *)this;
  460.  
  461.     window_id hView = ::Relate_record(LocalAttr, (LPSTR)ViewDef, Base, Flags | MODAL_VIEW, Filter, NULL, RemoteAttr);
  462.     return((BOOL)hView);
  463. }
  464.  
  465.  
  466. BEGIN_MESSAGE_MAP(CWBModalViewWnd, CFrameWnd)
  467.     //{{AFX_MSG_MAP(CWBModalViewWnd)
  468.     ON_WM_CLOSE()
  469.     ON_WM_DESTROY()
  470.     ON_WM_HSCROLL()
  471.     ON_WM_SIZE()
  472.     ON_WM_VSCROLL()
  473.     //}}AFX_MSG_MAP
  474.     ON_MESSAGE(WM_DISABLEMODAL, OnDisableModal)
  475. END_MESSAGE_MAP()
  476.  
  477. /////////////////////////////////////////////////////////////////////////////
  478. // CWBModalViewWnd message handlers
  479.  
  480. BOOL CWBModalViewWnd::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
  481. {
  482.     *pResult = ViewWndProc(m_hWnd, WM_NOTIFY, wParam, lParam);
  483.     if (*pResult)
  484.         return(TRUE);
  485.     return(CFrameWnd::OnNotify(wParam, lParam, pResult));
  486. }
  487.  
  488. LRESULT CWBModalViewWnd::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) 
  489. {
  490.     // TODO: Add your specialized code here and/or call the base class
  491.     
  492.     return CFrameWnd::DefWindowProc(message, wParam, lParam);
  493. }
  494.  
  495. void CWBModalViewWnd::PostNcDestroy() 
  496. {
  497.     // TODO: Add your specialized code here and/or call the base class
  498.     
  499.     delete this;
  500. }
  501.  
  502. void CWBModalViewWnd::OnClose() 
  503. {
  504.     // TODO: Add your message handler code here and/or call default
  505.     
  506.     Default();
  507. }
  508.  
  509. void CWBModalViewWnd::OnDestroy() 
  510. {
  511.     Default();
  512.     
  513.     // TODO: Add your message handler code here
  514.     
  515. }
  516.  
  517. void CWBModalViewWnd::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) 
  518. {
  519.     // TODO: Add your message handler code here and/or call default
  520.     
  521.     Default();
  522. }
  523.  
  524. void CWBModalViewWnd::OnSize(UINT nType, int cx, int cy) 
  525. {
  526.     Default();
  527.     
  528.     // TODO: Add your message handler code here
  529.     
  530. }
  531.  
  532. void CWBModalViewWnd::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) 
  533. {
  534.     // TODO: Add your message handler code here and/or call default
  535.     
  536.     Default();
  537. }
  538. /////////////////////////////////////////////////////////////////////////////
  539. // CWBAuxMDIWnd
  540.  
  541. IMPLEMENT_DYNCREATE(CWBAuxMDIWnd, CMDIChildWnd)
  542.  
  543. BEGIN_MESSAGE_MAP(CWBAuxMDIWnd, CMDIChildWnd)
  544.     //{{AFX_MSG_MAP(CWBAuxMDIWnd)
  545.     ON_WM_CLOSE()
  546.     ON_WM_DESTROY()
  547.     ON_WM_MDIACTIVATE()
  548.     ON_WM_SETFOCUS()
  549.     ON_WM_SIZE()
  550.     ON_WM_VSCROLL()
  551.     ON_WM_HSCROLL()
  552.     //}}AFX_MSG_MAP
  553. END_MESSAGE_MAP()
  554.  
  555. /////////////////////////////////////////////////////////////////////////////
  556. // CWBAuxMDIWnd message handlers
  557.  
  558. void CWBAuxMDIWnd::OnClose() 
  559. {
  560.     // TODO: Add your message handler code here and/or call default
  561.     
  562.     Default();
  563. }
  564.  
  565. void CWBAuxMDIWnd::OnDestroy() 
  566. {
  567.     Default();
  568.     
  569.     // TODO: Add your message handler code here
  570.     
  571. }
  572.  
  573. void CWBAuxMDIWnd::OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd) 
  574. {
  575.     Default();
  576.     
  577.     // TODO: Add your message handler code here
  578.     
  579. }
  580.  
  581. void CWBAuxMDIWnd::OnSetFocus(CWnd* pOldWnd) 
  582. {
  583.     Default();
  584.     
  585.     // TODO: Add your message handler code here
  586.     
  587. }
  588.  
  589. void CWBAuxMDIWnd::OnSize(UINT nType, int cx, int cy) 
  590. {
  591.     Default();
  592.     
  593.     // TODO: Add your message handler code here
  594.     
  595. }
  596.  
  597. void CWBAuxMDIWnd::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) 
  598. {
  599.     // TODO: Add your message handler code here and/or call default
  600.     
  601.     Default();
  602. }
  603.  
  604. void CWBAuxMDIWnd::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) 
  605. {
  606.     // TODO: Add your message handler code here and/or call default
  607.     
  608.     Default();
  609. }
  610.  
  611. LRESULT CWBAuxMDIWnd::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) 
  612. {
  613.     // TODO: Add your specialized code here and/or call the base class
  614.     
  615.     return(OrigWndProc(m_hWnd, message, wParam, lParam));
  616. }
  617.  
  618. void CWBAuxMDIWnd::PostNcDestroy() 
  619. {
  620.     // TODO: Add your specialized code here and/or call the base class
  621.     
  622.     delete this;
  623. }
  624.