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.

44 lines
1.7 KiB

  1. /* dispatch.c */
  2. #ifndef _DISPATCH_H_
  3. #define _DISPATCH_H_
  4. typedef LRESULT (*PFNMSG)(HWND, UINT, WPARAM, LPARAM);
  5. typedef LRESULT (*PFNCMD)(HWND, WORD, WORD, HWND);
  6. typedef enum{
  7. edwpNone, // Do not call any default procedure.
  8. edwpWindow, // Call DefWindowProc.
  9. edwpDialog, // Call DefDlgProc (This should be used only for
  10. // custom dialogs - standard dialog use edwpNone).
  11. edwpMDIChild, // Call DefMDIChildProc.
  12. edwpMDIFrame // Call DefFrameProc.
  13. } EDWP; // Enumeration for Default Window Procedures
  14. typedef struct _MSD{
  15. UINT uMessage;
  16. PFNMSG pfnmsg;
  17. } MSD; // MeSsage Dispatch structure
  18. typedef struct _MSDI{
  19. int cmsd; // Number of message dispatch structs in rgmsd
  20. MSD *rgmsd; // Table of message dispatch structures
  21. EDWP edwp; // Type of default window handler needed.
  22. } MSDI, FAR *LPMSDI; // MeSsage Dipatch Information
  23. typedef struct _CMD{
  24. WORD wCommand;
  25. PFNCMD pfncmd;
  26. } CMD; // CoMmand Dispatch structure
  27. typedef struct _CMDI{
  28. int ccmd; // Number of command dispatch structs in rgcmd
  29. CMD *rgcmd; // Table of command dispatch structures
  30. EDWP edwp; // Type of default window handler needed.
  31. } CMDI, FAR *LPCMDI; // CoMmand Dispatch Information
  32. LRESULT DispMessage(LPMSDI lpmsdi, HWND hwnd, UINT uMessage, WPARAM wparam, LPARAM lparam);
  33. LRESULT DispCommand(LPCMDI lpcmdi, HWND hwnd, WPARAM wparam, LPARAM lparam);
  34. LRESULT DispDefault(EDWP edwp, HWND hwnd, UINT uMessage, WPARAM wparam, LPARAM lparam);
  35. #endif // _DISPATCH_H