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

Last change on this file since 41 was 41, checked in by umoeller, 24 years ago

Updated timers.

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