🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.learn.c-c++
Article #376

Dialogue to dialogue sendmessage( Help)

#376
From: PolyMorph
Date: Wed, 06 Sep 2000 21:48
61 lines
3300 bytes
Returning to Borland Owl 4.5 & in deep trouble.
Why please does the following code not send a message(compiles OK).
The two dialogues are property tab type within a dialogue main window.
My simple aim is to display in the 'TDdit control BrokerNameEdit ' of
dialogue DlgTransact  the text from the extern structure member
valuin_user.label1.
This text is entered into valuin_user.label1 by selecting the radiobuttton
in dialogue TDlgLfuser.
Switching from one tab to the other does not call the constructor
or setupwindow function of the selected dialogue.
I need  the AskOfferFn() to be called when the dialogue is tab switched from
TDlgLfuser to  DlgTransact. I assume that sending a message from TDlgLfuser
to
DlgTransact is the way to accomplish it.
The following code is only a preliminary test version to sendmessage()
which does not work but ultimately I need to send dialogue to dialogue of
course.
note: using EV_MESSAGE(...) in place of EV_COMMAND(USER_MESSAGE,USerMessage)
brings up the following compile error.(Help???)
"Could not find a match I32_U_I32_Sig(void(TDlgLfuser::*)())"
....................................................................
module1.h
class TDlgLfuser : public TPropertyPage
{ public:
 TDlgLfuser(TResId res);
......
protected:
......
 TRadioButton *UserDef1;
 void Def1RbFn();
 void USerMessage();
 DECLARE_RESPONSE_TABLE(TDlgLfuser);
};
///////////////////////////
module1.cpp
#include "mudule2.h"
#define USER_MESSAGE WM_USER+1
DEFINE_RESPONSE_TABLE1(TDlgLfuser, TPropertyPage)
.........
 EV_COMMAND(USERDEF1_RB,Def1RbFn),EV_COMMAND(USER_MESSAGE,USerMessage),
 END_RESPONSE_TABLE;
 void TDlgLfuser::USerMessage()
 {MessageBox("Pac Message Recieved","Message2"); }
 void TDlgLfuser::Def1RbFn()
{  .....;  TDlgLfuser::SendMessage(USER_MESSAGE,0,0); }
///////////////////////////////////
mudule2.h
class DlgTransact : public TPropertyPage {
public:
 DlgTransact(TResId res);
protected:
 TEdit *BrokerNameEdit;
 void AskOfferFn();
 };
/////////////////////////////////
  Module2.cpp
#include "mudule2.h"
DlgTransact::DlgTransact(TResId res ):TPropertyPage(res)
{ ...;  BrokerNameEdit = new TEdit(this,BROKER_NAME);}
void DlgTransact::AskOfferFn()
{BrokerNameEdit->SetText(valuin_user.label1);}//valuin_user extern struct
Technical Details
Message-ID: <8p6e4v$a1q$2@plutonium.btinternet.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-east!sn-xit-uk!supernews.com!195.86.7.162.MISMATCH!newsfeed.wirehub.nl!news-raspail.gip.net!news.gsl.net!gip.net!grolier!btnet-peer0!btnet!mendelevium.btinternet.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114592,e9b4083f0f68a408,start
X-Google-Attributes: gid114592,public
X-Google-Thread: 108ebe,e9b4083f0f68a408,start
X-Google-Attributes: gid108ebe,public
X-Google-ArrivalTime: 2000-09-06 14:52:02 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-east!sn-xit-uk!supernews.com!195.86.7.162.MISMATCH!newsfeed.wirehub.nl!news-raspail.gip.net!news.gsl.net!gip.net!grolier!btnet-peer0!btnet!mendelevium.btinternet.com!not-for-mail
From: "PolyMorph" <mirable.dictu@btinternet.com>
Newsgroups: alt.comp.lang.learn.c-c++,borland.public.cpp.owl
Subject: Dialogue to dialogue sendmessage( Help)
Date: Wed, 6 Sep 2000 22:48:32 +0100
Organization: BT Internet
Lines: 65
Message-ID: <8p6e4v$a1q$2@plutonium.btinternet.com>
NNTP-Posting-Host: host213-1-176-81.btinternet.com
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300