home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / dllhello.pak / DLLHELLO.CPP < prev    next >
C/C++ Source or Header  |  1997-07-23  |  882b  |  23 lines

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