Click here to Skip to main content
15,905,558 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to add data to a grid [modified] Pin
engilela12-Apr-07 21:20
engilela12-Apr-07 21:20 
QuestionLinker Error Pin
Programm3r12-Apr-07 19:59
Programm3r12-Apr-07 19:59 
AnswerRe: Linker Error Pin
Programm3r12-Apr-07 20:02
Programm3r12-Apr-07 20:02 
AnswerRe: Linker Error Pin
Arman S.12-Apr-07 20:06
Arman S.12-Apr-07 20:06 
GeneralRe: Linker Error Pin
Programm3r12-Apr-07 20:13
Programm3r12-Apr-07 20:13 
Questionsplit file by play length Pin
anu jaggi12-Apr-07 18:59
anu jaggi12-Apr-07 18:59 
AnswerRe: split file by play length Pin
Arman S.12-Apr-07 20:23
Arman S.12-Apr-07 20:23 
Questionicon disappears in win 2k Pin
ghunzel0612-Apr-07 17:25
ghunzel0612-Apr-07 17:25 
hi! i've made a custom control button. the problem is when i click the button, the icon "disappears". when i switch to other window and back again to my app, the icon is displayed again. i think it doesnt repaint properly. here's my code in OnPaint(): It only happens in Windows 2000, not in Win XP

void CIconBitmapButton::OnPaint()
{

__super::OnPaint();


CDC* pDC = this->GetDC();

SendMessage(WM_ICONERASEBKGND, (WPARAM) pDC->GetSafeHdc(), 0);

RECT canvasArea;
GetClientRect(&canvasArea);

int iconX = 0;
int iconY = 0;

ICONINFO iconInfo;
GetIconInfo(this->m_hIcon, &iconInfo);

HDC hDC = pDC->m_hDC;

CBitmap* iconBitmap = CBitmap::FromHandle(iconInfo.hbmColor);
CBitmap* maskBitmap = CBitmap::FromHandle(iconInfo.hbmMask);

BITMAP iconSize;
iconBitmap->GetBitmap(&iconSize);

iconX = iconSize.bmWidth;
iconY = iconSize.bmHeight;

// NOTE: icon must be drawn with these coordinates
int buttonX = canvasArea.right/2 - iconX/2;
int buttonY = canvasArea.bottom/2 - iconY/2;

pDC->DrawIconEx(buttonX, buttonY, this->m_hIcon,0,0,0,brush, DI_IMAGE);


// if (m_stretch)

ReleaseDC(pDC);
DeleteDC(hDC);
iconBitmap->DeleteObject();
maskBitmap->DeleteObject();

// if (this->m_hIcon)

}
AnswerRe: icon disappears in win 2k Pin
Arman S.12-Apr-07 20:18
Arman S.12-Apr-07 20:18 
QuestionDevice List Pin
Xarzu12-Apr-07 16:11
Xarzu12-Apr-07 16:11 
AnswerRe: Device List Pin
bob1697212-Apr-07 16:27
bob1697212-Apr-07 16:27 
Questionfile input help Pin
Ackmm712-Apr-07 16:08
Ackmm712-Apr-07 16:08 
AnswerRe: file input help Pin
CPallini12-Apr-07 20:56
mveCPallini12-Apr-07 20:56 
QuestionAccessing CView from CDialog MFC??? Pin
bimgot12-Apr-07 15:24
bimgot12-Apr-07 15:24 
AnswerRe: Accessing CView from CDialog MFC??? Pin
bob1697212-Apr-07 16:44
bob1697212-Apr-07 16:44 
GeneralRe: Accessing CView from CDialog MFC??? Pin
ksrameshkanth12-Apr-07 19:35
ksrameshkanth12-Apr-07 19:35 
GeneralRe: Accessing CView from CDialog MFC??? Pin
bimgot13-Apr-07 2:30
bimgot13-Apr-07 2:30 
GeneralRe: Accessing CView from CDialog MFC??? Pin
JudyL_MD13-Apr-07 2:46
JudyL_MD13-Apr-07 2:46 
GeneralRe: Accessing CView from CDialog MFC??? Pin
bob1697213-Apr-07 3:22
bob1697213-Apr-07 3:22 
GeneralRe: Accessing CView from CDialog MFC??? Pin
bimgot15-Apr-07 13:17
bimgot15-Apr-07 13:17 
QuestionCorrect way to remove old unused symbol? Pin
maxmaven12-Apr-07 11:23
maxmaven12-Apr-07 11:23 
AnswerRe: Correct way to remove old unused symbol? Pin
Ravi Bhavnani12-Apr-07 11:34
professionalRavi Bhavnani12-Apr-07 11:34 
GeneralRe: Correct way to remove old unused symbol? Pin
dburns12-Apr-07 17:10
dburns12-Apr-07 17:10 
QuestionDouble linked list is overwriting string items Pin
Yustme12-Apr-07 10:38
Yustme12-Apr-07 10:38 
AnswerRe: Double linked list is overwriting string items Pin
cp987612-Apr-07 14:15
cp987612-Apr-07 14:15 

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.