Thread Subject: CTRL+C Conflict between Matlab and MFC Mex

Subject: CTRL+C Conflict between Matlab and MFC Mex

From: Bill August

Date: 6 Oct, 2008 15:32:36

Message: 1 of 3

Hi all,
I create a MFC dialog in a mex function. That means i can use the MFC style dialog in Matlab. The problem is that when i use ctrl+c in my MFC Dialog(Which means copy), when i close the dialog, the matlab system also react the message (which is terminate the programme). It gave me an error as,
Operation terminated by user during......
I've tried different setting of the dialog including different modality. It just does not work.
Any help would be appreciated.

Subject: CTRL+C Conflict between Matlab and MFC Mex

From: Walter Roberson

Date: 6 Oct, 2008 17:02:32

Message: 2 of 3

Bill August wrote:
> I create a MFC dialog in a mex function. That means i can use the MFC style dialog
> in Matlab. The problem is that when i use ctrl+c in my MFC Dialog(Which means copy),
> when i close the dialog, the matlab system also react the message (which is
> terminate the programme). It gave me an error as,
> Operation terminated by user during......
> I've tried different setting of the dialog including different modality. It just
> does not work.

From what I've read, you cannot prevent control-c from terminating the function
in Matlab, at least up through R2008a. (I have not looked at R2008b pre-release
at all.)

Subject: CTRL+C Conflict between Matlab and MFC Mex

From: Bill August

Date: 9 Oct, 2008 12:41:48

Message: 3 of 3

> Bill August wrote:
> > I create a MFC dialog in a mex function. That means
> i can use the MFC style dialog
> > in Matlab. The problem is that when i use ctrl+c in
> my MFC Dialog(Which means copy),
> > when i close the dialog, the matlab system also
> react the message (which is
> > terminate the programme). It gave me an error as,
> > Operation terminated by user during......
> > I've tried different setting of the dialog
> including different modality. It just
> > does not work.
>
> From what I've read, you cannot prevent control-c
> from terminating the function
> in Matlab, at least up through R2008a. (I have not
> looked at R2008b pre-release
> at all.)
Hi Walter,
Thank you for you reply.

In 2008, it happens in a script or m-file. For running in the command window there is no error message.

For 6.5, no error message and it works brilliant.

I guess mathworks want to give 'New Message In Response to Ctrl+C'. See http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/rn/brb410y-1.html&http://www.google.com/search?hl=en&client=opera&rls=en&hs=oJa&q=CTRL%2BC+matlab+Operation+terminated+by+user&btnG=Search

But unfortunately they made a new mistake.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com