Click here to Skip to main content
15,914,444 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How could i put a modeless behind the parent? Pin
Hans Ruck14-Apr-02 21:19
Hans Ruck14-Apr-02 21:19 
GeneralUsing Borland's MAKE.EXE 3.6 in Win2k Pin
Lars VJ11-Apr-02 21:21
Lars VJ11-Apr-02 21:21 
GeneralWin32 Application using Controls Pin
Grant Cooper11-Apr-02 21:21
Grant Cooper11-Apr-02 21:21 
GeneralRe: Win32 Application using Controls Pin
Nish Nishant11-Apr-02 21:42
sitebuilderNish Nishant11-Apr-02 21:42 
GeneralRe: Win32 Application using Controls Pin
Grant Cooper12-Apr-02 2:38
Grant Cooper12-Apr-02 2:38 
GeneralProblem with IPropertyPageImpl - Apply Button Pin
Braulio Dez11-Apr-02 20:54
Braulio Dez11-Apr-02 20:54 
Generalcalling CDatabase in a worker thread Pin
chaze11-Apr-02 20:41
chaze11-Apr-02 20:41 
GeneralRe: calling CDatabase in a worker thread Pin
wangyiming12-Apr-02 3:14
wangyiming12-Apr-02 3:14 
*.h
--------------------------------------
class CAutoObList : public CObject
{
public:
CAutoObList()
{
size = 10;
p = new int[size];
for(int i=0; i<size; i++)
="" p[i]="i;
" }
="" ~cautooblist()
="" {
="" if(="" p="" !="NULL" )
="" delete="" []p;=""
="" int="" size;
="" *p;
="" void="" output()
="" for(int="" i="0;" i<size;="" trace2("%d:="" %d\n",i,p[i]);
="" }
};

class="" a
{
public:
="" cwinthread="" *pthread;
="" a()
="" pthread="NULL;
" ~a()
="" if="" (pthread="" pthread-="">SuspendThread();
delete pThread;
pThread = NULL;
}
}
void testThread();
};


*.cpp
--------------------------------------------------------

CAutoObList autoList;
UINT CAutoObListThread(LPVOID object)
{
// A *pA = ((A*) object);

for(;;)
{
autoList.Output();
Sleep( 2000 );
}

return 0;
}

void A::testThread()
{
if( pThread == NULL )
pThread = AfxBeginThread(CAutoObListThread, this,THREAD_PRIORITY_HIGHEST);
}

output:
-----------------
0: 0
1: 1
...
9: 9



hope can help!
Generalcatch RETURN in an edit control Pin
11-Apr-02 19:58
suss11-Apr-02 19:58 
GeneralRe: catch RETURN in an edit control Pin
11-Apr-02 19:56
suss11-Apr-02 19:56 
GeneralRe: catch RETURN in an edit control Pin
11-Apr-02 20:10
suss11-Apr-02 20:10 
GeneralRe: catch RETURN in an edit control Pin
EricMC11-Apr-02 20:19
EricMC11-Apr-02 20:19 
GeneralRe: catch RETURN in an edit control Pin
11-Apr-02 20:53
suss11-Apr-02 20:53 
GeneralRe: catch RETURN in an edit control Pin
Tim Smith12-Apr-02 4:45
Tim Smith12-Apr-02 4:45 
General1394 Firewire Video Programming Pin
MarkPQ11-Apr-02 19:40
MarkPQ11-Apr-02 19:40 
GeneralInserting Text (Adding) In CEditView :: MFC Pin
valikac11-Apr-02 18:07
valikac11-Apr-02 18:07 
GeneralRe: Inserting Text (Adding) In CEditView :: MFC Pin
Christian Graus11-Apr-02 20:55
protectorChristian Graus11-Apr-02 20:55 
GeneralScrollbar questions Pin
ejw11-Apr-02 16:22
ejw11-Apr-02 16:22 
GeneralRe: Scrollbar questions Pin
Ravi Bhavnani11-Apr-02 16:32
professionalRavi Bhavnani11-Apr-02 16:32 
GeneralRe: Scrollbar questions Pin
Shog911-Apr-02 17:10
sitebuilderShog911-Apr-02 17:10 
GeneralRe: Scrollbar questions Pin
ejw11-Apr-02 19:10
ejw11-Apr-02 19:10 
Questionhash_map in C++ 7? Pin
blizzymadden11-Apr-02 15:03
blizzymadden11-Apr-02 15:03 
AnswerRe: hash_map in C++ 7? Pin
Christian Graus11-Apr-02 15:03
protectorChristian Graus11-Apr-02 15:03 
GeneralRe: hash_map in C++ 7? Pin
blizzymadden11-Apr-02 15:16
blizzymadden11-Apr-02 15:16 
GeneralRe: hash_map in C++ 7? Pin
Christian Graus11-Apr-02 15:20
protectorChristian Graus11-Apr-02 15:20 

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.