How to Add custom text to CeditBox

This is a discussion on How to Add custom text to CeditBox within the Windows Programming forums, part of the Platform Specific Boards category; Hi! I am trying to enter the my user defined text to CEditBox. I am trying the following code: <code> ...

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    18

    How to Add custom text to CeditBox

    Hi!

    I am trying to enter the my user defined text to CEditBox.

    I am trying the following code:

    <code>
    CEdit *ed=(CEdit *) GetDlgItem(IDD_EB1);

    ed->SetDlgItemText(IDD_EB1,"bhagwat"); //IDD_EB1 edit box id

    </code>

    thanks

    bhagwat

  2. #2
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    I know nothing about MFC but it seems that you are specifying the identifier of the edit box in two places...
    "The Internet treats censorship as damage and routes around it." - John Gilmore

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DirectX | Drawing text
    By gavra in forum Game Programming
    Replies: 4
    Last Post: 06-08-2009, 12:23 AM
  2. Replies: 3
    Last Post: 05-25-2005, 01:50 PM
  3. Accessing a Specific Text Line Inside CEditView :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 04-14-2002, 08:12 PM
  4. How do you add colour to the text in DOS?
    By techie in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 10-19-2001, 11:55 AM
  5. add text to file
    By goodmonkie in forum Windows Programming
    Replies: 3
    Last Post: 10-06-2001, 08:42 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21