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

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

Release 0.9.8 plus some patches.

  • Property svn:eol-style set to CRLF
  • Property svn:keywords set to Author Date Id Revision
File size: 28.6 KB
Line 
1/* $Id: winh.h 31 2001-01-30 18:42:31Z 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 const char *pcszItemTitle,
132 SHORT afStyle,
133 SHORT afAttr);
134
135 HWND XWPENTRY winhInsertSubmenu(HWND hwndMenu,
136 ULONG iPosition,
137 SHORT sMenuId,
138 const char *pcszSubmenuTitle,
139 USHORT afMenuStyle,
140 SHORT sItemId,
141 const char *pcszItemTitle,
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 winhSetSliderTicks(HWND hwndSlider,
203 MPARAM mpEveryOther1,
204 ULONG ulPixels1,
205 MPARAM mpEveryOther2,
206 ULONG ulPixels2);
207
208 /*
209 * winhSetSliderArmPosition:
210 * this moves the slider arm in a given
211 * linear slider.
212 *
213 * usMode can be one of the following:
214 * -- SMA_RANGEVALUE: usOffset is in pixels
215 * from the slider's home position.
216 * -- SMA_INCREMENTVALUE: usOffset is in
217 * units of the slider's primary scale.
218 */
219
220 #define winhSetSliderArmPosition(hwndSlider, usMode, usOffset) \
221 WinSendMsg(hwndSlider, SLM_SETSLIDERINFO, \
222 MPFROM2SHORT(SMA_SLIDERARMPOSITION, \
223 usMode), \
224 MPFROMSHORT(usOffset))
225
226 /*
227 * winhQuerySliderArmPosition:
228 * reverse to the previous, this returns a
229 * slider arm position (as a LONG value).
230 */
231
232 #define winhQuerySliderArmPosition(hwndSlider, usMode) \
233 (LONG)(WinSendMsg(hwndSlider, \
234 SLM_QUERYSLIDERINFO, \
235 MPFROM2SHORT(SMA_SLIDERARMPOSITION, \
236 usMode), \
237 0))
238
239 HWND XWPENTRY winhReplaceWithCircularSlider(HWND hwndParent,
240 HWND hwndOwner,
241 HWND hwndInsertAfter,
242 ULONG ulID,
243 ULONG ulSliderStyle,
244 SHORT sMin,
245 SHORT sMax,
246 USHORT usIncrement,
247 USHORT usTicksEvery);
248
249 /* ******************************************************************
250 *
251 * Spin button helpers
252 *
253 ********************************************************************/
254
255 VOID XWPENTRY winhSetDlgItemSpinData(HWND hwndDlg,
256 ULONG idSpinButton,
257 ULONG min,
258 ULONG max,
259 ULONG current);
260
261 LONG XWPENTRY winhAdjustDlgItemSpinData(HWND hwndDlg,
262 USHORT usItemID,
263 LONG lGrid,
264 USHORT usNotifyCode);
265
266 /* ******************************************************************
267 *
268 * Entry field helpers
269 *
270 ********************************************************************/
271
272 /*
273 * winhSetEntryFieldLimit:
274 * sets the maximum length for the entry field
275 * (EM_SETTEXTLIMIT message).
276 *
277 * PMREF doesn't say this, but the limit does
278 * _not_ include the null-terminator. That is,
279 * if you specify "12" characters here, you can
280 * really enter 12 characters.
281 *
282 * The default length is 30 characters, I think.
283 */
284
285 #define winhSetEntryFieldLimit(hwndEntryField, usLength) \
286 WinSendMsg(hwndEntryField, EM_SETTEXTLIMIT, (MPARAM)(usLength), (MPARAM)0)
287
288 /*
289 *@@ winhEntryFieldSelectAll:
290 * this selects the entire text in the entry field.
291 * Useful when the thing gets the focus.
292 */
293
294 #define winhEntryFieldSelectAll(hwndEntryField) \
295 WinSendMsg(hwndEntryField, EM_SETSEL, MPFROM2SHORT(0, 10000), MPNULL)
296
297 /*
298 *@@ winhHasEntryFieldChanged:
299 * this queries whether the entry field's contents
300 * have changed (EM_QUERYCHANGED message).
301 *
302 * This returns TRUE if changes have occured since
303 * the last time this message or WM_QUERYWINDOWPARAMS
304 * (WinQueryWindowText) was received.
305 */
306
307 #define winhHasEntryFieldChanged(hwndEntryField) \
308 (BOOL)WinSendMsg(hwndEntryField, EM_QUERYCHANGED, (MPARAM)0, (MPARAM)0)
309
310 /* ******************************************************************
311 *
312 * List box helpers
313 *
314 ********************************************************************/
315
316 /* The following macros are defined in the OS/2 headers for
317 list boxes:
318
319 LONG WinQueryLboxCount(HWND hwndLbox);
320 // wrapper around LM_QUERYITEMCOUNT;
321 // list box item count
322
323 SHORT WinQueryLboxItemTextLength(HWND hwndLbox,
324 SHORT index); // item index, starting from 0
325 // wrapper around LM_QUERYITEMTEXTLENGTH;
326 // returns length of item text, excluding NULL character
327
328 LONG WinQueryLboxItemText(HWND hwndLbox,
329 SHORT index, // item index, starting from 0
330 PSZ psz, // buffer
331 PSZ cchMax); // size of buffer, incl. null
332 // wrapper around LM_QUERYITEMTEXT;
333 // returns length of item text, excluding NULL character
334
335 BOOL WinSetLboxItemText(HWND hwndLbox,
336 LONG index,
337 PSZ psz);
338 // wrapper around LM_SETITEMTEXT
339
340 LONG WinInsertLboxItem(HWND hwndLbox,
341 LONG index, // new item index, starting from 0
342 // or LIT_END
343 // or LIT_SORTASCENDING
344 // or LIT_SORTDESCENDING
345 PSZ psz)
346 // wrapper around LM_INSERTITEM;
347 // returns LIT_MEMERROR, LIT_ERROR, or zero-based index
348
349 LONG WinDeleteLboxItem(HWND hwndLbox,
350 LONG index); // item index, starting from 0
351
352 LONG WinQueryLboxSelectedItem(HWND hwndLbox);
353 // wrapper around LM_QUERYSELECTION;
354 // works with single selection only,
355 // use winhQueryLboxSelectedItem instead
356 */
357
358 /*
359 * winhQueryLboxItemCount:
360 * returns the no. of items in the listbox
361 * as a SHORT.
362 *
363 *added V0.9.1 (99-12-14) [umoeller]
364 */
365
366 // #define winhQueryLboxItemCount(hwndListBox)
367 // (SHORT)WinSendMsg(hwndListBox, LM_QUERYITEMCOUNT, 0, 0)
368
369 // removed, use WinQueryLboxCount
370
371 /*
372 *@@ winhDeleteAllItems:
373 * deletes all list box items. Returns
374 * a BOOL.
375 *
376 *@@added V0.9.1 (99-12-14) [umoeller]
377 */
378
379 #define winhDeleteAllItems(hwndListBox) \
380 (BOOL)WinSendMsg(hwndListBox, \
381 LM_DELETEALL, 0, 0)
382 /*
383 *@@ winhQueryLboxSelectedItem:
384 * this queries the next selected list box item.
385 * For the first call, set sItemStart to LIT_FIRST;
386 * then repeat the call with sItemStart set to
387 * the previous return value until this returns
388 * LIT_NONE.
389 *
390 * Example:
391 + SHORT sItemStart = LIT_FIRST;
392 + while (TRUE)
393 + {
394 + sItemStart = winhQueryLboxSelectedItem(hwndListBox,
395 + sItemStart)
396 + if (sItemStart == LIT_NONE)
397 + break;
398 + ...
399 + }
400 *
401 * To have the cursored item returned, use LIT_CURSOR.
402 *
403 * For single selection, you can also use
404 * WinQueryLboxSelectedItem from the OS/2 PM headers.
405 */
406
407 #define winhQueryLboxSelectedItem(hwndListBox, sItemStart) \
408 (SHORT)(WinSendMsg(hwndListBox, \
409 LM_QUERYSELECTION, \
410 (MPARAM)(sItemStart), \
411 MPNULL))
412
413 /*
414 *@@ winhSetLboxSelectedItem:
415 * selects a list box item.
416 * This works for both single-selection and
417 * multiple-selection listboxes.
418 * In single-selection listboxes, if an item
419 * is selected (fSelect == TRUE), the previous
420 * item is automatically deselected.
421 * Note that (BOOL)fSelect is ignored if
422 * sItemIndex == LIT_NONE.
423 */
424
425 #define winhSetLboxSelectedItem(hwndListBox, sItemIndex, fSelect) \
426 (BOOL)(WinSendMsg(hwndListBox, \
427 LM_SELECTITEM, \
428 (MPARAM)(sItemIndex), \
429 (MPARAM)(fSelect)))
430
431 ULONG XWPENTRY winhLboxSelectAll(HWND hwndListBox, BOOL fSelect);
432
433 /*
434 * winhSetLboxItemHandle:
435 * sets the "item handle" for the specified sItemIndex.
436 * See LM_SETITEMHANDLE in PMREF for details.
437 */
438
439 #define winhSetLboxItemHandle(hwndListBox, sItemIndex, ulHandle) \
440 (BOOL)(WinSendMsg(hwndListBox, LM_SETITEMHANDLE, \
441 (MPARAM)(sItemIndex), \
442 (MPARAM)ulHandle))
443
444 /*
445 * winhQueryLboxItemHandle:
446 * the reverse to the previous. Returns a ULONG.
447 */
448
449 #define winhQueryLboxItemHandle(hwndListBox, sItemIndex) \
450 (ULONG)WinSendMsg(hwndListBox, LM_QUERYITEMHANDLE, \
451 MPFROMSHORT(sItemIndex), (MPARAM)NULL)
452
453 PSZ XWPENTRY winhQueryLboxItemText(HWND hwndListbox, SHORT sIndex);
454
455 BOOL XWPENTRY winhMoveLboxItem(HWND hwndSource,
456 SHORT sSourceIndex,
457 HWND hwndTarget,
458 SHORT sTargetIndex,
459 BOOL fSelectTarget);
460
461 /* ******************************************************************
462 *
463 * Scroll bar helpers
464 *
465 ********************************************************************/
466
467 BOOL XWPENTRY winhUpdateScrollBar(HWND hwndScrollBar,
468 ULONG ulWinPels,
469 ULONG ulViewportPels,
470 ULONG ulCurUnitOfs,
471 BOOL fAutoHide);
472
473 BOOL XWPENTRY winhHandleScrollMsg(HWND hwnd2Scroll,
474 HWND hwndScrollBar,
475 PULONG pulCurPelsOfs,
476 PRECTL prcl2Scroll,
477 LONG ulViewportPels,
478 USHORT usLineStepUnits,
479 ULONG msg,
480 MPARAM mp2);
481
482 BOOL XWPENTRY winhProcessScrollChars(HWND hwndClient,
483 HWND hwndVScroll,
484 HWND hwndHScroll,
485 MPARAM mp1,
486 MPARAM mp2,
487 ULONG ulVertMax,
488 ULONG ulHorzMax);
489
490 /* ******************************************************************
491 *
492 * Window positioning helpers
493 *
494 ********************************************************************/
495
496 BOOL XWPENTRY winhSaveWindowPos(HWND hwnd, HINI hIni, const char *pcszApp, const char *pcszKey);
497
498 BOOL XWPENTRY winhRestoreWindowPos(HWND hwnd, HINI hIni, const char *pcszApp, const char *pcszKey, ULONG fl);
499
500 #define XAC_MOVEX 0x0001
501 #define XAC_MOVEY 0x0002
502 #define XAC_SIZEX 0x0004
503 #define XAC_SIZEY 0x0008
504
505 /*
506 *@@ XADJUSTCTRLS:
507 *
508 */
509
510 typedef struct _XADJUSTCTRLS
511 {
512 BOOL fInitialized;
513 SWP swpMain; // SWP for main window
514 SWP *paswp; // pointer to array of control SWP structs
515 } XADJUSTCTRLS, *PXADJUSTCTRLS;
516
517 BOOL XWPENTRY winhAdjustControls(HWND hwndDlg,
518 MPARAM *pmpFlags,
519 ULONG ulCount,
520 PSWP pswpNew,
521 PXADJUSTCTRLS pxac);
522
523 void XWPENTRY winhCenterWindow(HWND hwnd);
524 typedef void XWPENTRY WINHCENTERWINDOW(HWND hwnd);
525 typedef WINHCENTERWINDOW *PWINHCENTERWINDOW;
526
527 HWND XWPENTRY winhFindWindowBelow(HWND hwndFind);
528
529 /* ******************************************************************
530 *
531 * Presparams helpers
532 *
533 ********************************************************************/
534
535 PSZ XWPENTRY winhQueryWindowFont(HWND hwnd);
536 typedef PSZ XWPENTRY WINHQUERYWINDOWFONT(HWND hwnd);
537 typedef WINHQUERYWINDOWFONT *PWINHQUERYWINDOWFONT;
538
539 BOOL XWPENTRY winhSetWindowFont(HWND hwnd, const char *pcszFont);
540 typedef BOOL XWPENTRY WINHSETWINDOWFONT(HWND hwnd, const char *pcszFont);
541 typedef WINHSETWINDOWFONT *PWINHSETWINDOWFONT;
542
543 /*
544 *@@ winhSetDlgItemFont:
545 * invokes winhSetWindowFont on a dialog
546 * item.
547 *
548 * Returns TRUE if successful or FALSE otherwise.
549 *
550 *@@added V0.9.0
551 */
552
553 #define winhSetDlgItemFont(hwnd, usId, pszFont) \
554 (winhSetWindowFont(WinWindowFromID(hwnd, usId), pszFont))
555
556 ULONG XWPENTRY winhSetControlsFont(HWND hwndDlg, SHORT usIDMin, SHORT usIDMax, const char *pcszFont);
557
558 #ifdef INCL_WINSYS
559 BOOL XWPENTRY winhStorePresParam(PPRESPARAMS *pppp,
560 ULONG ulAttrType,
561 ULONG cbData,
562 PVOID pData);
563 #endif
564
565 LONG XWPENTRY winhQueryPresColor(HWND hwnd, ULONG ulPP, BOOL fInherit, LONG lSysColor);
566 typedef LONG XWPENTRY WINHQUERYPRESCOLOR(HWND hwnd, ULONG ulPP, BOOL fInherit, LONG lSysColor);
567 typedef WINHQUERYPRESCOLOR *PWINHQUERYPRESCOLOR;
568
569 /* ******************************************************************
570 *
571 * Help instance helpers
572 *
573 ********************************************************************/
574
575 #ifdef INCL_WINHELP
576 HWND XWPENTRY winhCreateHelp(HWND hwndFrame,
577 const char *pcszFileName,
578 HMODULE hmod,
579 PHELPTABLE pHelpTable,
580 const char *pcszWindowTitle);
581
582 ULONG winhDisplayHelpPanel(HWND hwndHelpInstance,
583 ULONG ulHelpPanel);
584
585 void XWPENTRY winhDestroyHelp(HWND hwndHelp, HWND hwndFrame);
586 #endif
587
588 /* ******************************************************************
589 *
590 * Application control
591 *
592 ********************************************************************/
593
594 #ifdef INCL_WINPROGRAMLIST
595 HAPP XWPENTRY winhStartApp(HWND hwndNotify, const PROGDETAILS *pcProgDetails);
596 #endif
597
598 BOOL XWPENTRY winhAnotherInstance(const char *pcszSemName, BOOL fSwitch);
599
600 HSWITCH XWPENTRY winhAddToTasklist(HWND hwnd, HPOINTER hIcon);
601
602 /* ******************************************************************
603 *
604 * Miscellaneous
605 *
606 ********************************************************************/
607
608 VOID XWPENTRY winhFree(PVOID p);
609 typedef VOID XWPENTRY WINHFREE(PVOID p);
610 typedef WINHFREE *PWINHFREE;
611
612 VOID XWPENTRY winhSleep(HAB hab, ULONG ulSleep);
613
614 #define WINH_FOD_SAVEDLG 0x0001
615 #define WINH_FOD_INILOADDIR 0x0010
616 #define WINH_FOD_INISAVEDIR 0x0020
617
618 BOOL XWPENTRY winhFileDlg(HWND hwndOwner,
619 PSZ pszFile,
620 ULONG flFlags,
621 HINI hini,
622 const char *pcszApplication,
623 const char *pcszKey);
624
625 HPOINTER XWPENTRY winhSetWaitPointer(VOID);
626
627 PSZ XWPENTRY winhQueryWindowText(HWND hwnd);
628
629 /*
630 *@@ winhQueryDlgItemText:
631 * like winhQueryWindowText, but for the dialog item
632 * in hwnd which has the ID usItemID.
633 */
634
635 #define winhQueryDlgItemText(hwnd, usItemID) winhQueryWindowText(WinWindowFromID(hwnd, usItemID))
636
637 BOOL XWPENTRY winhReplaceWindowText(HWND hwnd,
638 const char *pcszSearch,
639 const char *pcszReplaceWith);
640
641 ULONG XWPENTRY winhCenteredDlgBox(HWND hwndParent, HWND hwndOwner,
642 PFNWP pfnDlgProc, HMODULE hmod, ULONG idDlg, PVOID pCreateParams);
643 typedef ULONG XWPENTRY WINHCENTEREDDLGBOX(HWND hwndParent, HWND hwndOwner,
644 PFNWP pfnDlgProc, HMODULE hmod, ULONG idDlg, PVOID pCreateParams);
645 typedef WINHCENTEREDDLGBOX *PWINHCENTEREDDLGBOX;
646
647 ULONG XWPENTRY winhEnableControls(HWND hwndDlg,
648 USHORT usIDFirst,
649 USHORT usIDLast,
650 BOOL fEnable);
651
652 HWND XWPENTRY winhCreateStdWindow(HWND hwndFrameParent,
653 PSWP pswpFrame,
654 ULONG flFrameCreateFlags,
655 ULONG ulFrameStyle,
656 const char *pcszFrameTitle,
657 ULONG ulResourcesID,
658 const char *pcszClassClient,
659 ULONG flStyleClient,
660 ULONG ulID,
661 PVOID pClientCtlData,
662 PHWND phwndClient);
663
664 HWND winhCreateObjectWindow(const char *pcszWindowClass,
665 PVOID pvCreateParam);
666
667 VOID XWPENTRY winhRepaintWindows(HWND hwndParent);
668
669 HMQ XWPENTRY winhFindMsgQueue(PID pid, TID tid, HAB* phab);
670
671 VOID XWPENTRY winhFindPMErrorWindows(HWND *phwndHardError, HWND *phwndSysError);
672
673 HWND XWPENTRY winhCreateFakeDesktop(HWND hwndSibling);
674
675 BOOL XWPENTRY winhAssertWarp4Notebook(HWND hwndDlg,
676 USHORT usIdThreshold,
677 ULONG ulDownUnits);
678
679 ULONG XWPENTRY winhDrawFormattedText(HPS hps, PRECTL prcl, const char *pcszText, ULONG flCmd);
680
681 #ifdef INCL_WINSWITCHLIST
682 PSWBLOCK XWPENTRY winhQuerySwitchList(HAB hab);
683 typedef PSWBLOCK XWPENTRY WINHQUERYSWITCHLIST(HAB hab);
684 typedef WINHQUERYSWITCHLIST *PWINHQUERYSWITCHLIST;
685 #endif
686
687 HWND XWPENTRY winhQueryTasklistWindow(VOID);
688 typedef HWND XWPENTRY WINHQUERYTASKLISTWINDOW(VOID);
689 typedef WINHQUERYTASKLISTWINDOW *PWINHQUERYTASKLISTWINDOW;
690
691 VOID XWPENTRY winhKillTasklist(VOID);
692
693 ULONG XWPENTRY winhQueryPendingSpoolJobs(VOID);
694
695 VOID XWPENTRY winhSetNumLock(BOOL fState);
696
697 /*
698 *@@ winhQueryScreenCX:
699 * helper macro for getting the screen width.
700 */
701
702 #define winhQueryScreenCX() (WinQuerySysValue(HWND_DESKTOP, SV_CXSCREEN))
703
704 /*
705 *@@ winhQueryScreenCY:
706 * helper macro for getting the screen height.
707 */
708
709 #define winhQueryScreenCY() (WinQuerySysValue(HWND_DESKTOP, SV_CYSCREEN))
710
711 /* ******************************************************************
712 *
713 * WPS Class List helpers
714 *
715 ********************************************************************/
716
717 PBYTE XWPENTRY winhQueryWPSClassList(VOID);
718
719 PBYTE XWPENTRY winhQueryWPSClass(PBYTE pObjClass, const char *pszClass);
720
721 APIRET XWPENTRY winhRegisterClass(const char* pcszClassName,
722 const char* pcszModule,
723 PSZ pszBuf,
724 ULONG cbBuf);
725
726 BOOL XWPENTRY winhIsClassRegistered(const char *pcszClass);
727
728 ULONG XWPENTRY winhResetWPS(HAB hab);
729#endif
730
731#if __cplusplus
732}
733#endif
734
Note: See TracBrowser for help on using the repository browser.