Loading ...
Sorry, an error occurred while loading the content.

Re: edit control (Naming an edit box)

Expand Messages
  • erngui
    Hi, ... It normally already has a number that identifies it (that s the control id). In MFC it normally is a define that looks like IDC_EDIT1. You can then
    Message 1 of 5 , Feb 27, 2002
    • 0 Attachment
      Hi,

      --- In perlguitest@y..., "paulbt2000" <pcovington@a...> wrote:
      > In my product code how do I name an edit box? I am using C++.

      It normally already has a number that identifies it (that's the
      control id). In MFC it normally is a define that looks like
      IDC_EDIT1. You can then lookup the control id in the resource.h file:

      #define IDC_EDIT1 1000

      If your dialog box has the title "Silly Example" you can use this
      code:

      my @win = FindWindowLike(0, "Silly Example");
      my @edit = FindWindowLike(shift @win, "", "Edit", 1000);
      WMSetText(shift @edit, "Whatever");

      Regards,
      Ernesto.
      --
      Ernesto Guisado
      mailto:erngui@...
      http://triumvir.org
    • paulbt2000
      very cool, I will try that as soon as I get a chance. Thanks Ernesto. Paul
      Message 2 of 5 , Feb 27, 2002
      • 0 Attachment
        very cool, I will try that as soon as I get a chance. Thanks Ernesto.

        Paul

        --- In perlguitest@y..., "erngui" <erngui@y...> wrote:
        > Hi,
        >
        > --- In perlguitest@y..., "paulbt2000" <pcovington@a...> wrote:
        > > In my product code how do I name an edit box? I am using C++.
        >
        > It normally already has a number that identifies it (that's the
        > control id). In MFC it normally is a define that looks like
        > IDC_EDIT1. You can then lookup the control id in the resource.h
        file:
        >
        > #define IDC_EDIT1 1000
        >
        > If your dialog box has the title "Silly Example" you can use this
        > code:
        >
        > my @win = FindWindowLike(0, "Silly Example");
        > my @edit = FindWindowLike(shift @win, "", "Edit", 1000);
        > WMSetText(shift @edit, "Whatever");
        >
        > Regards,
        > Ernesto.
        > --
        > Ernesto Guisado
        > mailto:erngui@a...
        > http://triumvir.org
      Your message has been successfully submitted and would be delivered to recipients shortly.