WTL edit controls in COM controls and beeps 
Author Message
 WTL edit controls in COM controls and beeps

hallo,

I use a edit control based on Noel Frankinet in a grid COM control

I want finish the editing process with the "enter" key.

Because the edit control didn't handled this message, I handle the message
WM_GETDLGCODE and say I want to it. - thats work fine.

but every time I finish the editing proces with the enter key, I must hear a
beep.

I don't want to listen to this stupid beep. Is ther every one who can help
me?

class WtlGridTextEdit : public CWindowImpl<WtlGridTextEdit, CEdit>
{
public:
DECLARE_WND_CLASS_EX(NULL,0,-1)
BEGIN_MSG_MAP(WtlGridTextEdit)
  MESSAGE_HANDLER(WM_KEYDOWN, OnKeyDown)
  MESSAGE_HANDLER(WM_GETDLGCODE, OnGetDlgCode)
END_MSG_MAP()
  LRESULT OnKeyDown(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL&
bHandled);
  LRESULT OnGetDlgCode(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&
bHandled);

Quote:
};

thanks
thomas


Wed, 08 Sep 2004 07:21:27 GMT  
 WTL edit controls in COM controls and beeps
The beep is probably issued by original Edit control window proc when it
receives WM_CHAR generated by Enter. Try handling WM_CHAR and
suppressing it when the character code is '\r'.
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> hallo,

> I use a edit control based on Noel Frankinet in a grid COM control

> I want finish the editing process with the "enter" key.

> Because the edit control didn't handled this message, I handle the
message
> WM_GETDLGCODE and say I want to it. - thats work fine.

> but every time I finish the editing proces with the enter key, I must
hear a
> beep.

> I don't want to listen to this stupid beep. Is ther every one who can
help
> me?

> class WtlGridTextEdit : public CWindowImpl<WtlGridTextEdit, CEdit>
> {
> public:
> DECLARE_WND_CLASS_EX(NULL,0,-1)
> BEGIN_MSG_MAP(WtlGridTextEdit)
>   MESSAGE_HANDLER(WM_KEYDOWN, OnKeyDown)
>   MESSAGE_HANDLER(WM_GETDLGCODE, OnGetDlgCode)
> END_MSG_MAP()
>   LRESULT OnKeyDown(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL&
> bHandled);
>   LRESULT OnGetDlgCode(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&
> bHandled);
> };

> thanks
> thomas



Wed, 08 Sep 2004 07:39:15 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Edit Control...Edit Control...Edit Control...Edit Control...Edit Control...

2. Rich-edit control infernal beeping

3. Edit control in a WTL CTreeViewCtrlEx problem

4. Howto implement COM control with scrolling using ATL/WTL

5. Edit Control---- Edit control ----------------------

6. WTL - Very new to WTL - Trying to insert new COM object in WTL

7. Using Rich Edit Control or ip address control in a composite control

8. how to create beep beep, ..., beep,beep sound.

9. Problem with rich edit control and com

10. Composite Control using rich edit control question

11. Masked Edit Control and Remote data control problem

12. Bell sound when ENTER is pressed in an EDIT control child of an ATL control

 

 
Powered by phpBB® Forum Software