home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / hansn.zip / HANSNUF.CPP < prev    next >
C/C++ Source or Header  |  1994-01-26  |  773b  |  22 lines

  1. #define INCL_WIN
  2. #include <os2.h>
  3. #include "HansN.Ext"
  4. #include "HansN.Ids"
  5. void ClassMain::UFMainShowWin2(void) {
  6.    char sBuf[100];
  7.    WinQueryWindowText(Main_Ef_Crt.GetSafeControlHwnd(),sizeof(sBuf),&sBuf[0]);
  8.    //       the same as:
  9.    // WinQueryDlgItemText(hwnd,ID_MAIN_EF_CRT,sizeof(sBuf),&sBuf[0]);
  10.    ShowWin2((PVOID)sBuf);
  11. }
  12.  
  13. // This function is a ClassMain member, but can be called for any
  14. // window/dialog by typecasting. Of course, you can use just GpfWindow
  15. // fields. A User Function Object, attached to some button on your
  16. // current window to call this function, looks like:
  17. //  ( (ClassMain*)GetSafeParentWindow() ) -> UFWin2GetCrt();
  18. //
  19. void ClassMain::UFWin2GetCrt(void) {
  20.    WinSetWindowText(GetSafeHwndFrame(), (PCSZ)pCrtParms);
  21. }
  22.