F12 Frustracted

G

Guest

Hello all,

I've got no accelerator to F12 but if I press F12 I get an assertion. Any
ideas why?

Using MFC V6 but app originally written under V4.1. How old? Yeah, very.

Thanks
Jooster
--
Jooster aka
Matt Pickering
Wednesbury
West Midlands
UK
 
G

Guest

Jeff,

Are you my mate or what? You've answered/solved so many of my
questions/problems. Now, as a developer myself, I know how the "feel-good"
factor makes me feel when I can help someone. So, please have some
"feel-good" emotions from me....through the ether. Really.

Link was good. But how do I trap the F12 key-press? Tried OnKeyDown &
PreTranslateMessage. Both fail to trap this.

Sincerely,

Jooster,
aka Matt

PS I love software so much.... still working at 1am.


--
Jooster aka
Matt Pickering
Wednesbury
West Midlands
UK
 
T

Ted

This is only going to happen while running the program in a debugger, so I
wouldn't be concerned (your end users will never see it)

Ted.
 
G

Guest

Ted,

Thanks, you're right. Also Jeff, your link to more info was exactly right too.

Strange though. Bug doesn't exist when using Release Build stand-alone. I
read the article from Jeff's Link and came to the same conclusion as Ted.
But, I executed a Release Build through VStudio & still had the error (OK,
wasn't an Assertion, that only gets called if _debug but I got an int 3).
Same exe run off the desktop, no probs.

Thanks again to you both,
--
Jooster aka
Matt Pickering
Wednesbury
West Midlands
UK
 
C

Carl Daniel [VC++ MVP]

Jooster said:
Ted,

Thanks, you're right. Also Jeff, your link to more info was exactly
right too.

Strange though. Bug doesn't exist when using Release Build
stand-alone. I read the article from Jeff's Link and came to the same
conclusion as Ted. But, I executed a Release Build through VStudio &
still had the error (OK, wasn't an Assertion, that only gets called
if _debug but I got an int 3). Same exe run off the desktop, no probs.

That's exactly what you should have seen. The forced breakpoint will occur
when you press F12 while a program that's being debugged has focus. Windows
is doing this under the covers and nothing about the program being debugged
(e.g. debug versus release build) can influence it.

-cd
 
G

Guest

Thanks Carl. But why is Windiows forcing an int-3 when F12 is pressed?
--
Jooster aka
Matt Pickering
Wednesbury
West Midlands
UK
 
C

Carl Daniel [VC++ MVP]

Jooster said:
Thanks Carl. But why is Windiows forcing an int-3 when F12 is pressed?

It's a feature to allow you to forcibly break into the debugger when
debugging - nothing more.

-cd
 
G

Guest

Thanks for that. Makes sense.
--
Jooster aka
Matt Pickering
Wednesbury
West Midlands
UK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top