home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / DDE21.ZIP / CLIENT / PMUTILS.H < prev   
Text File  |  1991-05-09  |  2KB  |  55 lines

  1.  /*
  2.   $Workfile:   pmutils.h  $
  3.   $Revision:   1.1.1.0  $
  4.   $Date:   09 May 1991 18:10:22  $
  5.   $Logfile:   W:/dde/pmutils.h_v  $
  6.   $Author:   mikem  $
  7.   $Modtime:   09 May 1991 18:07:04  $
  8. */
  9.  
  10. /* used to grey-out or enable a action bar menu item                  */
  11. #define EnableMenuItem(hwndMenu, idMenuItem, fEnable) \
  12.       ( WinSendMsg(hwndMenu, MM_SETITEMATTR,       \
  13.               MPFROM2SHORT (idMenuItem, TRUE),    \
  14.               MPFROM2SHORT (MIA_DISABLED, fEnable ? 0 : MIA_DISABLED)) )
  15.  
  16. #define CheckMenuItem(hwndMenu, idMenuItem, fChecked) \
  17.          ( WinSendMsg(hwndMenu, MM_SETITEMATTR, \
  18.                  MPFROM2SHORT(idMenuItem, TRUE), \
  19.                MPFROM2SHORT(MIA_CHECKED, fChecked ? MIA_CHECKED : 0)) )
  20.  
  21. #define QCheckMenuItem(hwndMenu, idMenuItem) \
  22.          ( (BOOL) WinSendMsg(hwndMenu, MM_QUERYITEMATTR, \
  23.                          MPFROM2SHORT(idMenuItem, TRUE),    \
  24.                        MPFROMSHORT(MIA_CHECKED)) )
  25.  
  26. #define CopyToClipboard(hwndMLE) \
  27.         ( (ULONG) WinSendMsg (hwndMLE, MLM_COPY, \
  28.                             MPFROMSHORT(NULL),    \
  29.                                MPFROMSHORT(NULL)) )
  30.  
  31. #define EnableMLEWordWrap(hwndMLE, fWrapOn) \
  32.         ((MRESULT) WinSendMsg(hwndMLE, MLM_SETWRAP, \
  33.                  MPFROMSHORT(fWrapOn ? TRUE : FALSE),    \
  34.                MPFROMSHORT(NULL)) ) 
  35.  
  36. #define SetEFTextLength(hwndDlg, id, size) \
  37.         (    WinSendDlgItemMsg(hwndDlg, id, EM_SETTEXTLIMIT, \
  38.           MPFROM2SHORT(size,0), (MPARAM) NULL)) 
  39.  
  40. /* function declarations  */
  41. BOOL GetWinPos(PSZ pszApplName, HINI hiniProfile, PSWP swpWinPos);
  42. BOOL SetWinPos(PCHAR pszApplName, HINI hiniProfile, HWND hwndFrame);
  43. VOID SetHelpStruct(PHELPINIT hmiHelpData, PSZ pszHLPfileName, PSZ pszHlpWinTitle, INT ridHlpTbl);
  44. VOID CenterDlg(HWND hwndDlg);
  45. BOOL    DeleteMLE(PHWND phwndMLE);
  46. BOOL    CreateMLE(HWND hParent, HWND hOwner, PHWND phwndMLE, USHORT id, PRECTL prcl);
  47. MRESULT EXPENTRY FontDlgProc(HWND, USHORT, MRESULT, MRESULT);
  48. BOOL InitFontDlg(HWND hwndDlg);
  49. VOID SelFont(HWND hwndDlg);
  50. VOID DisplayErrMsg(HAB hab, HWND hwndOwner, PSZ pszCaption, SHORT sErrID, SHORT sMsgWinID);
  51. VOID CenterDlg(HWND hwndDlg);
  52. MRESULT EXPENTRY AboutDlgProc(HWND hwnd,USHORT msg,MPARAM mp1,MPARAM mp2);
  53.  
  54.  
  55.