Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.3 KiB

  1. #include "MachineConnectPage.h"
  2. #include "Common.h"
  3. #include "wlbsparm.h"
  4. #include "CommonUtils.h"
  5. BEGIN_MESSAGE_MAP( MachineConnectPage, CPropertyPage )
  6. ON_WM_HELPINFO()
  7. ON_WM_CONTEXTMENU()
  8. END_MESSAGE_MAP()
  9. void
  10. MachineConnectPage::DoDataExchange( CDataExchange* pDX )
  11. {
  12. CPropertyPage::DoDataExchange( pDX );
  13. DDX_Control( pDX, IDC_MACHINE, machineName );
  14. }
  15. MachineConnectPage::MachineConnectPage( _bstr_t* machine_name,
  16. UINT ID )
  17. :
  18. CPropertyPage( ID ),
  19. m_machineName( machine_name )
  20. {
  21. }
  22. void
  23. MachineConnectPage::OnOK()
  24. {
  25. _bstr_t machineIP =
  26. CommonUtils::getCIPAddressCtrlString( machineName );
  27. *m_machineName = machineIP;
  28. CPropertyPage::OnOK();
  29. }
  30. BOOL
  31. MachineConnectPage::OnHelpInfo (HELPINFO* helpInfo )
  32. {
  33. if( helpInfo->iContextType == HELPINFO_WINDOW )
  34. {
  35. ::WinHelp( static_cast<HWND> ( helpInfo->hItemHandle ),
  36. CVY_CTXT_HELP_FILE,
  37. HELP_WM_HELP,
  38. (ULONG_PTR ) g_aHelpIDs_IDD_MACHINE_CONNECT_PAGE );
  39. }
  40. return TRUE;
  41. }
  42. void
  43. MachineConnectPage::OnContextMenu( CWnd* pWnd, CPoint point )
  44. {
  45. ::WinHelp( m_hWnd,
  46. CVY_CTXT_HELP_FILE,
  47. HELP_CONTEXTMENU,
  48. (ULONG_PTR ) g_aHelpIDs_IDD_MACHINE_CONNECT_PAGE );
  49. }