title: How to underline text in MFC C++
body: <p>I am new to C++ so forgive me if this question is too general.....
  I am using VS2010 to create a simple MFC text editor in C++. At the moment I am trying to get the following basic functionality up and running: a toolbar that has an underline button that underlines the selected text when you click it.</p>
  
  <p>I have scoured the internet for a solution but have only come up with the following:</p>
  
  <p><a href="http://aclacl.brinkster.net/MFC/ch12e.htm" rel="nofollow">http://aclacl.brinkster.net/MFC/ch12e.htm</a></p>
  
  <p>however either this code is incomplete or I can't figure out how they link the actual button to the command handlers(or whatever they call the code that executes the actual underlining).</p>
  
  <p>Can someone kindly:</p>
  
  <p>a) clarify where the underline button is found in StyleBar.cpp</p>
  
  <p>OR</p>
  
  <p>b) point me in the direction of a better solution if one exists.</p>
  
  <p>Much Thanks.</p>