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.

74 lines
1.8 KiB

  1. /*++
  2. Microsoft Windows
  3. Copyright (C) Microsoft Corporation, 1981 - 1999
  4. Module Name:
  5. HardwarePage.cpp
  6. Abstract:
  7. the hardware tab for the wireless link control panel applet.
  8. the functionality is actually completely obtained from devmgr.dll
  9. which is responsible for putting everything on the property page
  10. the key function for this is DeviceCreateHardwarePage
  11. Author:
  12. Rahul Thombre (RahulTh) 11/4/1998
  13. Revision History:
  14. 11/4/1998 RahulTh Created this module.
  15. --*/
  16. #include "precomp.hxx"
  17. #include <initguid.h>
  18. #include <devguid.h> //for the GUID for the infrared device class.
  19. #include "hardwarepage.h"
  20. //the function used to create the hardware page.
  21. //there is no devmgr.h, so we have to declare it ourselves.
  22. EXTERN_C DECLSPEC_IMPORT HWND STDAPICALLTYPE
  23. DeviceCreateHardwarePageEx(HWND hwndParent, const GUID *pguid, int iNumClass, DWORD dwViewMode);
  24. // stolen from \nt\shell\inc\hwtab.h
  25. #define HWTAB_SMALLLIST 3
  26. #ifdef _DEBUG
  27. #define new DEBUG_NEW
  28. #undef THIS_FILE
  29. static char THIS_FILE[] = __FILE__;
  30. #endif
  31. #define NUM_WIRELESS_GUIDS 2
  32. /////////////////////////////////////////////////////////////////////////////
  33. // HardwarePage property page
  34. INT_PTR HardwarePage::OnInitDialog(HWND hwndDlg)
  35. {
  36. PropertyPage::OnInitDialog(hwndDlg);
  37. GUID guids[NUM_WIRELESS_GUIDS];
  38. guids[0] = GUID_DEVCLASS_INFRARED;
  39. guids[1] = GUID_DEVCLASS_BLUETOOTH;
  40. HWND hWndHW =
  41. DeviceCreateHardwarePageEx(hwndDlg, guids, NUM_WIRELESS_GUIDS, HWTAB_SMALLLIST);
  42. if (hWndHW)
  43. {
  44. ::SetWindowText(hWndHW,
  45. TEXT("hh.exe mk:@MSITStore:tshoot.chm::/tshardw_result.htm"));
  46. return FALSE;
  47. }
  48. return TRUE; // return TRUE unless you set the focus to a control
  49. // EXCEPTION: OCX Property Pages should return FALSE
  50. }