Board index » delphi » TEdit string to char string[]

TEdit string to char string[]

Dear Everyone,
How may i equate TEdit* name = = char name[] and use
char name in place of TEdit name?
And, is there an easy method for sending the string in a Tedit box for
TextOut() in an app which consists of
TDialog, TWindow and TApp derived classes. The string of TEdit is never
there at the proper time - only random symbols. How may I set up the TEdit
string in order to write it to the TWindow and also save it formatted to a
file?
The point,  I merely want to take the string from the TDialog edit box and
write it to a window with Paint() as the edit field changes unless there's
not an alternative to TransferBuffer. This is easy to do
when the edit box string goes into the same dialog like sprintf()
or ->SetWindowText();
Thank you.
Pete

const MAXDATELEN = 12;
class TTransferDialog : public TDialog

  public:
    TTransferDialog(TWindow* Parent);
    protected:
      void SetupWindow(); // virtual but we don't need
    char Date[15];
    ofstream fpout;
    ifstream fpin;

Quote
};

class TTransferWindow : public TWindow

  public:
    TTransferWindow(TWindow* parent=0);
  protected:
    void Paint(TDC& dc, bool erase, TRect& rect);
    TEdit* Date;

Quote
};

class TFileApp : public TApplication

  public:
    TFileApp() : TApplication("Check Window") {}
    void CmDialog();
  protected:
    void   InitMainWindow()

      TFrameWindow* frame = new TFrameWindow(0,
   "Check Window",new TTransferWindow,true);
      frame->AssignMenu(IDM_CHECK);
      SetMainWindow(frame);
  }
  void CmExit() { PostQuitMessage(0); }
DECLARE_RESPONSE_TABLE(TFileApp);

Quote
};

TTransferWindow::TTransferWindow(TWindow* parent)
:
  TWindow(parent)
{
  Attr.X = GetSystemMetrics(SM_CXSCREEN) / 8;
  Attr.Y = GetSystemMetrics(SM_CYSCREEN) / 8;
  Attr.H = Attr.Y * 6;
  Attr.W = Attr.X * 6;

Quote
}

void TTransferWindow::CmDialog(){
   TTransferDialog* user(GetApplication->
   GetMainWindow(), IDD_DIALOG1);
    user->Execute();} @peoplepc.com
Sub
ject:   TEdit string to char array

begin 666 Main Identity.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..DED96YT:71Y.TUA:6X-"D9.
M.DUA:6X@261E;G1I='D-"D%$4CM(3TU%.CL[.SL[.U5N:71E9"!3=&%T97,-
M"DQ!0D5,.TA/344Z56YI=&5D(%-T871E<PT*4D56.C(P,#$P,S(Q5#(P,30S
/,5H-"D5.1#I60T%21 T*
`
end

 

Re:TEdit string to char string[]


If I understand you, TEdit::SetWindowText(...) & TEdit::UpdateWindow should
do.

Boris
Bo...@sirma.bg

Quote
"Pete Aldridge" <pe...@peoplepc.com> wrote in message

news:3ab90b69_2@dnews...
Quote
> Dear Everyone,
> How may i equate TEdit* name = = char name[] and use
> char name in place of TEdit name?
> And, is there an easy method for sending the string in a Tedit box for
> TextOut() in an app which consists of
> TDialog, TWindow and TApp derived classes. The string of TEdit is never
> there at the proper time - only random symbols. How may I set up the TEdit
> string in order to write it to the TWindow and also save it formatted to a
> file?
> The point,  I merely want to take the string from the TDialog edit box and
> write it to a window with Paint() as the edit field changes unless there's
> not an alternative to TransferBuffer. This is easy to do

Other Threads