Click here to Skip to main content
15,888,340 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to get BITMAP data after capEditCopy Pin
berom12-Sep-06 7:56
berom12-Sep-06 7:56 
Questionwhat is different between hIconSm and hIcon? Pin
bloodwinner11-Sep-06 11:55
bloodwinner11-Sep-06 11:55 
AnswerRe: what is different between hIconSm and hIcon? Pin
the_jebus11-Sep-06 12:03
the_jebus11-Sep-06 12:03 
GeneralRe: what is different between hIconSm and hIcon? Pin
bloodwinner11-Sep-06 12:12
bloodwinner11-Sep-06 12:12 
AnswerRe: what is different between hIconSm and hIcon? Pin
Hamid_RT12-Sep-06 8:34
Hamid_RT12-Sep-06 8:34 
Questionreading text file with some binary data using CStdioFile Pin
Tanzim Husain11-Sep-06 10:35
Tanzim Husain11-Sep-06 10:35 
AnswerRe: reading text file with some binary data using CStdioFile Pin
led mike11-Sep-06 10:44
led mike11-Sep-06 10:44 
QuestionTemplates and dynamic libraries Pin
Federico Milano11-Sep-06 9:52
Federico Milano11-Sep-06 9:52 
Hi,

I'm having some problems with DLLs and templates.
The thing is that I have found almost no info on the web, specially about warning C4251 (there's an article, but it doesn't
answer the question I have). The thing is, I have these modules:

A.dll
B.dll (Uses A.dll)
C.dll (Uses A.dll and B.dll)
D.lib (A static library that uses A.dll and C.dll)
E.exe, the executable (uses A and D)

I have a template in A. The thing is that I have found the warning C4251 when I was compiling the template in A, so I instantiated
the whole template and exported it (and dllimported when I was compiling a module other than A (all of this in the header
file, where the template is defined)). An error
arises when I'm linking E.exe, saying that I have duplicate symbols: the member functions of the template in A. The paradox here
is that if I clean all the explicit instantiations of the template and the dllexports/dllimports everything works fine! (It gives me
the C4251 warning when compiling, but it works fine). My questions are: is it necessary to explicitly instatiate the whole template,
, export it and import it when compiling other module? Or is it enough to leave an instantiation per translation unit, given that the dlls and exes are compiled
with the same compiler flags? In this case, what happens with static variables? Is the linker clever enough to use the same static
variable for the different instatiations?

any hint will be very appreciated

Thanks,

Federico

AnswerRe: Templates and dynamic libraries Pin
Zac Howland11-Sep-06 10:22
Zac Howland11-Sep-06 10:22 
GeneralRe: Templates and dynamic libraries Pin
Federico Milano11-Sep-06 10:27
Federico Milano11-Sep-06 10:27 
GeneralRe: Templates and dynamic libraries Pin
Zac Howland11-Sep-06 10:33
Zac Howland11-Sep-06 10:33 
GeneralRe: Templates and dynamic libraries Pin
Jörgen Sigvardsson11-Sep-06 11:55
Jörgen Sigvardsson11-Sep-06 11:55 
AnswerRe: Templates and dynamic libraries Pin
cmk11-Sep-06 17:43
cmk11-Sep-06 17:43 
Questionhow to save a bitmap to gif file with transparent backgraound? Pin
includeh1011-Sep-06 9:03
includeh1011-Sep-06 9:03 
AnswerRe: how to save a bitmap to gif file with transparent backgraound? Pin
mostafa_pasha11-Sep-06 9:31
mostafa_pasha11-Sep-06 9:31 
GeneralRe: how to save a bitmap to gif file with transparent backgraound? Pin
mostafa_pasha11-Sep-06 9:36
mostafa_pasha11-Sep-06 9:36 
AnswerRe: how to save a bitmap to gif file with transparent backgraound? Pin
Waldermort11-Sep-06 9:33
Waldermort11-Sep-06 9:33 
GeneralRe: how to save a bitmap to gif file with transparent backgraound? Pin
Chris Losinger11-Sep-06 9:57
professionalChris Losinger11-Sep-06 9:57 
GeneralRe: how to save a bitmap to gif file with transparent backgraound? Pin
Waldermort11-Sep-06 19:23
Waldermort11-Sep-06 19:23 
GeneralRe: how to save a bitmap to gif file with transparent backgraound? Pin
Chris Losinger12-Sep-06 1:00
professionalChris Losinger12-Sep-06 1:00 
QuestionCustom Wizard issues Pin
the_jebus11-Sep-06 8:47
the_jebus11-Sep-06 8:47 
AnswerRe: Custom Wizard issues Pin
the_jebus11-Sep-06 8:49
the_jebus11-Sep-06 8:49 
Questionmemory allocation question Pin
KellyR11-Sep-06 8:36
KellyR11-Sep-06 8:36 
AnswerRe: memory allocation question Pin
Zac Howland11-Sep-06 8:40
Zac Howland11-Sep-06 8:40 
QuestionPositioning in file Pin
Monin D.11-Sep-06 8:28
Monin D.11-Sep-06 8:28 

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.