home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / Chip_2002-02_cd1.bin / sharewar / apaths / APSOURCE.ZIP / DlgHelp.c < prev    next >
C/C++ Source or Header  |  2001-03-26  |  991b  |  41 lines

  1. /* DlgHelp.c - March 26th, 2001
  2. **
  3. **      Copyright (c) 1997-2001 by Gregory Braun. All rights reserved.
  4. **
  5. **      This module contains functions to facilitate simple dialog box
  6. **      control element manipulations.
  7. **
  8. **      Called:     dlg  = window handle to the dialog box.
  9. **                  item = control identified.
  10. **
  11. **      Returns:    TRUE upon success, or FALSE if an error exists.
  12. */
  13.  
  14. #include "AppPaths.h"
  15.  
  16. extern BOOL far SetDlgIcon (HWND dlg,int id)
  17. {
  18.     return (SetClassLong (dlg,GCL_HICON,(LONG) LoadIcon (applet,(LPCSTR) id)));
  19. }
  20.  
  21. extern BOOL far SetDFocus (HWND dlg,int item)
  22. {
  23.     auto HWND   ctl = GetDlgItem (dlg,item);
  24.  
  25.     SetFocus    (ctl);
  26.     Edit_SetSel (ctl,NIL,KSTRING);
  27.  
  28.     return (FALSE);
  29. }
  30.  
  31. extern BOOL far SetDlgItemSize (HWND dlg,int item,DWORD size)
  32. {
  33.     auto HWND   ctl = GetDlgItem (dlg,item);
  34.  
  35.     Edit_LimitText (ctl,size - 1);
  36.  
  37.     return (TRUE);
  38. }
  39.  
  40. /* end of DlgHelp.c - written by Gregory Braun */
  41.