Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MFC Classes Problem - how to prevent closing program?

Status
Not open for further replies.

Mansour_M

Full Member level 1
Joined
Jul 30, 2006
Messages
99
Helped
11
Reputation
22
Reaction score
3
Trophy points
1,298
Location
Newcastle, UK
Activity points
1,944
mfc on_ok

Hi Everyone!

I wrote a Dialog Based program using MFC Classes. I noticed that one can leave the program by pressing 'ESC' or 'Enter' key. I add an event handler to reject these keys but it doesn't work. Please help me.

Thanks in advance!
 

on_ok mfc

refer microsoft press book writer is kruglinski method for doing this he has been described the method for disabling the enter and esc button event for any dialog box in that book.

Although i dont remember it correctly but if i am not wrong for doing this whatever you mentioned in your post you need to map the ON_OK and ON_CANCEL messase in your dialog class and from there you need to return without doing anything you will get your work done.

Regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top