|
Yes I meant the OS.
So, I looked again and found it right away LOL.
I had no idea PreTranslateMessage calls walked up the window heirarchy to the main window (not
that I ever came across a situation where it mattered until this discussion thread ).
Apparently it's for keyboard accelerator handling.
Ya learn something new everyday!
I wonder if this adds a danger to the misuse of PreTranslateMessage I see often on the message
boards...
Thank you so much!
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Mark Salsbery wrote: Apparently it's for keyboard accelerator handling.
Read this[^]
Mark Salsbery wrote: I wonder if this adds a danger to the misuse of PreTranslateMessage I see often on the message
boards...
PreTranslateMessage is one thing that is excessively misused.
Shog on learning VB6: Ah, that would have been VB6. Kicked my ass anyway. So easy to learn, just like falling down a flight of stairs...
|
|
|
|
|
brahmma wrote: PreTranslateMessage is one thing that is excessively misused.
Indeed!
Thanks for the link...bookmarked for future reference!
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Mark Salsbery wrote: Thanks for the link...bookmarked for future reference!
Glad that I could be of some help.
Shog on learning VB6: Ah, that would have been VB6. Kicked my ass anyway. So easy to learn, just like falling down a flight of stairs...
|
|
|
|
|
Hi,
First,Thanks for your (very) quick reply.
My problem is that I've overrided the PreTranslateMessage method,
and put a breakpoint in that function but I never get to that breakpoint.
However , when I move the focus to one of the controls(for example editbox),
the focused control gets the keyboard events...
Is it possible that the controls receives keyboard events but the parent window does'nt????
Thanks again,
With best regards,
Eli
|
|
|
|
|
eli15021979 wrote: I've overrided the PreTranslateMessage method,
and put a breakpoint in that function but I never get to that breakpoint.
Can you please post that code here?
|
|
|
|
|
You may try this...
BOOL CXDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if(pMsg->message==WM_KEYDOWN)
AfxMessageBox("ll");
return CDialog::PreTranslateMessage(pMsg);
}
Barna
|
|
|
|
|
|
send me your mobile number then I'll text message the code to you!
|
|
|
|
|
paras_s12 wrote: now i want code for this
You're obviously thinking of rent-a-coder.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
hi i have to get the data displayed in LCD when i clicked a button in mfc. how to do this.
-- modified at 23:58 Tuesday 1st May, 2007
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
deeps_cute wrote: hi i have to get the data displayed in LCD when i clicked a button in mfc. how to do this.
|
|
|
|
|
Sorry but you need to read an article to do this not post here.. start with controlling input ports from lpt and learn about lpt addresses and low/high values
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
I dont know you speak about special monitor or you want to get/set value of a control
|
|
|
|
|
deeps_cute wrote: hi i have to get the data displayed in LCD when i clicked a button in mfc. how to do this.
Do you need help responding to a button click, or displaying data?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi,
anyone know how to dislay a table (in .mdb file) in a datagrid using DAO.
Thanks
|
|
|
|
|
try this one.
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi,
What is the difference in creating a CWnd derived or a CStatic derived owner-draw control (e.g. can I handle different messages, are there any limitations)?
I plan to rewrite some of my owner-draw controls (e.g. CStatic based image/text output). It seams for a CWnd based control the user needs to enter the exact class name in the resource editor, while with a CStatic based control the user can simply choose a static type in the resource editor. Thanks for feedback.
/Moak
|
|
|
|
|
In sense of limitations - no difference.
With CWnd you need to do a bit more work, that is register a new window class. With CStatic there is no need in registration as it is already done and called STATIC [as I could remember it correctly].
It seams for a CWnd based control the user needs to enter the exact class name in the resource editor, while with a CStatic based control the user can simply choose a static type in the resource editor.
Yes it is so.
--
=====
Arman
|
|
|
|
|
Thanks, seams I am going to be lazy and will design my owner-draw controls as CStatic derived classes.
/M
|
|
|
|
|
you're probably not knowing that CStatic inherits from CWnd...
|
|
|
|
|
seams I haven't done my homework.... that implies that there is no limitation using a CStatic. thanks
|
|
|
|
|
nope, that implies that inheriting a CStatic will bring you some stuff that CWnd haven't, which you probably don't want in your own control... but all depends what you want to do
|
|
|
|
|
Hi there,
I was wondering and i'd like to know..
How can I add a function to the file properties menu (when you right click a file)?
For example when you have installed Norton, when you right click a file a "scan file with norton" appears..
Anyone knows?
|
|
|
|