Click here to Skip to main content
15,913,685 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Shell Icon not right? Pin
Anonymous29-Aug-04 20:57
Anonymous29-Aug-04 20:57 
GeneralDisable Window Resizing Pin
Anonymous29-Aug-04 17:23
Anonymous29-Aug-04 17:23 
GeneralRe: Disable Window Resizing Pin
Michael Dunn29-Aug-04 17:33
sitebuilderMichael Dunn29-Aug-04 17:33 
GeneralRe: Disable Window Resizing Pin
Anonymous29-Aug-04 21:48
Anonymous29-Aug-04 21:48 
GeneralMemDC !!! Pin
Andre Massada29-Aug-04 9:58
Andre Massada29-Aug-04 9:58 
GeneralRe: MemDC !!! Pin
PJ Arends29-Aug-04 10:30
professionalPJ Arends29-Aug-04 10:30 
GeneralRe: MemDC !!! Pin
Andre Massada29-Aug-04 10:45
Andre Massada29-Aug-04 10:45 
GeneralRe: MemDC !!! Pin
Andre Massada29-Aug-04 11:45
Andre Massada29-Aug-04 11:45 
I've tried it, but it tells me that ShowDC(memDC) is not defined, even if
i added the macro definition and the include line.
My OnPaint() looks like below. Is there anything worng with it ?

void CDecDlg::OnPaint()
{
if (IsIconic())
{
//CPaintDC dc(this); // device context for painting

CRect rect;
GetClientRect(&rect);
CPaintDC dc(this);
CRect rcClient;
GetClientRect(rcClient);
dc.SetMapMode(MM_HIENGLISH);
CMemDC pDC(&dc);

SendMessage(WM_ICONERASEBKGND, reinterpret_cast<wparam>(dc.GetSafeHdc()), 0);

// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;

// Draw the icon
pDC.DrawIcon(x, y, m_hIcon);
}
else
{
CTrayDialog::OnPaint();
}
//MovieWindowed.Repaint();
}

... well ?
GeneralRe: MemDC !!! Pin
PJ Arends29-Aug-04 13:03
professionalPJ Arends29-Aug-04 13:03 
GeneralRe: MemDC !!! Pin
Andre Massada29-Aug-04 20:39
Andre Massada29-Aug-04 20:39 
GeneralRe: MemDC !!! Pin
Andre Massada31-Aug-04 9:42
Andre Massada31-Aug-04 9:42 
GeneralRe: MemDC !!! Pin
KaЯl29-Aug-04 22:46
KaЯl29-Aug-04 22:46 
GeneralRe: MemDC !!! Pin
Andre Massada30-Aug-04 5:14
Andre Massada30-Aug-04 5:14 
GeneralRe: MemDC !!! Pin
KaЯl30-Aug-04 5:38
KaЯl30-Aug-04 5:38 
GeneralRe: MemDC !!! Pin
Andre Massada30-Aug-04 9:02
Andre Massada30-Aug-04 9:02 
GeneralRe: MemDC !!! Pin
KaЯl31-Aug-04 3:16
KaЯl31-Aug-04 3:16 
GeneralHaving trouble with arrays. Pin
nigma_x29-Aug-04 9:18
nigma_x29-Aug-04 9:18 
GeneralRe: Having trouble with arrays. Pin
PJ Arends29-Aug-04 9:34
professionalPJ Arends29-Aug-04 9:34 
GeneralRe: Having trouble with arrays. Pin
nigma_x30-Aug-04 3:54
nigma_x30-Aug-04 3:54 
GeneralRegistry question Pin
Andre Massada29-Aug-04 8:35
Andre Massada29-Aug-04 8:35 
GeneralRe: Registry question Pin
PJ Arends29-Aug-04 8:53
professionalPJ Arends29-Aug-04 8:53 
GeneralRe: Registry question Pin
Andre Massada29-Aug-04 9:53
Andre Massada29-Aug-04 9:53 
Generalsetting font size in wm_paint Pin
Tyrus18229-Aug-04 8:30
Tyrus18229-Aug-04 8:30 
GeneralRe: setting font size in wm_paint Pin
bneacetp29-Aug-04 9:02
bneacetp29-Aug-04 9:02 
GeneralRe: setting font size in wm_paint Pin
PJ Arends29-Aug-04 9:03
professionalPJ Arends29-Aug-04 9:03 

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.