Click here to Skip to main content
15,902,933 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Repost Pin
Cedric Moonen4-Mar-08 4:02
Cedric Moonen4-Mar-08 4:02 
GeneralRe: display progress bar on the MainFrame Pin
Randor 4-Mar-08 4:04
professional Randor 4-Mar-08 4:04 
QuestionHow to inject a dll into another process ? Pin
tina->newcoder4-Mar-08 2:51
tina->newcoder4-Mar-08 2:51 
GeneralRe: How to inject a dll into another process ? Pin
Alexander M.,4-Mar-08 3:11
Alexander M.,4-Mar-08 3:11 
QuestionRe: How to inject a dll into another process ? Pin
Rajkumar R4-Mar-08 3:16
Rajkumar R4-Mar-08 3:16 
GeneralRe: How to inject a dll into another process ? Pin
David Crow4-Mar-08 3:56
David Crow4-Mar-08 3:56 
GeneralRe: How to inject a dll into another process ? Pin
ThatsAlok4-Mar-08 20:39
ThatsAlok4-Mar-08 20:39 
GeneralProgress bar on Mainfram, while lengthy prosses on Dialog btn press event Pin
ptr_Electron4-Mar-08 2:49
ptr_Electron4-Mar-08 2:49 
I had a very length process(unestimated time) on my dialog box and I need
to display progress bar on the MainFrame. wht I did is start a thread on the first line of the button press event
and from the thread I will calling the Function in the MAinFrame. I am able to acces the funcion, but it did not work.

May I know, if you have any smart idea to do this...
----------------------------------------------------------------------------------
CMainFrame *pfrm = ptp->pCA; // alone works fine on button click event, but doesn't work from thread
pfrm->OnTestBar();
-------------------------------------------------------------------------------------

UINT TestPbDlg:: thPrgbar( LPVOID pParam )
{
THREADPARAMS *ptp = reinterpret_cast<THREADPARAMS *>(pParam);
CMainFrame *pfrm = ptp->pCA;
pfrm->OnTestBar();
..
}


void CMainFrame::OnTestBar()
{
CProgressBar bar(_T("Progress"), 40, 100, TRUE); //CProgressBar drived from CProgressCtrl

for (int i = 0; i <100; i++)
{
bar.StepIt();
PeekAndPump();
Sleep(10);

if (bar.GetPos()==500)
{
bar.SetStep(-1);
}
else if (bar.GetPos()==0)
{
bar.SetStep(1);
}
}

}

BOOL PeekAndPump()
{
static MSG msg;

while (::PeekMessage(&amp;msg,NULL,0,0,PM_NOREMOVE)) {
if (!AfxGetApp()->PumpMessage()) {
::PostQuitMessage(0);
return FALSE;
}
}

return TRUE;
}
GeneralRe: Progress bar on Mainfram, while lengthy prosses on Dialog btn press event Pin
David Crow4-Mar-08 3:20
David Crow4-Mar-08 3:20 
GeneralRe: Progress bar on Mainfram, while lengthy prosses on Dialog btn press event Pin
ptr_Electron4-Mar-08 3:37
ptr_Electron4-Mar-08 3:37 
GeneralRe: Progress bar on Mainfram, while lengthy prosses on Dialog btn press event Pin
David Crow4-Mar-08 3:48
David Crow4-Mar-08 3:48 
GeneralRe: Progress bar on Mainfram, while lengthy prosses on Dialog btn press event Pin
Randor 4-Mar-08 4:02
professional Randor 4-Mar-08 4:02 
GeneralProblem in property sheet.. Pin
Ashish Chauhan4-Mar-08 2:06
Ashish Chauhan4-Mar-08 2:06 
AnswerRe: Problem in property sheet.. Pin
Rajkumar R4-Mar-08 4:59
Rajkumar R4-Mar-08 4:59 
GeneralRe: Problem in property sheet.. Pin
Maxwell Chen4-Mar-08 18:29
Maxwell Chen4-Mar-08 18:29 
GeneralRe: Problem in property sheet.. Pin
Ashish Chauhan4-Mar-08 18:41
Ashish Chauhan4-Mar-08 18:41 
GeneralRe: Problem in property sheet.. Pin
ThatsAlok4-Mar-08 20:40
ThatsAlok4-Mar-08 20:40 
GeneralRe: Problem in property sheet.. Pin
toxcct4-Mar-08 9:58
toxcct4-Mar-08 9:58 
GeneralRe: Problem in property sheet.. Pin
ThatsAlok4-Mar-08 20:40
ThatsAlok4-Mar-08 20:40 
Questionhow to add an image in the form in vc++?? Pin
savitri4-Mar-08 1:15
savitri4-Mar-08 1:15 
GeneralRe: how to add an image in the form in vc++?? Pin
jossion4-Mar-08 1:24
jossion4-Mar-08 1:24 
GeneralRe: how to add an image in the form in vc++?? Pin
Hamid_RT4-Mar-08 4:21
Hamid_RT4-Mar-08 4:21 
AnswerRe: how to add an image in the form in vc++?? [modified] Pin
Rajkumar R4-Mar-08 1:31
Rajkumar R4-Mar-08 1:31 
GeneralRe: how to add an image in the form in vc++?? Pin
Hamid_RT4-Mar-08 4:20
Hamid_RT4-Mar-08 4:20 
GeneralMessage Pass Pin
john56324-Mar-08 0:42
john56324-Mar-08 0:42 

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.