Click here to Skip to main content
16,006,013 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralEmulating Windows Task Manager CPU Usage and history applets Pin
Anonymous6-Jun-05 9:10
Anonymous6-Jun-05 9:10 
GeneralRe: Emulating Windows Task Manager CPU Usage and history applets Pin
Ravi Bhavnani6-Jun-05 10:16
professionalRavi Bhavnani6-Jun-05 10:16 
GeneralWin32 - How to Clip a window Pin
dirkhelmet6-Jun-05 7:43
dirkhelmet6-Jun-05 7:43 
Generalworker thread and free Pin
Pasquale826-Jun-05 6:37
Pasquale826-Jun-05 6:37 
GeneralRe: worker thread and free Pin
Blake Miller6-Jun-05 6:51
Blake Miller6-Jun-05 6:51 
GeneralRe: worker thread and free Pin
Anonymous6-Jun-05 7:33
Anonymous6-Jun-05 7:33 
GeneralRe: worker thread and free Pin
Blake Miller6-Jun-05 7:43
Blake Miller6-Jun-05 7:43 
GeneralRe: worker thread and free Pin
Pasquale826-Jun-05 8:24
Pasquale826-Jun-05 8:24 
I use AfxBeginThread

BOOL CProvaDlg::OnInitDialog(){
...
AccDatabase* pAccDatabase = new AccDatabase();

if (pAccDatabase->Open()){ //local db already exist
}
else{
//local db does not exist
//create it
pAccDatabase->Create();
}
pAccDatabase->Close();
delete pAccDatabase;
m_pThreadSynchronize = AfxBeginThread(ThreadFunc, m_pAccDatabase);
...
}

UINT CProvaDlg::ThreadFunc(LPVOID pParam){
AccDatabase* pAccDatabase = new AccDatabase();
pAccDatabase->Open();
// do something with pAccDatabase like insert, delete ecc...
...
}

AccDatabase.h:

public:
AccDatabase(void);
~AccDatabase(void);
void Close();
bool Create();
bool Open();
bool Insert(Articolo* m_pArticolo);
bool Delete(Articolo* m_pArticolo);
bool Select(Articolo* m_pArticolo);
bool SelectAllToInsert(void);
Articolo* getNext(void);
bool SelectAllToUpdate(void);
bool SelectAllToDelete(void);
bool SetAllToSynchronize(void);
bool Update(Articolo* m_pArticolo);
private:
CDaoRecordset* m_pRecordset;
bool bFirstRecord;
CDaoDatabase* m_pDatabase;
CDaoQueryDef* m_pQueryDef;
};
GeneralRe: worker thread and free Pin
Blake Miller6-Jun-05 8:33
Blake Miller6-Jun-05 8:33 
GeneralRe: worker thread and free Pin
Pasquale826-Jun-05 8:51
Pasquale826-Jun-05 8:51 
GeneralRe: worker thread and free Pin
Blake Miller6-Jun-05 10:51
Blake Miller6-Jun-05 10:51 
QuestionHow to open an existing file and save it under a new name Pin
j_s_lacroix6-Jun-05 6:31
j_s_lacroix6-Jun-05 6:31 
AnswerRe: How to open an existing file and save it under a new name Pin
David Crow6-Jun-05 6:56
David Crow6-Jun-05 6:56 
GeneralOpen existing file and Save it under a new name Pin
j_s_lacroix6-Jun-05 6:28
j_s_lacroix6-Jun-05 6:28 
GeneralRe: Open existing file and Save it under a new name Pin
Andy Moore6-Jun-05 7:41
Andy Moore6-Jun-05 7:41 
GeneralBig endian to little endian conversion Pin
softtec6-Jun-05 6:26
softtec6-Jun-05 6:26 
GeneralRe: Big endian to little endian conversion Pin
Blake Miller6-Jun-05 6:56
Blake Miller6-Jun-05 6:56 
GeneralRe: Big endian to little endian conversion Pin
softtec6-Jun-05 7:05
softtec6-Jun-05 7:05 
GeneralRe: Big endian to little endian conversion Pin
Blake Miller6-Jun-05 7:15
Blake Miller6-Jun-05 7:15 
GeneralBroken clickety Pin
PJ Arends6-Jun-05 12:14
professionalPJ Arends6-Jun-05 12:14 
GeneralRe: Broken clickety Pin
Blake Miller6-Jun-05 12:18
Blake Miller6-Jun-05 12:18 
GeneralRe: Broken clickety Pin
Blake Miller6-Jun-05 12:19
Blake Miller6-Jun-05 12:19 
GeneralRe: Broken clickety Pin
softtec7-Jun-05 2:08
softtec7-Jun-05 2:08 
GeneralMuch better Pin
PJ Arends6-Jun-05 12:21
professionalPJ Arends6-Jun-05 12:21 
GeneralGrabbing a Tree off a Window Pin
Abhishek Karnik6-Jun-05 6:04
Abhishek Karnik6-Jun-05 6:04 

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.