home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!microsoft!wingnut!stevesi
- From: stevesi@microsoft.com (Steven Sinofsky)
- Subject: Re: problems with CTL3D.DLL
- Message-ID: <1992Dec31.215814.28193@microsoft.com>
- Date: 31 Dec 92 21:58:14 GMT
- Organization: Microsoft Corporation
- References: <1992Dec31.021603.21231@emr1.emr.ca> <1huff6INNag0@cs.tut.fi>
- Lines: 56
-
- In article <1huff6INNag0@cs.tut.fi> pk64380@kaarne.cs.tut.fi writes:
- >From article <1992Dec31.021603.21231@emr1.emr.ca>, by jagrant@emr1.emr.ca (John Grant):
- >> CTL3D.DLL is provided by MS on CI$ and at ftp.cica.indiana.edu
- >> (in vendors... - sorry I forget the exact location or filenames,
- >> but it was posted here recently). It provides 3d effects for
- >> listboxes, comboboxes, etc (finishing up what they started with
- >> 3d buttons).
- > /vendor/microsoft/developer-network/techsamp/3-31.zip
- >
- >> Problems with CTL3D.DLL
- >> -----------------------
- >> 1. before *anything* in your app runs (i.e. even before you check for
- >> 'first instance', something in CTL3D.LIB (linked in) tries to find
- >> CTL3D.DLL. It appears to look in at least 3 directories:
- >> - ...\windows
- >> - ...\windows\system
- >> - the application's home directory (GetModuleFileName)
- >> (I tried placing it in each of the 3 directories to see
- >> what it was looking for and where).
- >>
- >> If it can't find CTL3D.DLL, it chokes and displays:
- >> +----------------------+
- >> | File Error |
- >> | Can't find CTL3D.DLL |
- >> +----------------------+
- >> and then terminates the application before it even gets a
- >> chance to run.
- >
- > Yes, but that's Windows itself. Before executing a single line of the
- > application it will try and load all the DLL's needed (specified
- > when linking).
- > If you don't want this, you might try LoadLibrary and GetProcAddress
- > (or whatever, never tried myself - so don't ask how to do this. SDK
- > reference should be able to help)
- >
- >-zi
-
- If you do not wish to implicitly load the DLL as above, you can
- use a LoadLibrary call on the DLL, and then to call functions
- you use a GetProcAddress and cast to the correct type for the
- prototype. This involves some bookkeeping and annoying casts
- but enables your application to run without the DLL present (if
- that is possible). When you do this you do not link with the
- import library (the CTL3D.LIB file).
-
- If you wish to override the Windows system modal dialog and
- put up your own failure dialog and handle things yourself
- then you can use the SetErrorMode API to turn off that dialog
- (but be sure to handle the error yourself). This will only
- work when you use LoadLibrary explicitly, since Windows will
- load the DLL implicitly before your WinMain is started (and
- before you can SetErrorMode).
-
-
- --
- Steven Sinofsky
- stevesi@microsoft.com
- Disclaimer: I don't speak for Microsoft, BillG does that.
-