The function SoFindDialog (Options: TFindOptions) : string;
The begin
If frDown in options then begin
//down
End the else begin
//up
The end;
The end;
//in c + + Builder test function cannot compile
String RSoFindDialog (TFindOptions * Options)
{
If (frDown options) in {
//down
} else {
//up
}
}
//don't know if I write wrong there
CodePudding user response:
If (frDown in options)C + +, there is no this kind of grammar,,,,
CodePudding user response:
String RSoFindDialog (TFindOptions * Options)
{
If (Options - & gt; The Contains (frDown))
{
//down
}
The else
{
//up
}
}
CodePudding user response:
Reply: ksrsoftHello c + + Builder 6 without this parameter... -> The Contains
CodePudding user response:
Reply: hi ksrsoftCall cannot compile?
Void __fastcall TForm1: : FormClick (TObject * Sender)
{
RSoFindDialog (FindDialog1 - & gt; The Options);
}
CodePudding user response:
If (Options. The Contains (frDown))CodePudding user response:
Reply: hi realbayCall cannot compile?
Void __fastcall TForm1: : FormClick (TObject * Sender)
{
RSoFindDialog (FindDialog1 - & gt; The Options);
}
CodePudding user response:
Do you want to stick all code, others don't know what is frDownCodePudding user response:
Reply: realbayYou are in Form1 add a control
FindDialog controls have FindDialog1 - & gt; The Options parameter frDown
FrDown parameter is///up/down to find the
CodePudding user response:
TFindOptions is a collection (Set), that is to say, TFindOptions is Sysdefs h, Set an example of the template class, if you want to know if an element is a member of the collection, you can use the Contains method:The Options - & gt; The Contains (frDown);
Secondly, TFindDialog Options is an object, rather than a pointer, so in your RSoFindDialog to obtain when using a pointer:
RSoFindDialog (& amp; (FindDialog1 - & gt; The Options));
Best used reference in RSoFindDialog & amp; :
String RSoFindDialog (TFindOptions & amp; The Options)
{
If (Options. The Contains (frDown)
{
//down
}
The else
{
//up
}
}