473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Notification Messages from objects

Hi, i can't send a message from a CDlgclass to the Imagen class, a CWnd
derived class. I'm using Visual Studio ++. I have declare it into the
message map. I've also defined it
#define WM_INGRESAR_RES WM_USER + 1

class CDlgClass
void CIngresarResDlg::OnOK()
{
Imagen nuevaRes ;
Imagen* pnuevaRes;
pnuevaRes = &nuevaRes;

pnuevaRes ->SendMessage (WM_INGRESAR_RES , 0, 0);

}

The sender Object needs a pointer to the receiver class, which is the
Image class.
The program compiles, but the message never arrive.
Thanks

May 7 '06 #1
2 1810

Biancu wrote:
Hi, i can't send a message from a CDlgclass to the Imagen class, a CWnd
derived class.


http://www.parashift.com/c++-faq-lit...t.html#faq-5.9
Jonathan

May 7 '06 #2
Biancu wrote:
class CDlgClass
void CIngresarResDlg::OnOK()
{
Imagen nuevaRes ;
This is an image object (presumably) that is constructed with no current or
parent window. It's just an empty constructor.
Imagen* pnuevaRes;
pnuevaRes = &nuevaRes;

pnuevaRes ->SendMessage (WM_INGRESAR_RES , 0, 0);

}

The sender Object needs a pointer to the receiver class, which is the
Image class.


You need to learn more C++ before attempting to use MFC. (You might also try
to get a better library than MFC. It is a very bad example of C++
architecture.) The SendMessage() method doesn't "need" a pointer. If
pnuevaRes->SendMessage() would work, then nuevaRes.SendMessage() would
work, with a dot.

But either way it won't work, because the nuevaRes object is not linked to
any real window to receive the message.

From here, you must use Google Groups to find a newsgroup that covers MFC.
(You might also find one that uses a language you like besides English.)
They will tell you how to send the message to the correct image control.

This newsgroup is only qualifed to discuss the raw C++ language itself. We
know -> but not Image objects!

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
May 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rene Aguirre | last post by:
Hello, I'd like to make a sort of web tracking system for internal stuff at my office. But I'm having problems about how to add email notification to my script. I already tried to send email...
0
by: Mail Delivery Service | last post by:
This multi-part MIME message contains a Delivery Status Notification. If you can see this text, your mail client may not be able to understand MIME formatted messages or DSNs (see RFC 2045 through...
0
by: Eron Wright | last post by:
We heavily use the ASP.NET Cache with file dependencies. The files are located in approximately 200 directories (I understand that monitoring largely occurs on a per-directory basis). As of...
1
by: KVERMEE | last post by:
Hi I have an external application running in the background. When it starts it, adds an icon to the notification area (system tray). The application monitors some things and show messages. The...
0
by: Neil Woolford | last post by:
I'd like to be able to pop up a notification bubble like the ones used by Ubuntu for 'updates available' etc. In particular I'd like to be able to use them to warn users of other machines that I...
3
by: geskerrett | last post by:
We have been asked to develop and application for a client that is a 'notification" system. We would like to use python, but are struggling to find the right starting point. Any suggestions, tips...
2
by: Knokmans | last post by:
Hi, first, this concerns db2 v8 and v9 on AIX and Linux/intel Until now we used a "user exit" when we want to archive logfiles. We changed the user exit executable a bit so we receive an email...
3
by: Sam Durai | last post by:
Is there any method available in DB2 V8 to retrieve only the Warning or Severity messages from the notification log ? PS: I'm looking for something similar to PD_GET_DIAG_HIST function available...
2
by: arunc083 | last post by:
Hello All, I am designing a winforms application which talks to web services via VPN/LAN(.Net framework 2.0). The application mostly deals with load/modify/insert data data in a SQL 2k5 DB. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.