Leaked source code of windows server 2003
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.

97 lines
2.2 KiB

  1. /*++
  2. *
  3. * WOW v1.0
  4. *
  5. * Copyright (c) 1991, Microsoft Corporation
  6. *
  7. * WMSGBM.C
  8. * WOW32 16-bit message thunks
  9. *
  10. * History:
  11. * Created 11-Mar-1991 by Jeff Parsons (jeffpar)
  12. --*/
  13. #include "precomp.h"
  14. #pragma hdrstop
  15. MODNAME(wmsgbm.c);
  16. #ifdef DEBUG
  17. MSGINFO amiBM[] = {
  18. {OLDBM_GETCHECK, "BM_GETCHECK"}, // 0x0400
  19. {OLDBM_SETCHECK, "BM_SETCHECK"}, // 0x0401
  20. {OLDBM_GETSTATE, "BM_GETSTATE"}, // 0x0402
  21. {OLDBM_SETSTATE, "BM_SETSTATE"}, // 0x0403
  22. {OLDBM_SETSTYLE, "BM_SETSTYLE"}, // 0x0404
  23. };
  24. PSZ GetBMMsgName(WORD wMsg)
  25. {
  26. INT i;
  27. register PMSGINFO pmi;
  28. for (pmi=amiBM,i=NUMEL(amiBM); i>0; i--,pmi++)
  29. if ((WORD)pmi->uMsg == wMsg)
  30. return pmi->pszMsgName;
  31. return GetWMMsgName(wMsg);
  32. }
  33. #endif
  34. BOOL FASTCALL ThunkBMMsg16(LPMSGPARAMEX lpmpex)
  35. {
  36. WORD wMsg = lpmpex->Parm16.WndProc.wMsg;
  37. LOGDEBUG(7,(" Thunking 16-bit button message %s(%04x)\n", (LPSZ)GetBMMsgName(wMsg), wMsg));
  38. //
  39. // special case BM_CLICK
  40. //
  41. if (wMsg == WIN31_BM_CLICK) {
  42. lpmpex->uMsg = BM_CLICK;
  43. }
  44. else {
  45. wMsg -= WM_USER;
  46. //
  47. // For app defined (control) messages that are out of range
  48. // return TRUE.
  49. //
  50. // ChandanC Sept-15-1992
  51. //
  52. if (wMsg < (BM_SETSTYLE - BM_GETCHECK + 1)) {
  53. lpmpex->uMsg = wMsg + BM_GETCHECK;
  54. // The following messages should not require thunking, because
  55. // they contain no pointers, handles, or rearranged message parameters,
  56. // so consequently they are not documented in great detail here:
  57. //
  58. // BM_GETCHECK
  59. // BM_GETSTATE
  60. // BM_SETCHECK
  61. // BM_SETSTATE
  62. // BM_SETSTYLE
  63. //
  64. // And these I haven't seen documentation for yet (new for Win32???)
  65. //
  66. // BM_GETIMAGE
  67. // BM_SETIMAGE
  68. // switch(lpmpex->uMsg) {
  69. // NO BM_ message needs thunking
  70. // }
  71. }
  72. }
  73. return TRUE;
  74. }
  75. VOID FASTCALL UnThunkBMMsg16(LPMSGPARAMEX lpmpex)
  76. {
  77. }