Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to make a CALLBACK Function ???

Posted on 2000-03-09
4
Medium Priority
?
279 Views
Last Modified: 2008-02-01
I have made a function that shows an Icon in the taskbar of windows98, and in that funtion I've told windows to make a callback message by using NOTIFYICONDATA structure.
My question now is, how do I make a funtion in my c++builder 5 that recieves the message from windows, when my mouse click's on the icon ???
I have read, that I should make a callback function, but I don't know how to do that. The function that I want to receive the windows message is called:
void On_MYWM_NOTIFYICON(WPARAM wParam, LPARAM lParam)
so I hope you know what is missing ???
0
Comment
Question by:RO
[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
4 Comments
 
LVL 8

Accepted Solution

by:
gelbert earned 100 total points
ID: 2601861
h

class CMainFrame : public CFrameWnd
{
DECLARE_DYNAMIC(CMainFrame)  
//{{AFX_MSG(CMainFrame)
....
afx_msg LRESULT OnTrayNotification(WPARAM wp, LPARAM lp);  
....
//}}AFX_MSG  
DECLARE_MESSAGE_MAP()};

..cpp

BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)  
//{{AFX_MSG_MAP(CMainFrame)  
....
ON_MESSAGE(WM_MY_TRAY_NOTIFICATION, OnTrayNotification)  
....
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
0
 
LVL 5

Expert Comment

by:Wyn
ID: 2601935
c++builder 5 !!!
0
 
LVL 8

Expert Comment

by:gelbert
ID: 2602031
Use in .h
LRESULT CALLBACK OnTrayNotification(WPARAM wp, LPARAM lp);
Use in .cpp
LRESULT CALLBACK OnTrayNotification(WPARAM wp, LPARAM lp)
{
   return (long)0;
}
0
 

Author Comment

by:RO
ID: 2612444
I'm sorry that I distorbed you, but your answer wasn't what I was looking for. I've solved my problem by using something called message map in borland c++ builder 5.
Thanks anyway for traying to help!!!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

704 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