﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Релиб / Программирование / C++  / Need help(MFC) / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Релиб</description><link>http://www.relib.com/forums/</link><webMaster>robot@relib.com</webMaster><lastBuildDate>Wed, 03 Dec 2008 10:38:36 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Need help(MFC)</title><link>http://www.relib.com/forums/Topic907830-7-1.aspx</link><description>Ну, прежде всего следует убедиться, что картинки туда успешно добавляются... Добавлются?&lt;/P&gt;&lt;P&gt;Во-вторых, не вылезает ли m_state (который, кстати, в приведенном коде нигде не инициализируется) за пределы допустимых значений (от 0 до n - 1, где n - число картинок в CImageList).</description><pubDate>Tue, 28 Nov 2006 20:05:37 GMT</pubDate><dc:creator>Messir</dc:creator></item><item><title>RE: Need help(MFC)</title><link>http://www.relib.com/forums/Topic907830-7-1.aspx</link><description>Хмм... что никто не знает ?&lt;P&gt;Скажите тогда пожалуйста что может вызвать возвращение функцией CImageList::Draw  нуля?</description><pubDate>Tue, 28 Nov 2006 11:34:38 GMT</pubDate><dc:creator>goldseeker</dc:creator></item><item><title>RE: Need help(MFC)</title><link>http://www.relib.com/forums/Topic907830-7-1.aspx</link><description>А вот так создавался ImageLIst&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;list-&amp;gt;Create(50, 50, ILC_COLOR16, 0, 3);&lt;/P&gt;&lt;P&gt;bitmap.LoadBitmap(MAKEINTRESOURCE(J_P_1));&lt;/P&gt;&lt;P&gt;list-&amp;gt;Add(&amp;amp;bitmap,RGB(0,0,0));&lt;/P&gt;&lt;P&gt;list-&amp;gt;Add(&amp;amp;bitmap,RGB(0,0,0));&lt;/P&gt;&lt;P&gt;[/code]</description><pubDate>Wed, 22 Nov 2006 13:40:16 GMT</pubDate><dc:creator>goldseeker</dc:creator></item><item><title>RE: Need help(MFC)</title><link>http://www.relib.com/forums/Topic907830-7-1.aspx</link><description>CPultCtrl наследуется от CWnd,&lt;/P&gt;&lt;P&gt;Функция Draw возвращает ноль, т.е не выполняется.&lt;/P&gt;&lt;P&gt;Я прав что CImageList::Draw() рисует в координатах CDC? тогда координаты верны...</description><pubDate>Wed, 22 Nov 2006 13:32:43 GMT</pubDate><dc:creator>goldseeker</dc:creator></item><item><title>RE: Need help(MFC)</title><link>http://www.relib.com/forums/Topic907830-7-1.aspx</link><description>от кого наследуешь CPultCtrl?&lt;br&gt;&lt;br&gt;проверь, в каких координатах работаешь, возможно нужен перевод в локальную систему координат (или наоборот)&lt;br&gt;&lt;br&gt;С уважением,&lt;br&gt;Владимир</description><pubDate>Wed, 22 Nov 2006 13:30:33 GMT</pubDate><dc:creator>boombastik</dc:creator></item><item><title>Need help(MFC)</title><link>http://www.relib.com/forums/Topic907830-7-1.aspx</link><description>отказывается рисовать,вот код&lt;P&gt;[code]&lt;/P&gt;&lt;FONT color=#0000ff&gt;&lt;P&gt;void&lt;/FONT&gt;&lt;FONT color=#000000&gt; CPultCtrl::OnPaint() &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;CWnd::OnPaint();&lt;/P&gt;&lt;P&gt;CPaintDC dc(&lt;FONT color=#0000ff&gt;this&lt;/FONT&gt;);&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;unsigned&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;int&lt;/FONT&gt; i = 0;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;for&lt;/FONT&gt;(;i &amp;lt; m_buttons.size(); i++)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;m_buttons[i].Draw(&amp;amp;dc);&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;void&lt;/FONT&gt;&lt;FONT color=#000000&gt; Button::Draw(CDC *pDC)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;CPoint point(m_rect.left, m_rect.top);&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;bool&lt;/FONT&gt; b = m_ImageList-&amp;gt;Draw(pDC, m_state,point,ILD_NORMAL); &lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;помогите разобраться плз.</description><pubDate>Wed, 22 Nov 2006 13:14:07 GMT</pubDate><dc:creator>goldseeker</dc:creator></item></channel></rss>