Using windows.h, remove text from chat box upon mouse click (C++)
<p>Sorry, title was a bit vague.</p>

<p>Basically, I am making a chat program in C++ and using windows.h API. I have most of the program working, just small things are not working correctly. I have a box that a user types what they wish to say in, and in that box it says "Enter text here" in italics. I want to set it so that when the user clicks in that box, those words disappear and the user can freely type. As it is set now, if they click within the box it goes to the end of the word "here" and they must manually delete the words.</p>

<p>Is there a simple way to do this? Possibly when creating the box or text? Or must I add logic of my own in order to accomplish this?</p>

<p>Attached is the code where I create both the box, and where I set the font:</p>

<p>Box:</p>

<pre><code>hwSendEdit = CreateWindowEx(WS_EX_CLIENTEDGE, "Edit", "Enter Text Here", 
WS_CHILD|WS_VISIBLE, 2, 215, 790, 22, hwMain, 0, hInst, 0);
</code></pre>

<p>Font:</p>

<pre><code>chFont = CreateFont(12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Tahoma");
SendMessage(hwSendEdit, WM_SETFONT, reinterpret_cast&lt;WPARAM&gt;(chFont), 0);
</code></pre>

<p>Thank you for any help you can provide.</p>
