Click here to Skip to main content
15,898,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: filelistbox in vc++ Pin
Hamid_RT30-Oct-06 18:52
Hamid_RT30-Oct-06 18:52 
QuestionRe: filelistbox in vc++ Pin
David Crow30-Oct-06 3:24
David Crow30-Oct-06 3:24 
AnswerRe: filelistbox in vc++ Pin
zareee30-Oct-06 17:48
zareee30-Oct-06 17:48 
QuestionRe: filelistbox in vc++ Pin
David Crow1-Nov-06 2:56
David Crow1-Nov-06 2:56 
QuestionExtracting Details from Packets received on Network Pin
Andy Rama29-Oct-06 21:34
Andy Rama29-Oct-06 21:34 
AnswerRe: Extracting Details from Packets received on Network Pin
Mark Salsbery30-Oct-06 5:45
Mark Salsbery30-Oct-06 5:45 
AnswerRe: Extracting Details from Packets received on Network Pin
ThatsAlok31-Oct-06 3:37
ThatsAlok31-Oct-06 3:37 
QuestionHow to use COleDataSource::SetClipboard() Pin
hanlei000000000929-Oct-06 21:04
hanlei000000000929-Oct-06 21:04 
QuestionVPN details and display Pin
Sunil P V29-Oct-06 20:17
Sunil P V29-Oct-06 20:17 
QuestionTo provide imageList is only Possible.. Pin
Anamika200529-Oct-06 19:45
Anamika200529-Oct-06 19:45 
AnswerRe: To provide imageList is only Possible.. Pin
Michael Dunn29-Oct-06 20:35
sitebuilderMichael Dunn29-Oct-06 20:35 
GeneralRe: To provide imageList is only Possible.. Pin
Anamika200529-Oct-06 20:44
Anamika200529-Oct-06 20:44 

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.