home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / mswindo / programm / misc / 1794 < prev    next >
Encoding:
Text File  |  1992-09-11  |  2.8 KB  |  72 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!wupost!darwin.sura.net!haven.umd.edu!wam.umd.edu!castanos
  3. From: castanos@wam.umd.edu (Jose Alberto Castanos)
  4. Subject: Re: Help needed with Borland C++ 3.1
  5. Message-ID: <1992Sep12.032835.20123@wam.umd.edu>
  6. Sender: usenet@wam.umd.edu (USENET News system)
  7. Nntp-Posting-Host: rac2.wam.umd.edu
  8. Organization: University of Maryland, College Park
  9. References: <1992Sep11.014350.1156@iti.gov.sg>
  10. Date: Sat, 12 Sep 1992 03:28:35 GMT
  11. Lines: 59
  12.  
  13. In article <1992Sep11.014350.1156@iti.gov.sg> kevin@iti.gov.sg (Kevin Patt (SE)) writes:
  14. >Hi,
  15. >
  16. >    I am doing some Windows programming using BC++ 3.1 and I am facing some
  17. >problems with compiling the source into a Windows executable.  The situation
  18. >goes like this:
  19. >
  20. >    The application will run with no problem at all if I run it by making use
  21. >of the "RUN" menu item in BC++3.1.  The problem arises when I run it as a
  22. >stand-alone after compiling and I keep getting the error message "-5" everytime
  23. >I attempts to open any dialogs (those done using the Resource Workshop>. The
  24. >documentation says the error means "Window is invalid because Create did not
  25. >succeed".
  26. >
  27. >    Can anyone help me in this? Thanks!
  28. >
  29. >-- 
  30. >Kevin Patt                                     Information Technology Institute
  31. >Associate Member of Technical Staff            Singapore 
  32. >Email: (Internet) kevin@iti.gov.sg             Tel: (065) 772-0471 
  33. >       (BITNet)   kevinpatt@itivax.bitnet      Fax: (065) 779-5966        
  34.  
  35.  
  36.   You are using Borland Custom Controls which make use of the BWCC.DLL
  37. (BWCC.DLL by default gets installed in the \WINDOWS\SYSTEM directory).
  38. To load this DLL do the following:
  39.    - Add the file BWCC.LIB to your project (this file is in the \BORLANDC\LIB
  40.        subdirectory)
  41.    - Include a call to the function BWCCGetVersion() somewhere in your code
  42.        before any dialog boxes are displayed (In processing WM_CREATE or in
  43.        the InitMainWindow function, if you're using OWL).
  44.  
  45.    You could also force loading the library with the following code, avoiding
  46. the need to include the BWCC.LIB file:
  47.  
  48. HINSTANCE hinstBWCC;
  49.  
  50.          .
  51.          .
  52.          .
  53.  
  54. if (((UINT) hinstBWCC = LoadLibrary("BWCC.DLL") > HINSTANCE_ERROR) {
  55.   [Library could not be loaded, so handle the error]
  56. }
  57.          .
  58.          .
  59.          .
  60.  
  61. When it's time to end the application:
  62.  
  63. if ((UINT) hinstBWCC > HINSTANCE_ERROR)
  64.   FreeLibrary (hinstBWCC);
  65.  
  66.  
  67. -------------------------------------------------------------------------------
  68. Jose A. Castanos       | Computer Science Dept. |"If a person never contradicts
  69. (castanos@wam.umd.edu) | University of Maryland | himself, it must be that he 
  70.                        | College Park, MD       | says nothing." -M. de Unamuno
  71. -------------------------------------------------------------------------------
  72.