source: trunk/include/helpers/winh.h@ 21

Last change on this file since 21 was 14, checked in by umoeller, 25 years ago

Major updates; timers, LVM, miscellaneous.

  • Property svn:eol-style set to CRLF
  • Property svn:keywords set to Author Date Id Revision
File size: 28.7 KB
Line 
1/* $Id: winh.h 14 2000-12-09 19:19:42Z umoeller $ */
2
3
4/*
5 *@@sourcefile winh.h:
6 * header file for winh.c (PM helper funcs). See remarks there.
7 *
8 * Note: Version numbering in this file relates to XWorkplace version
9 * numbering.
10 */
11
12/* Copyright (C) 1997-2000 Ulrich M”ller.
13 * This file is part of the "XWorkplace helpers" source package.
14 * This is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published
16 * by the Free Software Foundation, in version 2 as it comes in the
17 * "COPYING" file of the XWorkplace main distribution.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 *@@include #define INCL_WINWINDOWMGR
24 *@@include #define INCL_WINMESSAGEMGR
25 *@@include #define INCL_WINSYS // for winhStorePresParam
26 *@@include #define INCL_WINDIALOGS
27 *@@include #define INCL_WINMENUS // for menu helpers
28 *@@include #define INCL_WINENTRYFIELDS // for entry field helpers
29 *@@include #define INCL_WINBUTTONS // for button/check box helpers
30 *@@include #define INCL_WINLISTBOXES // for list box helpers
31 *@@include #define INCL_WINSTDSPIN // for spin button helpers
32 *@@include #define INCL_WINSTDSLIDER // for slider helpers
33 *@@include #define INCL_WININPUT
34 *@@include #define INCL_WINSYS
35 *@@include #define INCL_WINSHELLDATA
36 *@@include #define INCL_WINSWITCHLIST // for winhQuerySwitchList
37 *@@include #define INCL_WINPROGRAMLIST // for winhStartApp
38 *@@include #define INCL_WINHELP // for help manager helpers
39 *@@include #include <os2.h>
40 *@@include #include "winh.h"
41 */
42
43#if __cplusplus
44extern "C" {
45#endif
46
47#ifndef WINH_HEADER_INCLUDED
48 #define WINH_HEADER_INCLUDED
49
50 #ifndef XWPENTRY
51 #error You must define XWPENTRY to contain the standard linkage for the XWPHelpers.
52 #endif
53
54 /* ******************************************************************
55 *
56 * Declarations
57 *
58 ********************************************************************/
59
60 #define MPNULL (MPFROMP(NULL))
61 #define MPZERO (MPFROMSHORT(0))
62 #define MRTRUE (MRFROMSHORT((SHORT) TRUE))
63 #define MRFALSE (MRFROMSHORT((SHORT) FALSE))
64 #define BM_UNCHECKED 0 // for checkboxes: disabled
65 #define BM_CHECKED 1 // for checkboses: enabled
66 #define BM_INDETERMINATE 2 // for tri-state checkboxes: indeterminate
67
68 /* ******************************************************************
69 *
70 * Macros
71 *
72 ********************************************************************/
73
74 /*
75 * Here come some monster macros for
76 * frequently needed functions.
77 */
78
79 #define winhDebugBox(hwndOwner, title, text) \
80 WinMessageBox(HWND_DESKTOP, hwndOwner, ((PSZ)text), ((PSZ)title), 0, MB_OK | MB_ICONEXCLAMATION | MB_MOVEABLE)
81
82 #define winhYesNoBox(title, text) \
83 WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, ((PSZ)text), ((PSZ)title), 0, MB_YESNO | MB_ICONQUESTION | MB_MOVEABLE)
84
85 #define winhSetDlgItemChecked(hwnd, id, bCheck) \
86 WinSendDlgItemMsg((hwnd), (id), BM_SETCHECK, MPFROMSHORT(bCheck), MPNULL)
87
88 #define winhIsDlgItemChecked(hwnd, id) \
89 (SHORT1FROMMR(WinSendDlgItemMsg((hwnd), (id), BM_QUERYCHECK, MPNULL, MPNULL)))
90
91 #define winhSetMenuItemChecked(hwndMenu, usId, bCheck) \
92 WinSendMsg(hwndMenu, MM_SETITEMATTR, MPFROM2SHORT(usId, TRUE), \
93 MPFROM2SHORT(MIA_CHECKED, (((bCheck)) ? MIA_CHECKED : FALSE)))
94
95 #define winhShowDlgItem(hwnd, id, show) \
96 WinShowWindow(WinWindowFromID(hwnd, id), show)
97
98 #define winhEnableDlgItem(hwndDlg, ulId, Enable) \
99 WinEnableWindow(WinWindowFromID(hwndDlg, ulId), Enable)
100
101 #define winhIsDlgItemEnabled(hwndDlg, ulId) \
102 WinIsWindowEnabled(WinWindowFromID(hwndDlg, ulId))
103
104 #define winhSetDlgItemFocus(hwndDlg, ulId) \
105 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwndDlg, ulId))
106
107 /* ******************************************************************
108 *
109 * Menu helpers
110 *
111 ********************************************************************/
112
113 /*
114 * winhCreateEmptyMenu:
115 * this macro creates an empty menu, which can
116 * be used with winhInsertMenuItem etc. later.
117 * Useful for creating popup menus on the fly.
118 * Note that even though HWND_DESKTOP is specified
119 * here as both the parent and the owner, the
120 * actual owner and parent are specified later
121 * with WinPopupMenu.
122 */
123
124 #define winhCreateEmptyMenu() \
125 WinCreateWindow(HWND_DESKTOP, WC_MENU, "", 0, 0, 0, 0, 0, \
126 HWND_DESKTOP, HWND_TOP, 0, 0, 0)
127
128 SHORT XWPENTRY winhInsertMenuItem(HWND hwndMenu,
129 SHORT iPosition,
130 SHORT sItemId,
131 PSZ pszItemTitle,
132 SHORT afStyle,
133 SHORT afAttr);
134
135 HWND XWPENTRY winhInsertSubmenu(HWND hwndMenu,
136 ULONG iPosition,
137 SHORT sMenuId,
138 PSZ pszSubmenuTitle,
139 USHORT afMenuStyle,
140 SHORT sItemId,
141 PSZ pszItemTitle,
142 USHORT afItemStyle,
143 USHORT afAttribute);
144
145 /*
146 *@@ winhRemoveMenuItem:
147 * removes a menu item (SHORT) from the
148 * given menu (HWND). Returns the no. of
149 * remaining menu items (SHORT).
150 *
151 * This works for whole submenus too.
152 */
153
154 #define winhRemoveMenuItem(hwndMenu, sItemId) \
155 (SHORT)WinSendMsg(hwndMenu, MM_REMOVEITEM, MPFROM2SHORT(sItemId, FALSE), 0)
156
157 /*
158 *@@ winhDeleteMenuItem:
159 * deleted a menu item (SHORT) from the
160 * given menu (HWND). Returns the no. of
161 * remaining menu items (SHORT).
162 *
163 * As opposed to MM_REMOVEITEM, MM_DELETEITEM
164 * frees submenus and bitmaps also.
165 *
166 * This works for whole submenus too.
167 */
168
169 #define winhDeleteMenuItem(hwndMenu, sItemId) \
170 (SHORT)WinSendMsg(hwndMenu, MM_DELETEITEM, MPFROM2SHORT(sItemId, FALSE), 0)
171
172 SHORT XWPENTRY winhInsertMenuSeparator(HWND hMenu,
173 SHORT iPosition,
174 SHORT sId);
175
176 PSZ XWPENTRY winhQueryMenuItemText(HWND hwndMenu,
177 USHORT usItemID);
178
179 BOOL XWPENTRY winhAppend2MenuItemText(HWND hwndMenu,
180 USHORT usItemID,
181 const char *pcszAppend,
182 BOOL fTab);
183
184 VOID XWPENTRY winhMenuRemoveEllipse(HWND hwndMenu,
185 USHORT usItemId);
186
187 SHORT XWPENTRY winhQueryItemUnderMouse(HWND hwndMenu, POINTL *pptlMouse, RECTL *prtlItem);
188
189 /* ******************************************************************
190 *
191 * Slider helpers
192 *
193 ********************************************************************/
194
195 HWND XWPENTRY winhReplaceWithLinearSlider(HWND hwndParent,
196 HWND hwndOwner,
197 HWND hwndInsertAfter,
198 ULONG ulID,
199 ULONG ulSliderStyle,
200 ULONG ulTickCount);
201
202 BOOL XWPENTRY winhSetSliderTicks(HWND hwndSlider, MPARAM mpEveryOther, ULONG ulPixels);
203
204 /*
205 * winhSetSliderArmPosition:
206 * this moves the slider arm in a given
207 * linear slider.
208 *
209 * usMode can be one of the following:
210 * -- SMA_RANGEVALUE: usOffset is in pixels
211 * from the slider's home position.
212 * -- SMA_INCREMENTVALUE: usOffset is in
213 * units of the slider's primary scale.
214 */
215
216 #define winhSetSliderArmPosition(hwndSlider, usMode, usOffset) \
217 WinSendMsg(hwndSlider, SLM_SETSLIDERINFO, \
218 MPFROM2SHORT(SMA_SLIDERARMPOSITION, \
219 usMode), \
220 MPFROMSHORT(usOffset))
221
222 /*
223 * winhQuerySliderArmPosition:
224 * reverse to the previous, this returns a
225 * slider arm position (as a LONG value).
226 */
227
228 #define winhQuerySliderArmPosition(hwndSlider, usMode) \
229 (LONG)(WinSendMsg(hwndSlider, \
230 SLM_QUERYSLIDERINFO, \
231 MPFROM2SHORT(SMA_SLIDERARMPOSITION, \
232 usMode), \
233 0))
234
235 HWND XWPENTRY winhReplaceWithCircularSlider(HWND hwndParent,
236 HWND hwndOwner,
237 HWND hwndInsertAfter,
238 ULONG ulID,
239 ULONG ulSliderStyle,
240 SHORT sMin,
241 SHORT sMax,
242 USHORT usIncrement,
243 USHORT usTicksEvery);
244
245 /* ******************************************************************
246 *
247 * Spin button helpers
248 *
249 ********************************************************************/
250
251 VOID XWPENTRY winhSetDlgItemSpinData(HWND hwndDlg,
252 ULONG idSpinButton,
253 ULONG min,
254 ULONG max,
255 ULONG current);
256
257 LONG XWPENTRY winhAdjustDlgItemSpinData(HWND hwndDlg,
258 USHORT usItemID,
259 LONG lGrid,
260 USHORT usNotifyCode);
261
262 /* ******************************************************************
263 *
264 * Entry field helpers
265 *
266 ********************************************************************/
267
268 /*
269 * winhSetEntryFieldLimit:
270 * sets the maximum length for the entry field
271 * (EM_SETTEXTLIMIT message).
272 *
273 * PMREF doesn't say this, but the limit does
274 * _not_ include the null-terminator. That is,
275 * if you specify "12" characters here, you can
276 * really enter 12 characters.
277 *
278 * The default length is 30 characters, I think.
279 */
280
281 #define winhSetEntryFieldLimit(hwndEntryField, usLength) \
282 WinSendMsg(hwndEntryField, EM_SETTEXTLIMIT, (MPARAM)(usLength), (MPARAM)0)
283
284 /*
285 *@@ winhEntryFieldSelectAll:
286 * this selects the entire text in the entry field.
287 * Useful when the thing gets the focus.
288 */
289
290 #define winhEntryFieldSelectAll(hwndEntryField) \
291 WinSendMsg(hwndEntryField, EM_SETSEL, MPFROM2SHORT(0, 10000), MPNULL)
292
293 /*
294 *@@ winhHasEntryFieldChanged:
295 * this queries whether the entry field's contents
296 * have changed (EM_QUERYCHANGED message).
297 *
298 * This returns TRUE if changes have occured since
299 * the last time this message or WM_QUERYWINDOWPARAMS
300 * (WinQueryWindowText) was received.
301 */
302
303 #define winhHasEntryFieldChanged(hwndEntryField) \
304 (BOOL)WinSendMsg(hwndEntryField, EM_QUERYCHANGED, (MPARAM)0, (MPARAM)0)
305
306 /* ******************************************************************
307 *
308 * List box helpers
309 *
310 ********************************************************************/
311
312 /* The following macros are defined in the OS/2 headers for
313 list boxes:
314
315 LONG WinQueryLboxCount(HWND hwndLbox);
316 // wrapper around LM_QUERYITEMCOUNT;
317 // list box item count
318
319 SHORT WinQueryLboxItemTextLength(HWND hwndLbox,
320 SHORT index); // item index, starting from 0
321 // wrapper around LM_QUERYITEMTEXTLENGTH;
322 // returns length of item text, excluding NULL character
323
324 LONG WinQueryLboxItemText(HWND hwndLbox,
325 SHORT index, // item index, starting from 0
326 PSZ psz, // buffer
327 PSZ cchMax); // size of buffer, incl. null
328 // wrapper around LM_QUERYITEMTEXT;
329 // returns length of item text, excluding NULL character
330
331 BOOL WinSetLboxItemText(HWND hwndLbox,
332 LONG index,
333 PSZ psz);
334 // wrapper around LM_SETITEMTEXT
335
336 LONG WinInsertLboxItem(HWND hwndLbox,
337 LONG index, // new item index, starting from 0
338 // or LIT_END
339 // or LIT_SORTASCENDING
340 // or LIT_SORTDESCENDING
341 PSZ psz)
342 // wrapper around LM_INSERTITEM;
343 // returns LIT_MEMERROR, LIT_ERROR, or zero-based index
344
345 LONG WinDeleteLboxItem(HWND hwndLbox,
346 LONG index); // item index, starting from 0
347
348 LONG WinQueryLboxSelectedItem(HWND hwndLbox);
349 // wrapper around LM_QUERYSELECTION;
350 // works with single selection only,
351 // use winhQueryLboxSelectedItem instead
352 */
353
354 /*
355 * winhQueryLboxItemCount:
356 * returns the no. of items in the listbox
357 * as a SHORT.
358 *
359 *added V0.9.1 (99-12-14) [umoeller]
360 */
361
362 // #define winhQueryLboxItemCount(hwndListBox)
363 // (SHORT)WinSendMsg(hwndListBox, LM_QUERYITEMCOUNT, 0, 0)
364
365 // removed, use WinQueryLboxCount
366
367 /*
368 *@@ winhDeleteAllItems:
369 * deletes all list box items. Returns
370 * a BOOL.
371 *
372 *@@added V0.9.1 (99-12-14) [umoeller]
373 */
374
375 #define winhDeleteAllItems(hwndListBox) \
376 (BOOL)WinSendMsg(hwndListBox, \
377 LM_DELETEALL, 0, 0)
378 /*
379 *@@ winhQueryLboxSelectedItem:
380 * this queries the next selected list box item.
381 * For the first call, set sItemStart to LIT_FIRST;
382 * then repeat the call with sItemStart set to
383 * the previous return value until this returns
384 * LIT_NONE.
385 *
386 * Example:
387 + SHORT sItemStart = LIT_FIRST;
388 + while (TRUE)
389 + {
390 + sItemStart = winhQueryLboxSelectedItem(hwndListBox,
391 + sItemStart)
392 + if (sItemStart == LIT_NONE)
393 + break;
394 + ...
395 + }
396 *
397 * To have the cursored item returned, use LIT_CURSOR.
398 *
399 * For single selection, you can also use
400 * WinQueryLboxSelectedItem from the OS/2 PM headers.
401 */
402
403 #define winhQueryLboxSelectedItem(hwndListBox, sItemStart) \
404 (SHORT)(WinSendMsg(hwndListBox, \
405 LM_QUERYSELECTION, \
406 (MPARAM)(sItemStart), \
407 MPNULL))
408
409 /*
410 *@@ winhSetLboxSelectedItem:
411 * selects a list box item.
412 * This works for both single-selection and
413 * multiple-selection listboxes.
414 * In single-selection listboxes, if an item
415 * is selected (fSelect == TRUE), the previous
416 * item is automatically deselected.
417 * Note that (BOOL)fSelect is ignored if
418 * sItemIndex == LIT_NONE.
419 */
420
421 #define winhSetLboxSelectedItem(hwndListBox, sItemIndex, fSelect) \
422 (BOOL)(WinSendMsg(hwndListBox, \
423 LM_SELECTITEM, \
424 (MPARAM)(sItemIndex), \
425 (MPARAM)(fSelect)))
426
427 ULONG XWPENTRY winhLboxSelectAll(HWND hwndListBox, BOOL fSelect);
428
429 /*
430 * winhSetLboxItemHandle:
431 * sets the "item handle" for the specified sItemIndex.
432 * See LM_SETITEMHANDLE in PMREF for details.
433 */
434
435 #define winhSetLboxItemHandle(hwndListBox, sItemIndex, ulHandle) \
436 (BOOL)(WinSendMsg(hwndListBox, LM_SETITEMHANDLE, \
437 (MPARAM)(sItemIndex), \
438 (MPARAM)ulHandle))
439
440 /*
441 * winhQueryLboxItemHandle:
442 * the reverse to the previous. Returns a ULONG.
443 */
444
445 #define winhQueryLboxItemHandle(hwndListBox, sItemIndex) \
446 (ULONG)WinSendMsg(hwndListBox, LM_QUERYITEMHANDLE, \
447 MPFROMSHORT(sItemIndex), (MPARAM)NULL)
448
449 PSZ XWPENTRY winhQueryLboxItemText(HWND hwndListbox, SHORT sIndex);
450
451 BOOL XWPENTRY winhMoveLboxItem(HWND hwndSource,
452 SHORT sSourceIndex,
453 HWND hwndTarget,
454 SHORT sTargetIndex,
455 BOOL fSelectTarget);
456
457 /* ******************************************************************
458 *
459 * Scroll bar helpers
460 *
461 ********************************************************************/
462
463 BOOL XWPENTRY winhUpdateScrollBar(HWND hwndScrollBar,
464 ULONG ulWinPels,
465 ULONG ulViewportPels,
466 ULONG ulCurUnitOfs,
467 BOOL fAutoHide);
468
469 BOOL XWPENTRY winhHandleScrollMsg(HWND hwnd2Scroll,
470 HWND hwndScrollBar,
471 PLONG plCurUnitOfs,
472 PRECTL prcl2Scroll,
473 LONG ulViewportPels,
474 USHORT usLineStepUnits,
475 ULONG msg,
476 MPARAM mp2);
477
478 BOOL XWPENTRY winhProcessScrollChars(HWND hwndClient,
479 HWND hwndVScroll,
480 HWND hwndHScroll,
481 MPARAM mp1,
482 MPARAM mp2,
483 ULONG ulVertMax,
484 ULONG ulHorzMax);
485
486 /* ******************************************************************
487 *
488 * Window positioning helpers
489 *
490 ********************************************************************/
491
492 BOOL XWPENTRY winhSaveWindowPos(HWND hwnd, HINI hIni, PSZ pszApp, PSZ pszKey);
493
494 BOOL XWPENTRY winhRestoreWindowPos(HWND hwnd, HINI hIni, PSZ pszApp, PSZ pszKey, ULONG fl);
495
496 #define XAC_MOVEX 0x0001
497 #define XAC_MOVEY 0x0002
498 #define XAC_SIZEX 0x0004
499 #define XAC_SIZEY 0x0008
500
501 /*
502 *@@ XADJUSTCTRLS:
503 *
504 */
505
506 typedef struct _XADJUSTCTRLS
507 {
508 BOOL fInitialized;
509 SWP swpMain; // SWP for main window
510 SWP *paswp; // pointer to array of control SWP structs
511 } XADJUSTCTRLS, *PXADJUSTCTRLS;
512
513 BOOL XWPENTRY winhAdjustControls(HWND hwndDlg,
514 MPARAM *pmpFlags,
515 ULONG ulCount,
516 PSWP pswpNew,
517 PXADJUSTCTRLS pxac);
518
519 void XWPENTRY winhCenterWindow(HWND hwnd);
520 typedef void XWPENTRY WINHCENTERWINDOW(HWND hwnd);
521 typedef WINHCENTERWINDOW *PWINHCENTERWINDOW;
522
523 HWND XWPENTRY winhFindWindowBelow(HWND hwndFind);
524
525 /* ******************************************************************
526 *
527 * Presparams helpers
528 *
529 ********************************************************************/
530
531 PSZ XWPENTRY winhQueryWindowFont(HWND hwnd);
532 typedef PSZ XWPENTRY WINHQUERYWINDOWFONT(HWND hwnd);
533 typedef WINHQUERYWINDOWFONT *PWINHQUERYWINDOWFONT;
534
535 BOOL XWPENTRY winhSetWindowFont(HWND hwnd, const char *pcszFont);
536 typedef BOOL XWPENTRY WINHSETWINDOWFONT(HWND hwnd, const char *pcszFont);
537 typedef WINHSETWINDOWFONT *PWINHSETWINDOWFONT;
538
539 /*
540 *@@ winhSetDlgItemFont:
541 * invokes winhSetWindowFont on a dialog
542 * item.
543 *
544 * Returns TRUE if successful or FALSE otherwise.
545 *
546 *@@added V0.9.0
547 */
548
549 #define winhSetDlgItemFont(hwnd, usId, pszFont) \
550 (winhSetWindowFont(WinWindowFromID(hwnd, usId), pszFont))
551
552 ULONG XWPENTRY winhSetControlsFont(HWND hwndDlg, SHORT usIDMin, SHORT usIDMax, const char *pcszFont);
553
554 #ifdef INCL_WINSYS
555 BOOL XWPENTRY winhStorePresParam(PPRESPARAMS *pppp,
556 ULONG ulAttrType,
557 ULONG cbData,
558 PVOID pData);
559 #endif
560
561 LONG XWPENTRY winhQueryPresColor(HWND hwnd, ULONG ulPP, BOOL fInherit, LONG lSysColor);
562 typedef LONG XWPENTRY WINHQUERYPRESCOLOR(HWND hwnd, ULONG ulPP, BOOL fInherit, LONG lSysColor);
563 typedef WINHQUERYPRESCOLOR *PWINHQUERYPRESCOLOR;
564
565 /* ******************************************************************
566 *
567 * Help instance helpers
568 *
569 ********************************************************************/
570
571 #ifdef INCL_WINHELP
572 HWND XWPENTRY winhCreateHelp(HWND hwndFrame,
573 PSZ pszFileName,
574 HMODULE hmod,
575 PHELPTABLE pHelpTable,
576 PSZ pszWindowTitle);
577
578 void XWPENTRY winhDestroyHelp(HWND hwndHelp, HWND hwndFrame);
579 #endif
580
581 /* ******************************************************************
582 *
583 * Application control
584 *
585 ********************************************************************/
586
587 #ifdef INCL_WINPROGRAMLIST
588 HAPP XWPENTRY winhStartApp(HWND hwndNotify, const PROGDETAILS *pcProgDetails);
589 #endif
590
591 BOOL XWPENTRY winhAnotherInstance(PSZ pszSemName, BOOL fSwitch);
592
593 HSWITCH XWPENTRY winhAddToTasklist(HWND hwnd, HPOINTER hIcon);
594
595 /* ******************************************************************
596 *
597 * Miscellaneous
598 *
599 ********************************************************************/
600
601 VOID XWPENTRY winhFree(PVOID p);
602 typedef VOID XWPENTRY WINHFREE(PVOID p);
603 typedef WINHFREE *PWINHFREE;
604
605 VOID XWPENTRY winhSleep(HAB hab, ULONG ulSleep);
606
607 #define WINH_FOD_SAVEDLG 0x0001
608 #define WINH_FOD_INILOADDIR 0x0010
609 #define WINH_FOD_INISAVEDIR 0x0020
610
611 BOOL XWPENTRY winhFileDlg(HWND hwndOwner,
612 PSZ pszFile,
613 ULONG flFlags,
614 HINI hini,
615 PSZ pszApplication,
616 PSZ pszKey);
617
618 HPOINTER XWPENTRY winhSetWaitPointer(VOID);
619
620 PSZ XWPENTRY winhQueryWindowText(HWND hwnd);
621
622 /*
623 *@@ winhQueryDlgItemText:
624 * like winhQueryWindowText, but for the dialog item
625 * in hwnd which has the ID usItemID.
626 */
627
628 #define winhQueryDlgItemText(hwnd, usItemID) winhQueryWindowText(WinWindowFromID(hwnd, usItemID))
629
630 BOOL XWPENTRY winhReplaceWindowText(HWND hwnd,
631 PSZ pszSearch,
632 PSZ pszReplaceWith);
633
634 ULONG XWPENTRY winhCenteredDlgBox(HWND hwndParent, HWND hwndOwner,
635 PFNWP pfnDlgProc, HMODULE hmod, ULONG idDlg, PVOID pCreateParams);
636 typedef ULONG XWPENTRY WINHCENTEREDDLGBOX(HWND hwndParent, HWND hwndOwner,
637 PFNWP pfnDlgProc, HMODULE hmod, ULONG idDlg, PVOID pCreateParams);
638 typedef WINHCENTEREDDLGBOX *PWINHCENTEREDDLGBOX;
639
640 ULONG XWPENTRY winhEnableControls(HWND hwndDlg,
641 USHORT usIDFirst,
642 USHORT usIDLast,
643 BOOL fEnable);
644
645 HWND XWPENTRY winhCreateStdWindow(HWND hwndFrameParent,
646 PSWP pswpFrame,
647 ULONG flFrameCreateFlags,
648 ULONG ulFrameStyle,
649 PSZ pszFrameTitle,
650 ULONG ulResourcesID,
651 PSZ pszClassClient,
652 ULONG flStyleClient,
653 ULONG ulID,
654 PVOID pClientCtlData,
655 PHWND phwndClient);
656
657 /*
658 *@@ winhCreateObjectWindow:
659 * creates an object window of the specified
660 * window class, which you should have registered
661 * before calling this. pvCreateParam will be
662 * given to the window on WM_CREATE.
663 *
664 * Returns the HWND of the object window or
665 * NULLHANDLE on errors.
666 *
667 *@@added V0.9.3 (2000-04-17) [umoeller]
668 */
669
670 #define winhCreateObjectWindow(pcszWindowClass, pvCreateParam) \
671 WinCreateWindow(HWND_OBJECT, pcszWindowClass, \
672 (PSZ)"", 0, 0,0,0,0, 0, HWND_BOTTOM, 0, pvCreateParam, NULL)
673
674 VOID XWPENTRY winhRepaintWindows(HWND hwndParent);
675
676 HMQ XWPENTRY winhFindMsgQueue(PID pid, TID tid, HAB* phab);
677
678 VOID XWPENTRY winhFindPMErrorWindows(HWND *phwndHardError, HWND *phwndSysError);
679
680 HWND XWPENTRY winhCreateFakeDesktop(HWND hwndSibling);
681
682 BOOL XWPENTRY winhAssertWarp4Notebook(HWND hwndDlg,
683 USHORT usIdThreshold,
684 ULONG ulDownUnits);
685
686 ULONG XWPENTRY winhDrawFormattedText(HPS hps, PRECTL prcl, PSZ pszText, ULONG flCmd);
687
688 #ifdef INCL_WINSWITCHLIST
689 PSWBLOCK XWPENTRY winhQuerySwitchList(HAB hab);
690 typedef PSWBLOCK XWPENTRY WINHQUERYSWITCHLIST(HAB hab);
691 typedef WINHQUERYSWITCHLIST *PWINHQUERYSWITCHLIST;
692 #endif
693
694 HWND XWPENTRY winhQueryTasklistWindow(VOID);
695 typedef HWND XWPENTRY WINHQUERYTASKLISTWINDOW(VOID);
696 typedef WINHQUERYTASKLISTWINDOW *PWINHQUERYTASKLISTWINDOW;
697
698 VOID XWPENTRY winhKillTasklist(VOID);
699
700 ULONG XWPENTRY winhQueryPendingSpoolJobs(VOID);
701
702 VOID XWPENTRY winhSetNumLock(BOOL fState);
703
704 /*
705 *@@ winhQueryScreenCX:
706 * helper macro for getting the screen width.
707 */
708
709 #define winhQueryScreenCX() (WinQuerySysValue(HWND_DESKTOP, SV_CXSCREEN))
710
711 /*
712 *@@ winhQueryScreenCY:
713 * helper macro for getting the screen height.
714 */
715
716 #define winhQueryScreenCY() (WinQuerySysValue(HWND_DESKTOP, SV_CYSCREEN))
717
718 /* ******************************************************************
719 *
720 * WPS Class List helpers
721 *
722 ********************************************************************/
723
724 PBYTE XWPENTRY winhQueryWPSClassList(VOID);
725
726 PBYTE XWPENTRY winhQueryWPSClass(PBYTE pObjClass, const char *pszClass);
727
728 APIRET XWPENTRY winhRegisterClass(const char* pcszClassName,
729 const char* pcszModule,
730 PSZ pszBuf,
731 ULONG cbBuf);
732
733 BOOL XWPENTRY winhIsClassRegistered(const char *pcszClass);
734
735 ULONG XWPENTRY winhResetWPS(HAB hab);
736#endif
737
738#if __cplusplus
739}
740#endif
741
Note: See TracBrowser for help on using the repository browser.