Hi,
I created this code for opening pixels but it doesn't work.
void CPCPlayerDlg::OnPaint()
{
unsigned short int index = 0;
unsigned long int x = 0;
unsigned long int y = 0;
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
// PC Player Pixels
while(index != 400)
{
SetPixel(dc, x, y, RGB(red[index], green[index], blue[index]));
}
}
else
{
CDialog::OnPaint();
}
} ThanQ, ;-)
JVFF (Janito Vaqueiro Ferreira Filho)
I created this code for opening pixels but it doesn't work.
void CPCPlayerDlg::OnPaint()
{
unsigned short int index = 0;
unsigned long int x = 0;
unsigned long int y = 0;
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
// PC Player Pixels
while(index != 400)
{
SetPixel(dc, x, y, RGB(red[index], green[index], blue[index]));
}
}
else
{
CDialog::OnPaint();
}
} ThanQ, ;-)
JVFF (Janito Vaqueiro Ferreira Filho)