Solved

EV_CHILD_NOTIFY

Posted on 1998-12-01
2
414 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
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
What is the normal amount of queries 5 80
How to analyze web traffic logs 10 111
CSS display:none AND display:block on same element 3 103
Problem to page 4 93
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
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.

839 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