home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / windows / c / mobjm260 / sfx200.h_ / sfx200.h
Encoding:
C/C++ Source or Header  |  1994-09-06  |  14.5 KB  |  577 lines

  1. //    Microworks ObjectMate  2.6
  2. //
  3. //  ObjectMate Interface Library
  4. //
  5. //    Copyright 1992-94 Microworks Sydney, Australia.
  6. //
  7. //  SFX200.H
  8.  
  9. #if !defined(__SFX_SFX200_H)
  10.  #define __SFX_SFX200_H
  11.  
  12. #ifndef RC_INVOKED
  13.  #pragma warn -nak
  14. #endif
  15.  
  16. #if !defined(WORKSHOP_INVOKED)
  17.  #if !defined(__WINDOWS_H)
  18.   #include <windows.h>
  19.  #endif
  20. #endif
  21.  
  22. #if !defined(EXPORT)
  23.  #define EXPORT _export
  24. #endif
  25.  
  26. #if !defined(__FLAT__) && !defined(WIN32)
  27.  #define SFXAPI FAR EXPORT PASCAL
  28. #else
  29.  #define SFXAPI APIENTRY EXPORT
  30. #endif
  31.  
  32. //    Border styles
  33.  
  34. #define    BD_RECESSED         0x01
  35. #define    BD_RAISED           0x02
  36.  
  37. //    Extra combo box style flag. Specifies an SFX combo box with no 3D border. 
  38.  
  39. #define CBS_NO3DBORDER        0x8000
  40.  
  41. //    Extra WM_CTLCOLOR value that identifies an SFX combo box
  42.  
  43. #define    CTLCOLOR_COMBOBOX   0x0F
  44.  
  45. //    Common dialog box templates
  46.  
  47. #define    DLG_COLOR           1
  48. #define    DLG_EXCOLOR         2
  49. #define    DLG_OPENSAVE        3
  50. #define    DLG_EXOPENSAVE       4
  51. #define    DLG_PRINT           5
  52. #define    DLG_PRINTSETUP      6
  53. #define    DLG_FIND            7
  54. #define    DLG_REPLACE         8
  55. #define    DLG_FONT            9
  56. #define DLG_EXFONT          10
  57. #define    DLG_OPENDIR         11
  58.  
  59. //    Old Common dialog box template Id's for backward compatibility
  60.  
  61. #define    DLG_CHOOSECOLOR     1
  62. #define    DLG_EXCHOOSECOLOR   2
  63.  
  64. //    Extends the standard button Id's form 7 to 11
  65.  
  66. #if !defined(WORKSHOP_INVOKED)
  67.  #define IDHELP             8
  68. #else
  69.  #define IDHELP             998
  70. #endif
  71. #define    IDBROWSE            9
  72. #define    IDGO                10
  73. #define    IDSTOP              11
  74.  
  75. //    Turns on and off edit mode in a list edit box. wParam and lParam must be zero.
  76.  
  77. #define LB_LISTEDITON       (WM_USER + 0X1001)
  78. #define LB_LISTEDITOFF      (WM_USER + 0X1002)
  79.  
  80. //    Extra list box styles
  81.  
  82. #define    LBS_NO3DBORDER      0x2000    //    No 3D Border
  83. #define    LBS_SFXLISTEDIT     0x4000    //    List edit box
  84. #define    LBS_SFXMULTIPLESEL  0x8000    //    Right mouse button only multiple selection list box
  85.  
  86. //    Extra message box button combinations
  87.  
  88. #define    MB_GO               0x000A
  89. #define    MB_GOSTOP           0x000B
  90. #define    MB_OKCANCELHELP     0x000C
  91. #define    MB_YESNOHELP        0x000D
  92.  
  93. //    Button style flags
  94.  
  95. #define    MBS_PUSHBUTTON      BS_PUSHBUTTON
  96. #define MBS_CHECKBOX        BS_CHECKBOX
  97. #define MBS_AUTOCHECKBOX    BS_AUTOCHECKBOX
  98. #define MBS_RADIOBUTTON     BS_RADIOBUTTON
  99. #define MBS_3STATE          BS_3STATE
  100. #define MBS_AUTO3STATE      BS_AUTO3STATE
  101. #define MBS_AUTORADIOBUTTON BS_AUTORADIOBUTTON
  102. #define MBS_ICONBUTTON      0x000E
  103. #define    MBS_DEFFONT         0x0010
  104. #define MBS_LEFTTEXT        0X0020
  105. #define    MBS_RAISEDTEXT        0x0040
  106. #define    MBS_RECESSEDTEXT    0x0080
  107. #define    MBS_RED              0x0100
  108. #define    MBS_LIME            0X0200
  109. #define    MBS_BLUE            0X0300
  110. #define    MBS_MAGENTA         0X0400
  111. #define    MBS_MAROON          0X0500
  112. #define    MBS_GREEN           0X0600
  113. #define    MBS_NAVY            0X0700
  114. #define    MBS_PURPLE          0X0800
  115. #define    MBS_YELLOW          0X0900
  116. #define    MBS_FLUSH            0x1000
  117. #define    MBS_RAISED          0x1000
  118. #define    MBS_BITMAP          0x2000
  119. #define    MBS_BITMAPBUTTON    0x4000
  120. #define    MBS_TEXTBUTTON      0x8000
  121.  
  122. //    Percent style flags
  123.  
  124. #define    MPS_TOP             0x0001
  125. #define    MPS_BOTTOM          0x0002
  126. #define    MPS_RED             0x0010
  127. #define    MPS_LIME            0x0020
  128. #define    MPS_BLUE            0x0030
  129. #define    MPS_MAGENTA         0x0040
  130. #define    MPS_MAROON          0x0050
  131. #define    MPS_GREEN           0x0060
  132. #define    MPS_NAVY            0x0070
  133. #define    MPS_PURPLE          0x0080
  134.  
  135. //    Scroll bar style flags
  136.  
  137. #define    MSB_HORZ            0x0000
  138. #define    MSB_VERT            0x0001
  139. #define    MSB_TOPLEFT         0x0010
  140. #define    MSB_BOTTOMRIGHT     0x0020
  141.  
  142. //    Shade style flags
  143.  
  144. #define    MSH_LEFT            0x0000
  145. #define    MSH_LTGRAY          0x0000
  146. #define    MSH_RECT            0x0000
  147. #define    MSH_FRAME           0x0001
  148. #define    MSH_VLINE           0x0002
  149. #define    MSH_HLINE           0x0004
  150. #define    MSH_RECESSED        0x0008
  151. #define    MSH_RAISED          0x0010
  152. #define    MSH_BORSTYLE        0x0020
  153. #define    MSH_CENTER          0x0040
  154. #define    MSH_RIGHT           0x0080
  155. #define    MSH_RECESSEDTEXT    0x0100
  156. #define    MSH_RAISEDTEXT      0x0200
  157. #define    MSH_DEFFONT         0x0400
  158. #define    MSH_NOPREFIX        0x0800
  159. #define    MSH_STEEL           0x1000
  160. #define    MSH_GLAZE           0x2000
  161. #define    MSH_RED             0x3000
  162. #define    MSH_LIME            0x4000
  163. #define    MSH_BLUE            0x5000
  164. #define    MSH_MAGENTA         0x6000
  165. #define    MSH_MAROON          0x7000
  166. #define    MSH_GREEN           0x8000
  167. #define    MSH_NAVY            0x9000
  168. #define    MSH_PURPLE          0xA000
  169. #define    MSH_BLACK           0xB000
  170. #define    MSH_WINCOLOR        0xC000
  171. #define    MSH_TRANSPARENT     0xD000
  172. #define    MSH_VHUMP           (MSH_VLINE | MSH_RAISED)
  173. #define    MSH_VDIP            (MSH_VLINE | MSH_RECESSED)
  174. #define    MSH_HHUMP           (MSH_HLINE | MSH_RAISED)
  175. #define    MSH_HDIP            (MSH_HLINE | MSH_RECESSED)
  176. #define    MSH_RAISEDFRAME     (MSH_RAISED | MSH_FRAME)
  177. #define    MSH_RECESSEDFRAME   (MSH_RECESSED | MSH_FRAME)
  178.  
  179. //    Static style flags
  180.  
  181. #define    MSS_TEXT            0x0000
  182. #define    MSS_TOP             0x0000
  183. #define    MSS_LEFT            0x0000
  184. #define    MSS_RECESSEDTEXT    0x0001
  185. #define    MSS_RAISEDTEXT        0x0002
  186. #define    MSS_SHADOWTEXT        0x0003
  187. #define    MSS_BITMAP          0x0004
  188. #define    MSS_BITMAPWINDOW    0x0005
  189. #define    MSS_HCENTER         0x0010
  190. #define    MSS_RIGHT           0x0020
  191. #define    MSS_BOTTOM          0x0040
  192. #define    MSS_VCENTER         0x0080
  193. #define    MSS_RECESSED        0x0100
  194. #define    MSS_RAISED          0x0200
  195. #define    MSS_FRAME           0x0400
  196. #define    MSS_WORDWRAP        0x0800
  197. #define    MSS_SINGLELINE      0x1000
  198. #define    MSS_NOPREFIX        0x2000
  199. #define    MSS_SFXPAINT        0x2000
  200. #define    MSS_EXPANDTABS      0x4000
  201. #define MSS_DEFFONT         0X8000
  202. #define    MSS_CENTER          (MSS_VCENTER | MSS_HCENTER)
  203. #define    MSS_CENTERBITMAP    (MSS_BITMAPWINDOW | MSS_CENTER)
  204. #define    MSS_RAISEDFRAME     (MSS_RAISED | MSS_FRAME)
  205. #define    MSS_RECESSEDFRAME   (MSS_RECESSED | MSS_FRAME)
  206.  
  207. //  Offset to the Static control's window handle in an aligned toolar or status bar
  208.  
  209. #define MTB_WNDSTATIC       2
  210.  
  211. //    Offset to the text string containing the toolbar title and current button ID's
  212.  
  213. #define MTB_WNDTEXT         4
  214.  
  215. //    Toolbar style flags
  216.  
  217. #define    MTB_ROW1            0x0001
  218. #define    MTB_ROW2            0x0002
  219. #define    MTB_ROW3            0x0003
  220. #define    MTB_ROW4            0x0004
  221. #define    MTB_ROW5            0x0005
  222. #define    MTB_ROW6            0x0006
  223. #define    MTB_ROW7            0x0007
  224. #define    MTB_ROW8            0x0008
  225. #define    MTB_ROW9            0x0009
  226. #define    MTB_ROW10           0x000A
  227. #define    MTB_ROW11           0x000B
  228. #define    MTB_ROW12           0x000C
  229. #define    MTB_ROW13           0x000D
  230. #define    MTB_ROW14           0x000E
  231. #define    MTB_ROW15           0x000F
  232. #define    MTB_COLUMN1         0x0010
  233. #define    MTB_COLUMN2         0x0020
  234. #define    MTB_COLUMN3         0x0030
  235. #define    MTB_COLUMN4         0x0040
  236. #define    MTB_COLUMN5         0x0050
  237. #define    MTB_COLUMN6         0x0060
  238. #define    MTB_COLUMN7         0x0070
  239. #define    MTB_COLUMN8         0x0080
  240. #define    MTB_COLUMN9         0x0090
  241. #define    MTB_COLUMN10        0x00A0
  242. #define    MTB_COLUMN11        0x00B0
  243. #define    MTB_COLUMN12        0x00C0
  244. #define    MTB_COLUMN13        0x00D0
  245. #define    MTB_COLUMN14        0x00E0
  246. #define    MTB_COLUMN15        0x00F0
  247. #define    MTB_TOP             0x0100
  248. #define    MTB_LEFT            0x0200
  249. #define    MTB_RIGHT           0x0300
  250. #define    MTB_BOTTOM          0x0400
  251. #define    MTB_FLOAT           0x0500
  252. #define    MTB_STATUS          0x0600
  253. #define    MTB_3DFRAME         0x1000
  254. #define    MTB_FLUSH           0x2000
  255. #define    MTB_RADIO           0x4000
  256. #define    MTB_BITMAPBUTTON    0x8000
  257.  
  258. //    Window style flags
  259.  
  260. #define    MWS_SFXCAPTION      0x0200
  261. #define    MWS_FRAMEDCLIENT    0x0400
  262. #define    MWS_RAISEDCLIENT    0x0800
  263. #define    MWS_GRAY            0x0800
  264. #define    MWS_3DFRAME         0x1000
  265. #define    MWS_3DGRAY          0x1000
  266. #define    MWS_SFXFRAME        0x2000
  267. #define    MWS_GLAZE           0x4000
  268. #define    MWS_STEEL           0x8000
  269. #define    MWS_3DGLAZE         (MWS_GLAZE | MWS_3DFRAME)
  270. #define    MWS_3DSTEEL         (MWS_STEEL | MWS_3DFRAME)
  271. #define    MWS_FRAMED3DFRAME   (MWS_3DFRAME | MWS_FRAMEDCLIENT)
  272. #define    MWS_FRAMED3DGLAZE   (MWS_3DGLAZE | MWS_FRAMEDCLIENT)
  273. #define    MWS_FRAMED3DSTEEL   (MWS_3DSTEEL | MWS_FRAMEDCLIENT)
  274. #define    MWS_RAISED3DFRAME   (MWS_3DFRAME | MWS_RAISEDCLIENT)
  275. #define    MWS_RAISED3DGLAZE   (MWS_3DGLAZE | MWS_RAISEDCLIENT)
  276. #define    MWS_RAISED3DSTEEL   (MWS_3DSTEEL | MWS_RAISEDCLIENT)
  277.  
  278. //    Old window style flags included for backward compatiblity
  279.  
  280. #define    MWS_FLAT3DFRAME     MWS_3DFRAME
  281. #define    MWS_FLAT3DGLAZE     MWS_3DGLAZE
  282. #define    MWS_FLAT3DSTEEL        MWS_3DSTEEL
  283.  
  284. //    Hide menu item identifier on toolbar system menu
  285.  
  286. #define SC_HIDE             0xFF00
  287.  
  288. //    High order word values identifying the control sending a WM_SFXCTLCOLOR message
  289. #define    SFXCTLCOLOR_BUTTON  0x10
  290. #define    SFXCTLCOLOR_CHECK   0x11
  291. #define    SFXCTLCOLOR_COMBO   0x12
  292. #define    SFXCTLCOLOR_DLG     0x13
  293. #define    SFXCTLCOLOR_RADIO   0x14
  294. #define    SFXCTLCOLOR_SHADE   0x15
  295. #define    SFXCTLCOLOR_STATIC  0x16
  296. #define    SFXCTLCOLOR_PERCENT 0x17
  297.  
  298. // SFX200.DLL version 2.6
  299.  
  300. #define    SFXVERSION          0x0260
  301.  
  302. //    Undocumented window message posted in a window's message queue when a menu is cancelled.
  303. //    If the closing menu is a poup menu wParam is TRUE. Otherwise it's FALSE. 
  304.  
  305. #define WM_EXITMENULOOP     0x0212
  306.  
  307. //    Private messages
  308.  
  309. #define    WM_ALIGNTOOLBAR     (WM_USER + 0x1003)
  310. #define    WM_DRAWPERCENT      (WM_USER + 0x1004)
  311. #define    WM_GETCHECK         (WM_USER + 0x1005)
  312. #define WM_RESETPERCENT     (WM_USER + 0x1006)
  313. #define    WM_SETBITMAP        (WM_USER + 0x1007)
  314. #define    WM_SETBRUSH         (WM_USER + 0x1008)
  315. #define    WM_SETCHECK         (WM_USER + 0x1009)
  316. #define    WM_SETPEN           (WM_USER + 0x100A)
  317. #define    WM_SFXCTLCOLOR        (WM_USER + 0x100B)
  318. #define    WM_SFXAPPLYCOLOR    (WM_USER + 0x100C)
  319. #define    WM_SFXAPPLYFONT     (WM_USER + 0x100D)
  320. #define    WM_SFXHELP             (WM_USER + 0x100E)
  321. #define    WM_SFXINITDIALOG    (WM_USER + 0x100F)
  322.  
  323. //    SFX stock object values used in the GetSFXObject function
  324.  
  325. #define    GLAZE_BRUSH         1
  326. #define    STEEL_BRUSH         2
  327. #define    RED_BRUSH           3
  328. #define    LIME_BRUSH          4
  329. #define    BLUE_BRUSH          5
  330. #define    MAGENTA_BRUSH       6
  331. #define    MAROON_BRUSH        7
  332. #define    GREEN_BRUSH         8
  333. #define    NAVY_BRUSH          9
  334. #define    PURPLE_BRUSH        10
  335. #define    FINE_FONT           11
  336. #define    BOLD_FONT           12
  337. #define    RED_PEN             13
  338. #define    BLUE_PEN            14
  339. #define    GREEN_PEN           15
  340. #define    MAROON_PEN          16
  341. #define    NAVY_PEN            17
  342. #define    PURPLE_PEN          18
  343. #define    YELLOW_BRUSH        19
  344. #define    SYSTEM_FINE_FONT    20
  345.  
  346. #if defined(__cplusplus)
  347.  extern "C" {
  348. #endif    //
  349.  
  350. //    Functions exported by SFX200.DLL
  351.  
  352. extern void SFXAPI AlignBrush
  353. (
  354.     HWND   hWnd,
  355.     HDC    hDC,
  356.     HBRUSH hBrush
  357. );
  358.  
  359. extern void SFXAPI BlackFrame
  360. (
  361.     HDC hDC,
  362.     int X1,
  363.     int Y1,
  364.     int X2,
  365.     int Y2
  366. );
  367.  
  368. extern void SFXAPI CenterWindow
  369. (
  370.     HWND hWndParent,
  371.     HWND hWnd
  372. );
  373.  
  374. extern RECT far* SFXAPI ChildToParentRect
  375. (
  376.     HWND hWnd
  377. );
  378.  
  379. extern void SFXAPI DrawBorder
  380. (
  381.     HDC  hDC,
  382.     int  x,
  383.     int  y,
  384.     int  width,
  385.     int  height,
  386.     UINT style = BD_RECESSED
  387. );
  388.  
  389. extern void SFXAPI Draw3DBorder
  390. (
  391.     HDC  hDC,
  392.     int  x,
  393.     int  y,
  394.     int  width,
  395.     int  height,
  396.     UINT style = BD_RECESSED
  397. );
  398.  
  399. extern BOOL SFXAPI EraseObject
  400. (
  401.     HGDIOBJ hObject
  402. );
  403.  
  404. extern HFONT SFXAPI GetSFXCtrlFont
  405. (
  406.     HWND hWnd
  407. );
  408.  
  409. extern HGDIOBJ SFXAPI GetSFXObject
  410. (
  411.     int index
  412. );
  413.  
  414. extern char far* SFXAPI GetSFXTemplate
  415. (
  416.     const char far* className,
  417.     UINT            templateType
  418. );                                                                   
  419.  
  420. extern int SFXAPI GetSFXTemplateId
  421. (
  422.     const char far* className,
  423.     UINT            templateType
  424. );
  425.  
  426. extern BOOL SFXAPI IsNCActive
  427. (
  428.     HWND hWnd
  429. );
  430.  
  431. extern BOOL SFXAPI PtInClient
  432. (
  433.     HWND hWnd,
  434.     POINT point
  435. );
  436.  
  437. extern BOOL SFXAPI PtInWindow
  438. (
  439.     HWND hWnd,
  440.     POINT point
  441. );
  442.  
  443. extern BOOL SFXAPI SFXChooseColor
  444. (
  445.     HWND          hwndParent,
  446.     COLORREF far* rgbColor,
  447.     DWORD         flags = 0,
  448.     int           templateId = 0,
  449.     BOOL          center = FALSE,
  450.     COLORREF far* customColors = 0
  451. );
  452.  
  453. extern BOOL SFXAPI SFXChooseFont
  454. (
  455.     HWND          hwndParent,
  456.     LOGFONT far*  logFont,
  457.     DWORD         flags = 0,
  458.     int           templateId = 0,
  459.     BOOL          center = FALSE,
  460.     COLORREF far* rgbColor = 0
  461. );
  462.  
  463. extern LRESULT SFXAPI SFXDefDlgProc
  464. (
  465.     HWND   hDlg,
  466.     UINT   msg,
  467.     WPARAM wParam,
  468.     LPARAM lParam
  469. );
  470.  
  471. extern LRESULT SFXAPI SFXDefWindowProc
  472. (
  473.     HWND   hWnd,
  474.     UINT   msg,
  475.     WPARAM wParam,
  476.     LPARAM lParam
  477. );
  478.  
  479. extern LRESULT SFXAPI SFXDefFrameProc
  480. (
  481.     HWND   hWnd,
  482.     HWND   hWndClient,
  483.     UINT   msg,
  484.     WPARAM wParam,
  485.     LPARAM lParam
  486. );
  487.  
  488. extern LRESULT SFXAPI SFXDefMDIChildProc
  489. (
  490.     HWND   hWnd,
  491.     UINT   msg,
  492.     WPARAM wParam,
  493.     LPARAM lParam
  494. );
  495.  
  496. extern int SFXAPI SFXDirBox
  497. (
  498.     HWND            hWndParent,
  499.     const char far* caption,
  500.     char far*       dir,
  501.     UINT            flags = 0,
  502.     UINT            style = 0
  503. );
  504.  
  505. extern int SFXAPI SFXMsgBox
  506. (
  507.     HWND            hWndParent,
  508.     const char far* text,
  509.     const char far* caption,
  510.     UINT            type = 0,
  511.     UINT            style = 0
  512. );
  513.  
  514. extern int SFXAPI SFXInputBox
  515. (
  516.     HWND            hWndParent,
  517.     const char far* caption,
  518.     const char far* prompt,
  519.     char far*       text,
  520.     UINT            maxCount = 144,
  521.     UINT            style = 0
  522. );
  523.  
  524. extern BOOL SFXAPI SFXOpenDir
  525. (
  526.     HWND            hWndParent,
  527.     char far*       dir,
  528.     const char far* title = "",
  529.     DWORD           flags = 0,
  530.     int             templateId = 0,
  531.     BOOL            center = FALSE
  532. );
  533.  
  534. extern BOOL SFXAPI SFXOpenFile
  535. (
  536.     HWND            hwndParent,
  537.     char far*       file,
  538.     const char far* filters,
  539.     DWORD           flags = 0,
  540.     int             templateId = 0,
  541.     BOOL            center = FALSE,
  542.     const char far* title = "",
  543.     DWORD far*      filterIndex = 0,
  544.     const char far* defExt = ""
  545. );
  546.  
  547. extern BOOL SFXAPI SFXSaveFile
  548. (
  549.     HWND            hwndParent,
  550.     char far*       file,
  551.     const char far* filters,
  552.     DWORD           flags = 0,
  553.     int             templateId = 0,
  554.     BOOL            center = FALSE,
  555.     const char far* title = "",
  556.     DWORD far*      filterIndex = 0,
  557.     const char far* defExt = ""
  558. );
  559.  
  560. extern HINSTANCE SFXAPI GetSFXInstance(void);
  561.  
  562. extern UINT SFXAPI GetSFXVersion(void);
  563.  
  564. #if defined(__cplusplus)
  565.  }
  566. #endif
  567.                                              
  568. #ifndef RC_INVOKED
  569.  #pragma warn .nak
  570. #endif
  571.  
  572. #endif    //    __SFX_SFX200_H
  573.  
  574.  
  575.  
  576.  
  577.