home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0040 - 0049 / ibm0040-0049 / ibm0040.tar / ibm0040 / BCPPOWL1.ZIP / OWLDEMOS.ZIP / CDLGDLL.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-28  |  928 b   |  40 lines

  1. // ObjectWindows - (C) Copyright 1991 by Borland International
  2.  
  3. #include <owl.h>
  4. #include "colordlg.h"
  5. #include "cdlgdll.h"
  6.  
  7. PTModule TheModule;
  8.  
  9. BOOL far _export GetColor(HWND ParentHandle, COLORREF _FAR & ColorBuffer)
  10. {
  11.   PTWindowsObject AParentAlias;
  12.   TColorDialog *TheColorDialog;
  13.  
  14.   AParentAlias = TheModule->GetParentObject(ParentHandle);
  15.   TheColorDialog= new TColorDialog (AParentAlias, ColorBuffer);
  16.   return (TheModule->ExecDialog(TheColorDialog) == IDOK);
  17. }
  18.  
  19. int FAR PASCAL LibMain(HANDLE hInstance, WORD /*wDataSeg*/,
  20.   WORD /* cbHeapSize */, LPSTR lpCmdLine)
  21. {
  22.   int TheStatus;
  23.  
  24.   TheModule = new TModule("CDLGDLL", hInstance, lpCmdLine);
  25.   TheStatus = TheModule->Status;
  26.   if ( TheStatus != 0 )
  27.   {
  28.     delete TheModule;
  29.     TheModule = NULL;
  30.   }
  31.   return (TheStatus == 0);
  32. }
  33.  
  34. int FAR PASCAL WEP(int /*bSystemExit*/)
  35. {
  36.   if ( TheModule )
  37.     delete TheModule;
  38.   return 1;
  39. }
  40.