home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winbase / ipc / ddeml / client / infoctrl.h < prev    next >
Text File  |  1997-10-05  |  2KB  |  87 lines

  1.  
  2. /******************************************************************************\
  3. *       This is a part of the Microsoft Source Code Samples.
  4. *       Copyright (C) 1993-1997 Microsoft Corporation.
  5. *       All rights reserved.
  6. *       This source code is only intended as a supplement to
  7. *       Microsoft Development Tools and/or WinHelp documentation.
  8. *       See these sources for detailed information regarding the
  9. *       Microsoft samples programs.
  10. \******************************************************************************/
  11.  
  12.  
  13. // STYLES
  14.  
  15. #define ICSTY_OWNERDRAW     0x0001    // set if the central information is not
  16.                                       // standard text.
  17. #define ICSTY_SHOWFOCUS     0x0002    // set to allow focus painting an movement
  18.  
  19. #define ICSTY_HASFOCUS      0x8000
  20.  
  21. #define ICN_OWNERDRAW       (WM_USER + 676)     // notifies to draw
  22.             // wParam=id, lParam=OWNERDRAWPS FAR *
  23. #define ICN_HASFOCUS        (WM_USER + 677)     // notifies of focus set
  24.             // wParam=fFocus, lParam=(hMemCtrlData, hwnd)
  25. #define ICN_BYEBYE          (WM_USER + 678)     // notifies of imminent death
  26.             // wParam=hwnd, lParam=dwUser
  27.  
  28. #define ICM_SETSTRING       (WM_USER + 776)     // alters a string
  29.             // wParam=index, lParam=LPSTR
  30.  
  31. #define ICSID_UL            0
  32. #define ICSID_UC            1
  33. #define ICSID_UR            2
  34. #define ICSID_LL            3
  35. #define ICSID_LC            4
  36. #define ICSID_LR            5
  37. #define ICSID_CENTER        6
  38.  
  39. #define GWL_USER            0
  40. #define GWL_INFODATA        4
  41. #define ICCBWNDEXTRA        8
  42.  
  43. HWND CreateInfoCtrl(
  44. LPTSTR szTitle,
  45. INT x,
  46. INT y,
  47. INT cx,
  48. INT cy,
  49. HWND hwndParent,
  50. HANDLE hInst,
  51. LPTSTR pszUL,                // NULLs here are fine.
  52. LPTSTR pszUC,
  53. LPTSTR pszUR,
  54. LPTSTR pszLL,
  55. LPTSTR pszLC,
  56. LPTSTR pszLR,
  57. DWORD  style,
  58. HMENU id,
  59. DWORD dwUser);
  60.  
  61. VOID MyCascadeChildWindows(HWND hwndParent);
  62. VOID TileChildWindows(HWND hwndParent);
  63.  
  64. typedef struct {
  65.     PTSTR pszUL;
  66.     PTSTR pszUC;
  67.     PTSTR pszUR;
  68.     PTSTR pszLL;
  69.     PTSTR pszLC;
  70.     PTSTR pszLR;
  71.     PTSTR pszCenter;
  72.     DWORD  style;
  73.     RECT rcFocusUL;
  74.     RECT rcFocusUR;
  75.     RECT rcFocusLL;
  76.     RECT rcFocusLR;
  77.     HANDLE hInst;
  78. } INFOCTRL_DATA;
  79.  
  80. typedef struct {
  81.     RECT rcBound;
  82.     RECT rcPaint;
  83.     HDC  hdc;
  84.     DWORD dwUser;
  85. } OWNERDRAWPS;
  86.  
  87.