Board index » cppbuilder » E2027 Must take address of a memory location

E2027 Must take address of a memory location


2005-01-15 09:18:50 PM
cppbuilder48
I've got following problem:
FmControl is an object of class TFmControl: public TForm
void __fastcall TFmScreen::WndProc( TMessage &Msg ) is defined in main
form FmScreen.
In WndProc(), I can access properties of FmControl without problem. But
the de{*word*81} shows E2027 on calling derived method of FmControl, e.g.
FmControl->Hide() while calling methods defined in TFmControl are fine.
What can I do?
thanks
Phuoc Can HUA
--
--------------------------------------------------------------------------
www.huaonline.com
 
 

Re:E2027 Must take address of a memory location

"Phuoc Can HUA" <home}-a-t-{huaonline-dot}com>wrote in message
Quote
What can I do?
Please show your actual code.
Gambit
 

Re:E2027 Must take address of a memory location

When the de{*word*81} stops in the KJ_SELSKIN section FmControl->Hide() shows
E2027 while there's no problem to access button FmControl->BtnRandom
properties.
Same problem is when I try to call FmSkinList->ShowModal().
//---------------------------------------------------------------------------
void __fastcall TFmScreen::WndProc( TMessage &Msg )
{
switch( Msg.Msg)
{
case KJ_SELSKIN:
{ bool Sel;
...
// Call FmSkinList->ShowModal() in ModalOnSkin()
if( ( ModalOnSkin( FmSkinList,"")== mrOk)?
FmSkinList->LbSkinList->ItemIndex>= 0: false)
{ Sel=
SelectSkin( STR2str( FmSkinList->LbSkinList->Items->Strings[ FmSkinList->LbSkinList->ItemIndex]));
if( Sel || (!Sel && !FmControl->Visible))
{ ...
FmControl->Hide(); // <<--------------
BringWindowToTop( PlayerMain->Handle);
}
}
break;
}
case KJ_SETTINGS:
if( ModalOnSkin( FmSettings, NULL)== mrOk)
Settings();
if( FmControl->AllSongs->Files->Count)
FmControl->BtnRandom->Enabled= true;
else
{ FmControl->BtnRandom->Enabled= false;
FmControl->BtnRandom->Down= false;
FmControl->AllSongs->RndPick= false;
}
FmControl->ButtonState();
break;
...
}
TForm::WndProc( Msg );
}
//-------------------------------------------------
On Sat, 15 Jan 2005 10:13:13 -0800, Remy Lebeau (TeamB)
< XXXX@XXXXX.COM >wrote:
Quote

"Phuoc Can HUA" <home}-a-t-{huaonline-dot}com>wrote in message
news: XXXX@XXXXX.COM ...

>What can I do?

Please show your actual code.


Gambit


--
--------------------------------------------------------------------------
www.huaonline.com
 

{smallsort}

Re:E2027 Must take address of a memory location

"Phuoc Can HUA" <home}-a-t-{huaonline-dot}com>wrote in message
Quote
FmControl->Hide(); // <<--------------
You did not show what FmControl was declared as, or how and where it is
assigned.
Gambit