Solved

EV_CHILD_NOTIFY

Posted on 1998-12-01
2
418 Views
Last Modified: 2013-12-26
How can i handle the right-Mousebuttondown message from
a child? i tryed:

// i Classdeklaration of Parentwindow
TButton      * SearchButton;

// In the responstable
EV_CHILD_NOTIFY(IDC_SEARCH,WM_LBUTTONDOWN,br)

//In construktor of parentwindow
SearchButton = new TButton(this,IDC_SUCHEN);

Can you please tell me why it does not work??
0
Comment
Question by:stephan papadakis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:stephan papadakis
ID: 1299804
Edited text of question
0
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 50 total points
ID: 1299805
There is standart metod for capture messages for
all types of Contols.

1. Define new Class MyButton: in file mybutton.h
#if !defined(__MYBUTTON)
#define __MYBUTTON
class MyButton: public TButton{    
public:
  MyButton(TWindow* parent,int nResId);
  void EvRButtonUp(UINT uKey, TPoint& point);

  TWindow* tParent;
DECLARE_RESPONSE_TABLE(MyButton);
};
#endif
2. In cpp Programm:
#include "mybutton.h"
DEFINE_RESPONSE_TABLE1(MyButton, TButton)
   EV_WM_RBUTTONUP,

END_RESPONSE_TABLE;
MyButton::MyButton(TWindow* parent,int nResId)
  : TButton(parent, nResId)
{
  tParent = parent;
}
void MyButton::EvRButtonUp(UINT uKey,TPoint&  point)
{
.
In this place must insert you code
}

In you Dialog Procedure you must type something as:
MyButton *tMy = new MyButton(IDC_BUTTON,..);
Regards, Alex
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

689 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question