Click here to Skip to main content
15,919,358 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How can we set BackGround Color & Text Color in the ListBox? Pin
Joaquín M López Muñoz7-Oct-02 9:59
Joaquín M López Muñoz7-Oct-02 9:59 
GeneralRe: For a ListBox not a ListCtrl! Pin
7-Oct-02 14:01
suss7-Oct-02 14:01 
AnswerRe: How can we set BackGround Color & Text Color in the ListBox? Pin
valikac7-Oct-02 10:28
valikac7-Oct-02 10:28 
GeneralRe: How can we set BackGround Color & Text Color in the ListBox? Pin
Anonymous7-Oct-02 14:03
Anonymous7-Oct-02 14:03 
GeneralRe: How can we set BackGround Color & Text Color in the ListBox? Pin
valikac7-Oct-02 15:29
valikac7-Oct-02 15:29 
GeneralStatically link .lib file Pin
Wim Jans7-Oct-02 9:33
Wim Jans7-Oct-02 9:33 
GeneralRe: Statically link .lib file Pin
Joaquín M López Muñoz7-Oct-02 9:38
Joaquín M López Muñoz7-Oct-02 9:38 
GeneralRe: Statically link .lib file Pin
Navin7-Oct-02 10:55
Navin7-Oct-02 10:55 
As pointed out... a .lib file could be a static library, or simply an import library to a DLL.

Import libraries have the advantage that you can call DLL functions as if they were regular functions. You don't need to call LoadLibrary to get the DLL, and GetProcAddress to get functions. And you get type checking. The disadvantage is that if the DLL doesn't exist, your code won't run at all. And your code will show an ugly, and not very user-friendly error message complaining that it can't find the DLL.

A good rule I follow: use import libaries for DLLs when you are certain the DLL will exist (e.g., you install it.) Use the regular DLL functions (like LoadLibrary, GetProcAddress) if there is a chance the DLL might not exist, and you want to handle that situation gracefully.

It is technically possible to include DLL's in an EXE, but it is highly ugly, and the only time I've ever done it was to create a self-extracting installer. (Basically, you include the DLL as a resource in your EXE. Yuck!)

Just make sure your installer puts these DLLs in the proper location when installing your product, and you should be good to go.



"Time spent with cats is never wasted." - Colette
GeneralRe: Statically link .lib file Pin
Chris Losinger7-Oct-02 11:53
professionalChris Losinger7-Oct-02 11:53 
GeneralRe: Statically link .lib file Pin
Wim Jans8-Oct-02 2:26
Wim Jans8-Oct-02 2:26 
GeneralUsing checkboxes only in certain items of a listctrl (using the standard listctrl) Pin
Joan M7-Oct-02 9:28
professionalJoan M7-Oct-02 9:28 
GeneralRe: Using checkboxes only in certain items of a listctrl (using the standard listctrl) Pin
Max Santos7-Oct-02 12:16
Max Santos7-Oct-02 12:16 
GeneralObject Design Question Pin
Richard Longhorn McHoney7-Oct-02 9:17
sussRichard Longhorn McHoney7-Oct-02 9:17 
GeneralRe: Object Design Question Pin
Joaquín M López Muñoz7-Oct-02 9:31
Joaquín M López Muñoz7-Oct-02 9:31 
GeneralRe: Object Design Question Pin
Richard Longhorn Mchony7-Oct-02 13:37
sussRichard Longhorn Mchony7-Oct-02 13:37 
GeneralRe: Object Design Question Pin
Paul M Watt7-Oct-02 20:17
mentorPaul M Watt7-Oct-02 20:17 
GeneralClistctrl and insertItem Pin
ns7-Oct-02 9:08
ns7-Oct-02 9:08 
GeneralRe: Clistctrl and insertItem Pin
Joaquín M López Muñoz7-Oct-02 10:04
Joaquín M López Muñoz7-Oct-02 10:04 
GeneralRe: Clistctrl and insertItem Pin
ns8-Oct-02 1:15
ns8-Oct-02 1:15 
GeneralQuick SDI Question Pin
Anonymous7-Oct-02 9:02
Anonymous7-Oct-02 9:02 
GeneralRe: Quick SDI Question Pin
Jörgen Sigvardsson7-Oct-02 10:02
Jörgen Sigvardsson7-Oct-02 10:02 
GeneralRe: Quick SDI Question Pin
Anonymous7-Oct-02 10:12
Anonymous7-Oct-02 10:12 
Generalc++ to c# question Pin
Duckworth7-Oct-02 8:57
Duckworth7-Oct-02 8:57 
GeneralRe: c++ to c# question Pin
Jörgen Sigvardsson7-Oct-02 10:09
Jörgen Sigvardsson7-Oct-02 10:09 
GeneralSerial Ports and WaitCommEvent( ) Pin
SportyDan7-Oct-02 8:35
SportyDan7-Oct-02 8:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.