Click here to Skip to main content
16,005,389 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to use vector.push_back correctly and efficiently? Pin
jhwurmbach25-Apr-03 4:53
jhwurmbach25-Apr-03 4:53 
GeneralWin API and classwizard Pin
73Zeppelin24-Apr-03 17:57
73Zeppelin24-Apr-03 17:57 
QuestionHow to make a CPropertySheet's help button invisible? Pin
fat88824-Apr-03 16:51
fat88824-Apr-03 16:51 
AnswerRe: How to make a CPropertySheet's help button invisible? Pin
Joan M24-Apr-03 21:52
professionalJoan M24-Apr-03 21:52 
AnswerRe: How to make a CPropertySheet's help button invisible? Pin
David Crow25-Apr-03 2:56
David Crow25-Apr-03 2:56 
GeneralDLL help Pin
psksvp24-Apr-03 16:19
psksvp24-Apr-03 16:19 
GeneralRe: DLL help Pin
John R. Shaw24-Apr-03 17:12
John R. Shaw24-Apr-03 17:12 
GeneralRe: DLL help Pin
Antti Keskinen25-Apr-03 6:39
Antti Keskinen25-Apr-03 6:39 
Also, there is one thing worth mentioning..

When exporting from a DLL, you should use both __declspec(dllexport) calling convention and the .def file. When you use both, you can use the DLL with run-time linking (LoadLibrary() and GetProcAddress()). If you use only __declspec, it doesn't work for some strange reason. Might be a bug, but using both makes sure.

Also, an interesting thing in exporting classes is that you can export a function from the DLL, which returns a class generated during the CRTStartup (DllMain) of the DLL. This way, you can generate COM-like objects, which are external, and for which you only need to provide the header files. When the DLL is loaded (LoadLibrary), get the address of the function returning the class address, and take it to a local pointer in your program. Then you can utilize the class within the DLL without creating a local copy.

Most interesting thing to do with this is to create classes, which generate windows and window procedures. I myself made two small DLLs, one which creates a main window, and one which provides support for left and right mouse clicks within this window. Then in the main application, I just loaded these DLLs and utilized them. Useless, but interesting Big Grin | :-D

-Celorfie
GeneralEdit Control Pin
Anthony988724-Apr-03 15:57
Anthony988724-Apr-03 15:57 
GeneralRe: Edit Control Pin
John R. Shaw24-Apr-03 17:39
John R. Shaw24-Apr-03 17:39 
GeneralRe: Edit Control Pin
Toni7825-Apr-03 7:41
Toni7825-Apr-03 7:41 
Generalgethostbyaddr() Pin
Swinefeaster24-Apr-03 15:17
Swinefeaster24-Apr-03 15:17 
GeneralRe: gethostbyaddr() Pin
bcraun24-Apr-03 16:41
bcraun24-Apr-03 16:41 
GeneralRe: gethostbyaddr() Pin
Swinefeaster25-Apr-03 7:10
Swinefeaster25-Apr-03 7:10 
GeneralRe: gethostbyaddr() Pin
Swinefeaster25-Apr-03 7:41
Swinefeaster25-Apr-03 7:41 
GeneralDistributing software to locked down PCs Pin
Chris Hafey24-Apr-03 13:42
Chris Hafey24-Apr-03 13:42 
GeneralOwner drawn CListCtrl Pin
alex.barylski24-Apr-03 13:20
alex.barylski24-Apr-03 13:20 
GeneralRe: Owner drawn CListCtrl Pin
tinyegg24-Apr-03 16:44
tinyegg24-Apr-03 16:44 
GeneralPlaySound() Pin
Selevercin24-Apr-03 11:39
Selevercin24-Apr-03 11:39 
GeneralRe: PlaySound() Pin
Rickard Andersson2024-Apr-03 11:50
Rickard Andersson2024-Apr-03 11:50 
GeneralRe: PlaySound() Pin
Selevercin24-Apr-03 12:16
Selevercin24-Apr-03 12:16 
GeneralRe: PlaySound() Pin
Rickard Andersson2024-Apr-03 21:37
Rickard Andersson2024-Apr-03 21:37 
GeneralRe: PlaySound() Pin
Gary Kirkham24-Apr-03 11:52
Gary Kirkham24-Apr-03 11:52 
GeneralRe: PlaySound() Pin
User 665824-Apr-03 12:11
User 665824-Apr-03 12:11 
GeneralRe: PlaySound() Pin
Ken Mazaika24-Apr-03 15:58
Ken Mazaika24-Apr-03 15:58 

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.