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

C / C++ / MFC

 
GeneralRe: Scroll bar question - need experts help here Pin
TyMatthews21-Oct-02 9:20
TyMatthews21-Oct-02 9:20 
GeneralRe: Scroll bar question - need experts help here Pin
Atlantys21-Oct-02 9:40
Atlantys21-Oct-02 9:40 
GeneralRe: Scroll bar question - need experts help here Pin
Yaron Nir21-Oct-02 21:32
Yaron Nir21-Oct-02 21:32 
GeneralAdditional button on window's caption area Pin
Mandalay21-Oct-02 4:35
Mandalay21-Oct-02 4:35 
GeneralRe: Additional button on window's caption area Pin
FlorianS21-Oct-02 7:08
FlorianS21-Oct-02 7:08 
Generalparticular area data to printer Pin
vgkotha21-Oct-02 4:19
vgkotha21-Oct-02 4:19 
GeneralRe: particular area data to printer Pin
l a u r e n21-Oct-02 6:37
l a u r e n21-Oct-02 6:37 
GeneralCancelling a long process Pin
Mark Donkers21-Oct-02 4:18
Mark Donkers21-Oct-02 4:18 
Hello everyone,

Wow. It's been a while since I've been here. I was doing some embedded stuff there for a while. It's nice to be back.

Anyway, the question that I had has to do with having the ability to cancel a process that is in the middle of a for() loop. What I would like is a dialog that pops up on the over the application window that simply says "Cancel". I was reading used the code from Nishant's article Tutorial - Modeless Dialogs with MFC (http://www.codeproject.com/dialog/gettingmodeless.asp#xx211427xx). I've declared my modeless dialog as a local variable in the function with the loop. In the loop I want to check to see if the Cancel button was pressed. When I enter my loop, I can't press the Cancel button. Any ideas?? Thanks in advance.

LONG CTest3431::TestKeypad()<br />
{<br />
    LONG lRetVal = 0;<br />
    CCancelDlg dlgCancel;<br />
<br />
    dlgCancel.SetProgressText("Running keypad test...");<br />
    dlgCancel.ShowWindow(SW_SHOW);<br />
    ....<br />
<br />
    for( i=0; i<sizeof(sbKeys); i++ )<br />
    {<br />
        if( dlgCancel.IsOperationCancelled() )<br />
        {<br />
            lRetVal = -1;<br />
            break;<br />
        }<br />
        <br />
        ....<br />
     }<br />
<br />




Mark Donkers

A witty saying proves nothing.

-- Voltaire
GeneralRe: Cancelling a long process Pin
Ravi Bhavnani21-Oct-02 4:33
professionalRavi Bhavnani21-Oct-02 4:33 
GeneralRe: Cancelling a long process Pin
Mark Donkers21-Oct-02 5:21
Mark Donkers21-Oct-02 5:21 
Generalprinting particular area data to printer Pin
vgkotha21-Oct-02 4:17
vgkotha21-Oct-02 4:17 
GeneralDocument/View and WM_CHAR Pin
atanas.bakalov21-Oct-02 4:08
atanas.bakalov21-Oct-02 4:08 
Generaltemplate and ptr to it... Pin
Stan the man21-Oct-02 3:41
Stan the man21-Oct-02 3:41 
GeneralRe: template and ptr to it... Pin
Joaquín M López Muñoz21-Oct-02 8:45
Joaquín M López Muñoz21-Oct-02 8:45 
GeneralGeting user privilege Pin
Stephbb7521-Oct-02 3:00
Stephbb7521-Oct-02 3:00 
Generalchange the colour of text in c++ Pin
rich Davis21-Oct-02 2:27
rich Davis21-Oct-02 2:27 
GeneralRe: change the colour of text in c++ Pin
Maximilien21-Oct-02 2:30
Maximilien21-Oct-02 2:30 
QuestionNULL and then reuse? Pin
ns21-Oct-02 2:18
ns21-Oct-02 2:18 
AnswerRe: NULL and then reuse? Pin
Hugo Hallman21-Oct-02 2:33
Hugo Hallman21-Oct-02 2:33 
GeneralRe: NULL and then reuse? Pin
Hugo Hallman21-Oct-02 2:34
Hugo Hallman21-Oct-02 2:34 
AnswerRe: NULL and then reuse? Pin
Maximilien21-Oct-02 2:36
Maximilien21-Oct-02 2:36 
Generalthanks! Pin
ns21-Oct-02 2:38
ns21-Oct-02 2:38 
GeneralRe: thanks! Pin
Christian Graus21-Oct-02 16:44
protectorChristian Graus21-Oct-02 16:44 
GeneralRe: thanks! Pin
ns22-Oct-02 1:15
ns22-Oct-02 1:15 
Questionhow monitor the keyboard message at one application Pin
misty21-Oct-02 1:39
misty21-Oct-02 1:39 

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.