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

C / C++ / MFC

 
GeneralGet Text from List box Pin
Larsson4-Feb-03 3:01
Larsson4-Feb-03 3:01 
GeneralRe: Get Text from List box Pin
HENDRIK R4-Feb-03 3:10
HENDRIK R4-Feb-03 3:10 
GeneralRe: Get Text from List box Pin
Larsson4-Feb-03 3:26
Larsson4-Feb-03 3:26 
GeneralRe: Get Text from List box Pin
HENDRIK R4-Feb-03 3:35
HENDRIK R4-Feb-03 3:35 
GeneralRe: Get Text from List box Pin
Larsson4-Feb-03 3:48
Larsson4-Feb-03 3:48 
Generalimplementing new Pin
Patje4-Feb-03 2:15
Patje4-Feb-03 2:15 
GeneralRe: implementing new Pin
Joaquín M López Muñoz4-Feb-03 2:23
Joaquín M López Muñoz4-Feb-03 2:23 
GeneralRe: implementing new Pin
Patje4-Feb-03 2:56
Patje4-Feb-03 2:56 
Thanks for your answer Joaquin.
When I saw "atexit", I thought "yes, that's it". Unfortunately, my colleague saw the following in the MSDN documentation:

Using atexit
With theatexit function, you can specify an exit-processing function that executes prior to program termination. No global static objects initialized prior to the call to atexit are destroyed prior to execution of the exit-processing function.


As I understand it, it seems like the global variables are only destroyed after the atexit execution. So this doesn't seem to solve my problem.

I verified this with the following test program:
<br />
#include <stdlib.h><br />
#include <iostream><br />
<br />
class MyClass<br />
   {<br />
   public:<br />
      MyClass() {printf ("Constructor\n");}<br />
      ~MyClass() {printf ("Destructor\n");}<br />
   };<br />
<br />
MyClass myVariable;<br />
<br />
void __cdecl AtExitFunction (void)<br />
{<br />
printf ("AtExit\n");<br />
}<br />
<br />
void main ()<br />
{<br />
atexit (AtExitFunction);<br />
}<br />

(I had to use printf, because std::cout wasn't available anymore in my destructor).

And indeed, the following is printed:
Constructor
AtExit
Destructor


Other suggestion???

Enjoy life, this is not a rehearsal !!!

My Articles:
- Implementing a Subject/Observer pattern with templates


GeneralRe: implementing new Pin
Joaquín M López Muñoz4-Feb-03 4:33
Joaquín M López Muñoz4-Feb-03 4:33 
GeneralRe: implementing new Pin
Alvaro Mendez4-Feb-03 6:04
Alvaro Mendez4-Feb-03 6:04 
GeneralRe: implementing new Pin
Joaquín M López Muñoz4-Feb-03 6:25
Joaquín M López Muñoz4-Feb-03 6:25 
GeneralRe: implementing new Pin
Alvaro Mendez4-Feb-03 6:54
Alvaro Mendez4-Feb-03 6:54 
GeneralRe: implementing new Pin
AlexO4-Feb-03 2:46
AlexO4-Feb-03 2:46 
GeneralRe: implementing new Pin
Patje4-Feb-03 3:03
Patje4-Feb-03 3:03 
GeneralRe: implementing new Pin
AlexO4-Feb-03 3:22
AlexO4-Feb-03 3:22 
GeneralRe: implementing new Pin
Alvaro Mendez4-Feb-03 5:20
Alvaro Mendez4-Feb-03 5:20 
GeneralPlatform SDK installing ! Pin
Hadi Rezaee4-Feb-03 2:06
Hadi Rezaee4-Feb-03 2:06 
GeneralRe: Platform SDK installing ! Pin
jhwurmbach4-Feb-03 3:12
jhwurmbach4-Feb-03 3:12 
GeneralRe: Platform SDK installing ! Pin
Abbas_Riazi4-Feb-03 4:03
professionalAbbas_Riazi4-Feb-03 4:03 
GeneralRe: Platform SDK installing ! Pin
ursus zeta4-Feb-03 12:26
ursus zeta4-Feb-03 12:26 
GeneralNT/Win2K/XP Maximum File Size Pin
Glynn4-Feb-03 1:30
Glynn4-Feb-03 1:30 
GeneralRe: NT/Win2K/XP Maximum File Size Pin
xxhimanshu4-Feb-03 2:06
xxhimanshu4-Feb-03 2:06 
GeneralRe: NT/Win2K/XP Maximum File Size Pin
Abbas_Riazi4-Feb-03 4:06
professionalAbbas_Riazi4-Feb-03 4:06 
GeneralRe: NT/Win2K/XP Maximum File Size Pin
Glynn5-Feb-03 1:16
Glynn5-Feb-03 1:16 
GeneralRe: NT/Win2K/XP Maximum File Size Pin
Mike Nordell5-Feb-03 4:05
Mike Nordell5-Feb-03 4:05 

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.