CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    3

    Can anyone help with "Insert" Menu Item code?



    I am trying to put frequently used text on an "insert" menu item in a Notepad clone. My attempts are failing miserably! I can get the menu items activated as commands but the text won't appear on screen at the cursor position. Thanks so much for your time! (Smile, it's just programming...)

  2. #2
    Join Date
    Apr 1999
    Posts
    24

    Re: Can anyone help with "Insert" Menu Item code?



    What are you using as the editor for your notepad clone?


    Assuming you are using a CEdit control, try placing the following code in the command handler for a given menu item:


    m_ctlEdit.ReplaceSel("Text to insert",TRUE);




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured