?
Solved

EV_CHILD_NOTIFY

Posted on 1998-12-01
2
Medium Priority
?
420 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 100 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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

800 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