Solved

EV_CHILD_NOTIFY

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

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…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

809 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