<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74628&amp;view=findpost&amp;p=532176</guid>
        <pubDate>Fri, 03 Dec 2004 23:41:17 +0000</pubDate>
        <title>WM_CTLCOLOREDIT и фон едита?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74628&amp;view=findpost&amp;p=532176</link>
        <description><![CDATA[.alex: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>Fester, 3.12.04, 21:25, 532005</span><div class='quote '>так в чем же собака порылась?  </div></div><br>
MSDN, как ..., прочитай и сделай наоборот ;)<br>
Написанно:<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>MSDN</span><div class='quote '><br>
WM_CTLCOLOREDIT<br>
...<br>
If a dialog box procedure handles this message, it should cast the desired return value to a BOOL and return the value directly. If the dialog box procedure returns FALSE, then default message handling is performed. The DWL_MSGRESULT value set by the SetWindowLong function is ignored.<br>
</div></div><br>
Сделеал через SetWindowLong(..., DWL_MSGRESULT, кисть) - всё заработало&#33;<br>
ЗЫ. может к eVS 3.0 мсдн наспех клепали, вот и ошибочка вышла? А то очепяток я там кучу видел...]]></description>
        <author>.alex</author>
        <category>Windows CE/Mobile/Phone</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74628&amp;view=findpost&amp;p=532005</guid>
        <pubDate>Fri, 03 Dec 2004 18:25:31 +0000</pubDate>
        <title>WM_CTLCOLOREDIT и фон едита?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74628&amp;view=findpost&amp;p=532005</link>
        <description><![CDATA[Fester: так в чем же собака порылась? :)]]></description>
        <author>Fester</author>
        <category>Windows CE/Mobile/Phone</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74628&amp;view=findpost&amp;p=531704</guid>
        <pubDate>Fri, 03 Dec 2004 13:37:12 +0000</pubDate>
        <title>WM_CTLCOLOREDIT и фон едита?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74628&amp;view=findpost&amp;p=531704</link>
        <description><![CDATA[.alex: Все тема закрыта&#33;<br>ЗЫ. и MSDN порой гонит&#33; ;)]]></description>
        <author>.alex</author>
        <category>Windows CE/Mobile/Phone</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74628&amp;view=findpost&amp;p=531299</guid>
        <pubDate>Fri, 03 Dec 2004 08:00:54 +0000</pubDate>
        <title>WM_CTLCOLOREDIT и фон едита?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74628&amp;view=findpost&amp;p=531299</link>
        <description><![CDATA[.alex: Не, это не поможет. Блин, чё за ...? Какие-нибудь другие предложения есть?]]></description>
        <author>.alex</author>
        <category>Windows CE/Mobile/Phone</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74628&amp;view=findpost&amp;p=531205</guid>
        <pubDate>Fri, 03 Dec 2004 06:41:44 +0000</pubDate>
        <title>WM_CTLCOLOREDIT и фон едита?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74628&amp;view=findpost&amp;p=531205</link>
        <description><![CDATA[Fester: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>MSDN</span><div class='quote '>If a dialog box procedure handles this message, the dialog box procedure should cast the desired return value to a BOOL and return the value directly</div></div><br>
<br>
Может тогда надо сделать так:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">case WM_CTLCOLOREDIT:</div><div class="code_line">&nbsp;&nbsp; &nbsp;if((HWND)lParam == hEdit)</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SetTextColor((HDC)wParam, RGB(255, 0, 0));</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SetBkColor((HDC)wParam, RGB(0, 255, 0));</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return (BOOL)CreateSolidBrush(RGB(0, 0, 255)); // !!!!</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp;break;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>Fester</author>
        <category>Windows CE/Mobile/Phone</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74628&amp;view=findpost&amp;p=530906</guid>
        <pubDate>Thu, 02 Dec 2004 19:26:26 +0000</pubDate>
        <title>WM_CTLCOLOREDIT и фон едита?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74628&amp;view=findpost&amp;p=530906</link>
        <description><![CDATA[.alex: Дело в том, что я пишу без использования МФЦ, а это сообщение, на сколько я понял есть только в нём, так что же мне &quot;ловить&quot; в чистом АПИ?<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">case WM_CTLCOLOREDIT:</div><div class="code_line">&nbsp;&nbsp; &nbsp;if((HWND)lParam == hEdit)</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SetTextColor((HDC)wParam, RGB(255, 0, 0));</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SetBkColor((HDC)wParam, RGB(0, 255, 0));</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return (LRESULT)CreateSolidBrush(RGB(0, 0, 255));</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp;break;</div></ol></div></div></div></div><br>
Вот что интересно, после этого кода меняется цвет текста, цвет бэкграунда для текста, а фон едита остаётся стандартным&#33; Что я забыл?]]></description>
        <author>.alex</author>
        <category>Windows CE/Mobile/Phone</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74628&amp;view=findpost&amp;p=530207</guid>
        <pubDate>Thu, 02 Dec 2004 10:26:43 +0000</pubDate>
        <title>WM_CTLCOLOREDIT и фон едита?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74628&amp;view=findpost&amp;p=530207</link>
        <description><![CDATA[Fester: У меня работает...<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">HBRUSH CTestDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) </div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp; &nbsp;HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if (nCtlColor == CTLCOLOR_EDIT)</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;hbr = CreateSolidBrush (RGB (0, 255, 0));</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;return hbr;</div><div class="code_line">}</div></ol></div></div></div></div><br>
Обрабатываю сообщение <strong class='tag-b'>WM_CTLCOLOR</strong><br>
<br>
Кстати, про WM_CTLCOLOREDIT волшебнику ничего не известно.]]></description>
        <author>Fester</author>
        <category>Windows CE/Mobile/Phone</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74628&amp;view=findpost&amp;p=530171</guid>
        <pubDate>Thu, 02 Dec 2004 09:57:51 +0000</pubDate>
        <title>WM_CTLCOLOREDIT и фон едита?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74628&amp;view=findpost&amp;p=530171</link>
        <description><![CDATA[.alex: Не могу установить свой цвет фона едита, сообщение WM_CTLCOLOREDIT приходит, возвращаю хендл на кисть, но почему-то цвет остаётся стандартным?]]></description>
        <author>.alex</author>
        <category>Windows CE/Mobile/Phone</category>
      </item>
	
      </channel>
      </rss>
	