Click here to Skip to main content
15,914,401 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: AVI Player Pin
Hamid_RT12-Nov-08 5:49
Hamid_RT12-Nov-08 5:49 
QuestionCRichEditCtrl Problem of displaying text as hyperlink Pin
Dhiraj kumar Saini10-Nov-08 22:40
Dhiraj kumar Saini10-Nov-08 22:40 
QuestionRe: CRichEditCtrl Problem of displaying text as hyperlink Pin
David Crow11-Nov-08 3:17
David Crow11-Nov-08 3:17 
QuestionExecuting Sort.exe using ShellExecute()... etc Pin
Mick Leong10-Nov-08 21:22
Mick Leong10-Nov-08 21:22 
QuestionRe: Executing Sort.exe using ShellExecute()... etc Pin
CPallini10-Nov-08 22:33
mveCPallini10-Nov-08 22:33 
AnswerRe: Executing Sort.exe using ShellExecute()... etc Pin
David Crow11-Nov-08 3:20
David Crow11-Nov-08 3:20 
Questionproblem creating a colored icon Pin
tudorbalan10-Nov-08 21:19
tudorbalan10-Nov-08 21:19 
AnswerRe: problem creating a colored icon [modified] Pin
Mark Salsbery11-Nov-08 6:56
Mark Salsbery11-Nov-08 6:56 
Your icon creation is all messed up.

Here's a snippet creating a 32bpp 16x16 icon, all bright red:
<code>// No reason to create an imagelist then attach it to a
//   CImageList object....just let CImageList do it</code>
m_cImageListSmall.Create(16, 16, ILC_COLOR32|ILC_MASK, 1, 1);

<code>// AND mask - monochrome -  determines which pixels get drawn</code>
BYTE AND[32];  <code>// 32 = 16 pixels * 16 pixels / 8 bitsperpixel pixelspermaskbyte *EDIT*</code>
for( int i=0; i<32; i++ )
{
    AND[i] = 0xFF;  // show all pixels
}

<code>// XOR mask - 32bpp ARGB -  determines the pixel values</code>
DWORD XOR[256];  <code>// 256 pixels = 16 * 16, DWORD for 32 bits per pixel</code>
for( int i=0; i<256; i++ )
{
    XOR[i] = 0xFFFF0000;  <code>// 0xAARRGGBB</code>
}

HICON icon = ::CreateIcon(NULL,16,16,<code>1,32</code>,AND,(BYTE*)XOR);  <code>// 1 plane, 32bits per pixel</code>

m_cImageListSmall.Add(icon);


Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

modified on Tuesday, November 11, 2008 1:05 PM

GeneralRe: problem creating a colored icon Pin
tudorbalan11-Nov-08 10:34
tudorbalan11-Nov-08 10:34 
GeneralRe: problem creating a colored icon Pin
Mark Salsbery11-Nov-08 11:28
Mark Salsbery11-Nov-08 11:28 
GeneralRe: problem creating a colored icon Pin
tudorbalan12-Nov-08 0:16
tudorbalan12-Nov-08 0:16 
GeneralRe: problem creating a colored icon Pin
Mark Salsbery12-Nov-08 6:58
Mark Salsbery12-Nov-08 6:58 
GeneralRe: problem creating a colored icon Pin
tudorbalan12-Nov-08 8:52
tudorbalan12-Nov-08 8:52 
GeneralRe: problem creating a colored icon Pin
Mark Salsbery12-Nov-08 8:58
Mark Salsbery12-Nov-08 8:58 
Questionproblem in retriving values from recordset Pin
tasumisra10-Nov-08 20:47
tasumisra10-Nov-08 20:47 
AnswerRe: problem in retriving values from recordset Pin
CPallini10-Nov-08 21:14
mveCPallini10-Nov-08 21:14 
GeneralRe: problem in retriving values from recordset Pin
tasumisra10-Nov-08 21:23
tasumisra10-Nov-08 21:23 
GeneralRe: problem in retriving values from recordset Pin
CPallini10-Nov-08 21:48
mveCPallini10-Nov-08 21:48 
QuestionText Color Change for CRichEditCtrl on a CMdiChildWnd Pin
prithaa10-Nov-08 20:44
prithaa10-Nov-08 20:44 
AnswerRe: Text Color Change for CRichEditCtrl on a CMdiChildWnd Pin
Dhiraj kumar Saini10-Nov-08 22:33
Dhiraj kumar Saini10-Nov-08 22:33 
GeneralRe: Text Color Change for CRichEditCtrl on a CMdiChildWnd Pin
prithaa11-Nov-08 1:10
prithaa11-Nov-08 1:10 
QuestionIs there any API for Data? Pin
Nandu_77b10-Nov-08 20:20
Nandu_77b10-Nov-08 20:20 
AnswerRe: Is there any API for Data? Pin
_AnsHUMAN_ 10-Nov-08 20:39
_AnsHUMAN_ 10-Nov-08 20:39 
GeneralRe: Is there any API for Data? Pin
kevinmengmsn10-Nov-08 22:10
kevinmengmsn10-Nov-08 22:10 
GeneralRe: Is there any API for Data? Pin
_AnsHUMAN_ 10-Nov-08 22:43
_AnsHUMAN_ 10-Nov-08 22:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.