Click to See Complete Forum and Search --> : Can anyone help with "Insert" Menu Item code?


P. Wilson
April 1st, 1999, 01:05 AM
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...)

Dazza
April 1st, 1999, 02:47 AM
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);