Click here to Skip to main content
15,907,493 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Invalidating a rect Pin
Blake Miller30-Oct-06 4:02
Blake Miller30-Oct-06 4:02 
QuestionGet HBITMAP from JPEG/JPG Pin
QuickDeveloper29-Oct-06 23:25
QuickDeveloper29-Oct-06 23:25 
AnswerRe: Get HBITMAP from JPEG/JPG Pin
Hamid_RT29-Oct-06 23:56
Hamid_RT29-Oct-06 23:56 
Questionhow to access a COM component from ASP.net? Pin
voorugonda prashanth29-Oct-06 23:08
voorugonda prashanth29-Oct-06 23:08 
Questionsyntax in using for_each() on lists. Pin
minkowski29-Oct-06 22:46
minkowski29-Oct-06 22:46 
AnswerRe: syntax in using for_each() on lists. Pin
Niklas L29-Oct-06 23:02
Niklas L29-Oct-06 23:02 
QuestionGDI handles Pin
Waldermort29-Oct-06 22:24
Waldermort29-Oct-06 22:24 
AnswerRe: GDI handles Pin
Mark Salsbery30-Oct-06 5:37
Mark Salsbery30-Oct-06 5:37 
GeneralRe: GDI handles Pin
Waldermort30-Oct-06 6:47
Waldermort30-Oct-06 6:47 
QuestionCDialog in MDI Pin
baerten29-Oct-06 22:07
baerten29-Oct-06 22:07 
AnswerRe: CDialog in MDI Pin
Hamid_RT29-Oct-06 23:03
Hamid_RT29-Oct-06 23:03 
GeneralRe: CDialog in MDI Pin
baerten29-Oct-06 23:06
baerten29-Oct-06 23:06 
GeneralRe: CDialog in MDI Pin
Hamid_RT29-Oct-06 23:57
Hamid_RT29-Oct-06 23:57 
GeneralRe: CDialog in MDI [modified] Pin
baerten30-Oct-06 0:15
baerten30-Oct-06 0:15 
GeneralRe: CDialog in MDI Pin
David Crow30-Oct-06 3:22
David Crow30-Oct-06 3:22 
GeneralRe: CDialog in MDI Pin
Hamid_RT30-Oct-06 3:37
Hamid_RT30-Oct-06 3:37 
QuestionProblem with lib Pin
NorGUI29-Oct-06 22:01
NorGUI29-Oct-06 22:01 
AnswerRe: Problem with lib Pin
uusheikh29-Oct-06 22:17
uusheikh29-Oct-06 22:17 
GeneralRe: Problem with lib Pin
NorGUI29-Oct-06 22:38
NorGUI29-Oct-06 22:38 
GeneralRe: Problem with lib Pin
uusheikh29-Oct-06 22:55
uusheikh29-Oct-06 22:55 
If you are creating an MFC dll project, i suggest you to look for some articles in CodeProject. Anyway, if your DLL is structured like this

Project My.dll

class A<br />
{<br />
}<br />
<br />
class B<br />
{<br />
 A a;<br />
<br />
}


Then in an application where you will be using Class A and Class B, you must link to my.lib. Just to tell you not to confuse yourself by linking to a.lib and b.lib, because that is not what your project created at the end.

If your DLL project contains template functions or classes, make sure you declare all possible variations that you want to use.

for example if you have this function

template <class T><br />
T GetMax (T a, T b) {<br />
 return (a>b?a:b);<br />
}


you need to declare this too in the dll

template <class T><br />
int GetMax (int a, int b);


If you are going to call the int version of the GetMax function in the Dll. Compiling the DLL and later calling a float version (example : GetMax(float a, float b)) will cause an error, that the compiler cannot link to the function (of course, cause you didnot define it, and it doesnt exist).

However, if you just include the source during build time, no errors will be produced, because the compiler will be able to create appropiate functions during compile time. Templates are resolved during compile time. (Because a DLL is compiled earlier, all variation of template functions, classes etc must be declared and resolved too).

Good luck.
GeneralRe: Problem with lib Pin
NorGUI30-Oct-06 1:45
NorGUI30-Oct-06 1:45 
Questionfilelistbox in vc++ Pin
zareee29-Oct-06 21:49
zareee29-Oct-06 21:49 
AnswerRe: filelistbox in vc++ Pin
jhwurmbach29-Oct-06 22:09
jhwurmbach29-Oct-06 22:09 
AnswerRe: filelistbox in vc++ Pin
Hamid_RT29-Oct-06 23:02
Hamid_RT29-Oct-06 23:02 
GeneralRe: filelistbox in vc++ Pin
zareee30-Oct-06 17:49
zareee30-Oct-06 17:49 

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.