Solved

EV_CHILD_NOTIFY

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
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…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
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.

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now