home *** CD-ROM | disk | FTP | other *** search
/ Total C++ 2 / TOTALCTWO.iso / borland / dllhello.pak / DLLHELLO.CPP < prev    next >
C/C++ Source or Header  |  1997-05-06  |  904b  |  24 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // Copyright (c) 1991, 1995 by Borland International, All Rights Reserved
  4. //----------------------------------------------------------------------------
  5. #include <owl/pch.h>
  6. #include <owl/applicat.h>
  7. #include <owl/window.h>
  8. #include <stdlib.h>
  9. #include "dllhello.h"
  10.  
  11. bool far _export
  12. CreateDLLWindow(HWND parentHWnd)
  13. {
  14.   TWindow* parentAlias = ::GetWindowPtr(parentHWnd);  // check if an OWL window
  15.   if (!parentAlias)
  16.     parentAlias = new TWindow(parentHWnd, ::Module);
  17.   TWindow* window = new TWindow(parentAlias, "Hello from a DLL!");
  18.   window->Attr.Style |= WS_POPUPWINDOW | WS_CAPTION | WS_THICKFRAME
  19.                       | WS_MINIMIZEBOX | WS_MAXIMIZEBOX;
  20.   window->Attr.X = 100; window->Attr.Y = 100;
  21.   window->Attr.W = 300; window->Attr.H = 300;
  22.   return window->Create();
  23. }
  24.