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.

85 lines
1.4 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. main.c
  5. Abstract: Control Panel Applet for OLE POS Devices
  6. Author:
  7. Karan Mehra [t-karanm]
  8. Environment:
  9. Win32 mode
  10. Revision History:
  11. --*/
  12. #include "pos.h"
  13. BOOL WINAPI DllMain(HINSTANCE hinstDLL, ULONG uReason, LPVOID lpvReserved)
  14. {
  15. switch(uReason) {
  16. case DLL_PROCESS_ATTACH: {
  17. ghInstance = hinstDLL;
  18. DisableThreadLibraryCalls((HMODULE)hinstDLL);
  19. break;
  20. }
  21. case DLL_THREAD_ATTACH:
  22. break;
  23. case DLL_THREAD_DETACH:
  24. break;
  25. case DLL_PROCESS_DETACH:
  26. break;
  27. }
  28. return TRUE;
  29. }
  30. LONG APIENTRY CPlApplet(HWND hwndCPl, UINT uMsg, LONG lParam1, LONG lParam2)
  31. {
  32. LPCPLINFO lpCPlInfo;
  33. switch(uMsg) {
  34. case CPL_INIT:
  35. return TRUE;
  36. case CPL_GETCOUNT:
  37. return 1;
  38. case CPL_INQUIRE: {
  39. lpCPlInfo = (LPCPLINFO)lParam2;
  40. lpCPlInfo->lData = 0;
  41. lpCPlInfo->idIcon = IDI_POS;
  42. lpCPlInfo->idName = IDS_POS_NAME;
  43. lpCPlInfo->idInfo = IDS_POS_INFO;
  44. break;
  45. }
  46. case CPL_DBLCLK: {
  47. OpenPOSPropertySheet(hwndCPl);
  48. break;
  49. }
  50. case CPL_STOP:
  51. break;
  52. case CPL_EXIT:
  53. break;
  54. }
  55. return 0;
  56. }