home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ufcpp.zip / UFSAMPUF.CPP < prev   
C/C++ Source or Header  |  1993-12-20  |  915b  |  21 lines

  1. #define INCL_WIN
  2. #include <os2.h>
  3. #include "ufsamp.ext"
  4. void ClassMainWindow::UFCopy12(void) {
  5.    char sBuf[100];
  6.    WinQueryWindowText(EntryField1.GetSafeControlHwnd(),sizeof(sBuf),sBuf);
  7.    WinSetWindowText(EntryField2.GetSafeControlHwnd(),sBuf);
  8. }
  9. //===== End Of Code ==========//
  10. //===== Begin of explanations =====//
  11. // The UFCopy12 function is declared as a member-function in the MainWindow
  12. // looks like: "public: void UFCopy12(void);" (see Member Objects at
  13. // MainWindow).
  14. // Although this function is used as an action, attached to PushButton2,
  15. // this is a MainWindow member rather than a PushButton1 member (according
  16. // to the operations in this function). The EntryField1 and EntryField2
  17. // fields are members of the ClassMainWindow class, so we can use them
  18. // without prefixes.
  19. // The User Function Object looks like: MainWindow->UFCopy12();
  20. //===== End of explanations =====//
  21.