home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mdicpp.zip / MDIPPUF.CPP < prev    next >
C/C++ Source or Header  |  1993-12-20  |  1KB  |  25 lines

  1. #define INCL_WIN
  2. #include <os2.h>
  3. #include "MdiPP.ext"
  4. #include "MdiPP.hpp"
  5. void ClassMainWindow::UFCreate1More(void) {
  6.    Window1 = new ClassWindow1;
  7.    ShowWindow1((PVOID)NULL);
  8. }
  9. void UFKillItself(PGPFWINDOW pGpfWindow) {
  10.    WinDestroyWindow(pGpfWindow->GetSafeHwndFrame());
  11. }
  12. // ==== End Of Code; Begin of Explanations =====//
  13. // In this example the 'Window1' global pointer is being changed
  14. // to point to a new instance of the ClassWindow1 class. If you use
  15. // embedded actions in Gpf, you have to pay attention to the window
  16. // this pointer is pointing to, because the Gpf generated code uses
  17. // this pointer in every case when you use the 'Window1' window in embedded
  18. // actions. So, for example, if you created one more instance
  19. // and then destroyed it right away, the 'Window1' pointer becomes
  20. // NULL and all the embedded actions relating to this window
  21. // do not work. If you need to use them, you must save
  22. // the previous pointers and restore them properly.
  23. //
  24. // ==== End Of Explanations ====================//
  25.