473,320 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Can not catch KeyDown message from RETURN key

Hi all,

I got a problem with Return key in my C++/C# application.
On CView dilalog I put my C# control. This C# control has couple
other controls nested. I have problem with RichTextBox control which
is at the bottom of my control hierarchy. It does not process
VK_RETURN key down. So I can not create new line. All other keys work
in RichTextBox. Of course I made it Multiline. I used Spy++ tool to
figure out what is going on. I managed to see that RichTextBox window
receives RETURN message. But nothing happens.
My OnKeyDown handler is hit for all keys except of RETURN.

I would greatly appreciate any hints.

Thanks in advance,
Roman
Nov 16 '05 #1
3 7550
Roman,

Can you provide a sample in the zip file, demonstrating your problem?. I
will investigate on that and hopefully it can be fixed.

--
Shak
(Houston)
"Roman Muntyanu" <mu******@hotmail.com> wrote in message
news:df**************************@posting.google.c om...
Hi all,

I got a problem with Return key in my C++/C# application.
On CView dilalog I put my C# control. This C# control has couple
other controls nested. I have problem with RichTextBox control which
is at the bottom of my control hierarchy. It does not process
VK_RETURN key down. So I can not create new line. All other keys work
in RichTextBox. Of course I made it Multiline. I used Spy++ tool to
figure out what is going on. I managed to see that RichTextBox window
receives RETURN message. But nothing happens.
My OnKeyDown handler is hit for all keys except of RETURN.

I would greatly appreciate any hints.

Thanks in advance,
Roman

Nov 16 '05 #2
send it to sh***********@yahoo.com .Make ur zip file small size if its
possible

--
Shak
(Houston)


"Roman Muntyanu" <mu******@hotmail.com> wrote in message
news:df**************************@posting.google.c om...
Hi Shak,

I tried to send zip file with my testing project to sh**@fakedomain.com
but delivery failed. Is this possible to post file in this thread?
Or mayby I can send to another your address.

I appreciate your time.

Thanks, Roman

"Shakir Hussain" <sh**@fakedomain.com> wrote in message

news:<Ou**************@tk2msftngp13.phx.gbl>...
Roman,

Can you provide a sample in the zip file, demonstrating your problem?. I
will investigate on that and hopefully it can be fixed.

--
Shak
(Houston)
"Roman Muntyanu" <mu******@hotmail.com> wrote in message
news:df**************************@posting.google.c om...
Hi all,

I got a problem with Return key in my C++/C# application.
On CView dilalog I put my C# control. This C# control has couple
other controls nested. I have problem with RichTextBox control which
is at the bottom of my control hierarchy. It does not process
VK_RETURN key down. So I can not create new line. All other keys work
in RichTextBox. Of course I made it Multiline. I used Spy++ tool to
figure out what is going on. I managed to see that RichTextBox window
receives RETURN message. But nothing happens.
My OnKeyDown handler is hit for all keys except of RETURN.

I would greatly appreciate any hints.

Thanks in advance,
Roman

Nov 16 '05 #3
Roman.,

We both had good email communication, and finally got the solution for your
problem. I am posting the answer for others to benefit

To In the derived class of RichEditBox,

protected override void WndProc(ref Message m)
{
int WM_GETDLGCODE = 0x0087;
int VK_RETURN = 0x0D;
if (m.Msg == WM_GETDLGCODE)
{
if (m.WParam.ToInt32() == VK_RETURN)
{
base.SelectedText = "\n";
return ;
}
}
base.WndProc (ref m);
}
--
Shak
(Houston)
"Roman Muntyanu" <mu******@hotmail.com> wrote in message
news:df**************************@posting.google.c om...
Hi Shak,

I tried to send zip file with my testing project to sh**@fakedomain.com
but delivery failed. Is this possible to post file in this thread?
Or mayby I can send to another your address.

I appreciate your time.

Thanks, Roman

"Shakir Hussain" <sh**@fakedomain.com> wrote in message

news:<Ou**************@tk2msftngp13.phx.gbl>...
Roman,

Can you provide a sample in the zip file, demonstrating your problem?. I
will investigate on that and hopefully it can be fixed.

--
Shak
(Houston)
"Roman Muntyanu" <mu******@hotmail.com> wrote in message
news:df**************************@posting.google.c om...
Hi all,

I got a problem with Return key in my C++/C# application.
On CView dilalog I put my C# control. This C# control has couple
other controls nested. I have problem with RichTextBox control which
is at the bottom of my control hierarchy. It does not process
VK_RETURN key down. So I can not create new line. All other keys work
in RichTextBox. Of course I made it Multiline. I used Spy++ tool to
figure out what is going on. I managed to see that RichTextBox window
receives RETURN message. But nothing happens.
My OnKeyDown handler is hit for all keys except of RETURN.

I would greatly appreciate any hints.

Thanks in advance,
Roman

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gene Hubert | last post by:
I'm trying to catch the KeyUp event in textbox of a DataGrid. I'm picking up the keydown and keypress events ok, but not keyup. Can anyone see what is wrong with this code. I been fighting with...
5
by: Lars Netzel | last post by:
Hey! I have tried...(in a datagrid) e.KeyDate.Return and e.KeyDate.TAB end e.KeyDate.Enter
2
by: John Huang | last post by:
I would like to use datagrid's keydown event to capture the "Ctrl+D" when users press this key. But it did not work. What did I miss? (I have already set the form keypreview to true) Private...
0
by: tony | last post by:
Hello!! I have a derived class called StringClassEditor which inherit from UITypeEditor listed below. Now to my question in method EditValue in this class I have this statement lb.KeyDown ...
2
by: sytemper | last post by:
I write a keydown KeyDown event to catch if tab is press or tab+shift is press.And i already override the IsInputKey method. But noe i only can get the tab but no shift+tab. When shift+tab is...
3
by: MLM450 | last post by:
I have a control that handles the KeyDown event but it does not seem to execute when a combination of keys is pressed - like CTRL+Z. If I press CTRL, it executes. If I press Z, it executes. But the...
1
by: kgerritsen | last post by:
I am building an application that will receive input from a barcode scanner. The barcode scanner is configured to append to the front value a single character and hyphen that identify the barcode...
2
by: Tony Johansson | last post by:
Hello! I have created a Control that consist of a label and a textbox.I have called this class ctlLabelTextbox. public partial class ctlLabelTextbox : UserControl { .... } The class that I...
4
by: Tom P. | last post by:
You wouldn't think this would be as hard as it is but for some reason I can't find a way to translate any of the codes in the KeyDownEventArgs into the actual characters they represent. The best...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.