Click here to Skip to main content
15,884,177 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to add Event handler to dynamically created Button Pin
hemlat13-Apr-09 23:05
hemlat13-Apr-09 23:05 
AnswerRe: How to add Event handler to dynamically created Button Pin
Hamid_RT13-Apr-09 23:54
Hamid_RT13-Apr-09 23:54 
QuestionHow do I catch the 0xC0000005 Exception? Pin
mildred-frontfree13-Apr-09 21:33
mildred-frontfree13-Apr-09 21:33 
AnswerRe: How do I catch the 0xC0000005 Exception? Pin
_AnsHUMAN_ 13-Apr-09 21:41
_AnsHUMAN_ 13-Apr-09 21:41 
GeneralRe: How do I catch the 0xC0000005 Exception? Pin
mildred-frontfree13-Apr-09 21:44
mildred-frontfree13-Apr-09 21:44 
AnswerRe: How do I catch the 0xC0000005 Exception? Pin
ParagPatel13-Apr-09 23:35
ParagPatel13-Apr-09 23:35 
GeneralRe: How do I catch the 0xC0000005 Exception? Pin
mildred-frontfree13-Apr-09 23:42
mildred-frontfree13-Apr-09 23:42 
QuestionHow to cancel long time drawing Pin
fitatc13-Apr-09 21:31
fitatc13-Apr-09 21:31 
I am writing a code to do a long time draw like:
void MyDialog::DoSlowDraw(DWORD tDelay){
     while(notFinished){
        DrawNextLine(); // like LineTo()....
        Sleep(tDelay);
     }
 }

And it's better to have a "cancel button" because it may take a long time according to tDelay.
---------------------
Cry | :(( My try:
To handle "cancle button clicked Message" , Drawing must be done by another thread.
UINT DrawProc( LPVOID pParam )
{
    CMyDialog* pform = (CMyDialog*)pParam;
    int timeDelay = pform->timeD;
    Line_list* pLines = pform->m_pLines;
    CClientDC cdc(pform);
    //Draw....

It's worked, but as far as I know
1. Work thread should not touch the GUI ---- (Do the drawing).
2. MFC object should not passed to another thread ---- (passing drawing data by CMyDialog*)

Confused | :confused: Is there a good way to cancle long time drawing.
AnswerRe: How to cancel long time drawing Pin
David Crow14-Apr-09 3:11
David Crow14-Apr-09 3:11 
GeneralRe: How to cancel long time drawing Pin
fitatc14-Apr-09 22:31
fitatc14-Apr-09 22:31 
GeneralRe: How to cancel long time drawing Pin
David Crow15-Apr-09 3:02
David Crow15-Apr-09 3:02 
GeneralRe: How to cancel long time drawing Pin
fitatc16-Apr-09 16:31
fitatc16-Apr-09 16:31 
GeneralRe: How to cancel long time drawing Pin
David Crow17-Apr-09 2:23
David Crow17-Apr-09 2:23 
QuestionHow to retrieve bits from a file using MFC Pin
Pankaj D.Dubey13-Apr-09 20:36
Pankaj D.Dubey13-Apr-09 20:36 
AnswerRe: How to retrieve bits from a file using MFC Pin
Cedric Moonen13-Apr-09 20:56
Cedric Moonen13-Apr-09 20:56 
AnswerRe: How to retrieve bits from a file using MFC Pin
KarstenK13-Apr-09 21:13
mveKarstenK13-Apr-09 21:13 
QuestionRegwrite in bat file Pin
p_196013-Apr-09 20:09
p_196013-Apr-09 20:09 
AnswerRe: Regwrite in bat file Pin
_AnsHUMAN_ 13-Apr-09 20:19
_AnsHUMAN_ 13-Apr-09 20:19 
AnswerRe: Regwrite in bat file Pin
birajendu13-Apr-09 20:19
birajendu13-Apr-09 20:19 
QuestionHOW TO MAKE A WIN32 APPLICATION NOT INHERITING FROM EXPLORER.EXE? Pin
birajendu13-Apr-09 20:02
birajendu13-Apr-09 20:02 
AnswerRe: HOW TO MAKE A WIN32 APPLICATION NOT INHERITING FROM EXPLORER.EXE? Pin
_AnsHUMAN_ 13-Apr-09 20:14
_AnsHUMAN_ 13-Apr-09 20:14 
GeneralRe: HOW TO MAKE A WIN32 APPLICATION NOT INHERITING FROM EXPLORER.EXE? Pin
birajendu13-Apr-09 20:26
birajendu13-Apr-09 20:26 
GeneralRe: HOW TO MAKE A WIN32 APPLICATION NOT INHERITING FROM EXPLORER.EXE? Pin
Cedric Moonen13-Apr-09 20:35
Cedric Moonen13-Apr-09 20:35 
GeneralRe: HOW TO MAKE A WIN32 APPLICATION NOT INHERITING FROM EXPLORER.EXE? Pin
birajendu14-Apr-09 1:01
birajendu14-Apr-09 1:01 
QuestionRe: HOW TO MAKE A WIN32 APPLICATION NOT INHERITING FROM EXPLORER.EXE? Pin
David Crow14-Apr-09 3:15
David Crow14-Apr-09 3:15 

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.