home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 19.ddi / SAMPLES / DDEML / CLIENT / INFOCTRL.H_ / INFOCTRL.H
Encoding:
C/C++ Source or Header  |  1993-02-08  |  2.1 KB  |  84 lines

  1. /*
  2.  * INFOCTRL.H
  3.  *
  4.  * This module implements a custom information display control which
  5.  * can present up to 7 seperate strings of information at once and is
  6.  * sizeable and moveable with the mouse.
  7.  */
  8.  
  9. // STYLES
  10.  
  11. #define ICSTY_OWNERDRAW     0x0001    // set if the central information is not
  12.                                       // standard text.
  13. #define ICSTY_SHOWFOCUS     0x0002    // set to allow focus painting an movement
  14.  
  15. #define ICSTY_HASFOCUS      0x8000
  16.  
  17. #define ICN_OWNERDRAW       (WM_USER + 676)     // notifies to draw
  18.             // wParam=id, lParam=OWNERDRAWPS FAR *
  19. #define ICN_HASFOCUS        (WM_USER + 677)     // notifies of focus set
  20.             // wParam=fFocus, lParam=(hMemCtrlData, hwnd)
  21. #define ICN_BYEBYE          (WM_USER + 678)     // notifies of imminent death
  22.             // wParam=hwnd, lParam=dwUser
  23.                   
  24. #define ICM_SETSTRING       (WM_USER + 776)     // alters a string     
  25.             // wParam=index, lParam=LPSTR
  26.  
  27. #define ICSID_UL            0
  28. #define ICSID_UC            1
  29. #define ICSID_UR            2
  30. #define ICSID_LL            3
  31. #define ICSID_LC            4
  32. #define ICSID_LR            5
  33. #define ICSID_CENTER        6
  34.  
  35. #define GWW_WUSER           0   // == LOWORD(GWL_LUSER)
  36. #define GWL_LUSER           0
  37. #define GWW_INFODATA        4
  38. #define ICCBWNDEXTRA        6
  39.  
  40. HWND CreateInfoCtrl(
  41. LPSTR szTitle,
  42. int x,
  43. int y,
  44. int cx,
  45. int cy,
  46. HWND hwndParent,
  47. HANDLE hInst,
  48. LPSTR pszUL,                // NULLs here are fine.
  49. LPSTR pszUC,
  50. LPSTR pszUR,
  51. LPSTR pszLL,
  52. LPSTR pszLC,
  53. LPSTR pszLR,
  54. WORD  style,
  55. HMENU id,
  56. DWORD dwUser);
  57.  
  58. void CascadeChildWindows(HWND hwndParent);
  59. void TileChildWindows(HWND hwndParent);
  60.  
  61. typedef struct {
  62.     PSTR pszUL;
  63.     PSTR pszUC;
  64.     PSTR pszUR;
  65.     PSTR pszLL;
  66.     PSTR pszLC;
  67.     PSTR pszLR;
  68.     PSTR pszCenter;
  69.     WORD  style;
  70.     RECT rcFocusUL;
  71.     RECT rcFocusUR;
  72.     RECT rcFocusLL;
  73.     RECT rcFocusLR;
  74.     HANDLE hInst;
  75. } INFOCTRL_DATA;
  76.  
  77. typedef struct {
  78.     RECT rcBound;
  79.     RECT rcPaint;
  80.     HDC  hdc;
  81.     DWORD dwUser;
  82. } OWNERDRAWPS;
  83.     
  84.