Click here to Skip to main content
15,885,366 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Variable in flash memory - how to write? Pin
Jochen Arndt9-Dec-14 23:28
professionalJochen Arndt9-Dec-14 23:28 
GeneralRe: Variable in flash memory - how to write? Pin
elelont210-Dec-14 0:06
elelont210-Dec-14 0:06 
QuestionC/C++ files with "Ex" suffixes Pin
david211149-Dec-14 12:10
david211149-Dec-14 12:10 
AnswerRe: C/C++ files with "Ex" suffixes Pin
Garth J Lancaster9-Dec-14 13:25
professionalGarth J Lancaster9-Dec-14 13:25 
GeneralRe: C/C++ files with "Ex" suffixes Pin
David Crow9-Dec-14 16:49
David Crow9-Dec-14 16:49 
AnswerRe: C/C++ files with "Ex" suffixes Pin
«_Superman_»9-Dec-14 19:05
professional«_Superman_»9-Dec-14 19:05 
GeneralRe: C/C++ files with "Ex" suffixes Pin
david2111412-Dec-14 3:32
david2111412-Dec-14 3:32 
GeneralNM_CUSTOMDRAW in an ATL dialog based application Pin
aks.9-Dec-14 3:00
aks.9-Dec-14 3:00 
I have an ATL dialog based applications.
I have a custom list control derived from CListCtrl with message map
BEGIN_MESSAGE_MAP( MyListCtrl, CListCtrl )
ON_NOTIFY_REFLECT( NM_CUSTOMDRAW, &MyListCtrl::OnNMCustomDraw )
END_MESSAGE_MAP()
void MyListCtrl, ::OnNMCustomDraw( NMHDR *pNMHDR, LRESULT *pResult )
{
NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<nmlvcustomdraw*>( pNMHDR);

// Take the default processing
*pResult = CDRF_DODEFAULT;

if( CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage )
{
*pResult = CDRF_NOTIFYITEMDRAW;
}
else if( CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage )
{
int nRow = static_cast<int>(pLVCD->nmcd.dwItemSpec );
if( true == MyArray[nRow].bIsOlder )
{
pLVCD->clrText = RGB( 128, 128, 128 );
}
pResult = CDRF_DODEFAULT;
}
}
But I am not getting ant reflected message from the parent dialog.

I know that it can be done by using the REFLECT_NOTIFICATIONS() in the parent class. But I read that we have to derive the CListCtrl from CContained window. Is it the right way, if so what are things I have to take care.

Is there any better solution to resolve this issue?
aks

QuestionRe: NM_CUSTOMDRAW in an ATL dialog based application Pin
Richard MacCutchan9-Dec-14 6:03
mveRichard MacCutchan9-Dec-14 6:03 
QuestionA Chinese blog about integrating MS Detours Library and Mhook library Pin
Jamming18-Dec-14 15:11
Jamming18-Dec-14 15:11 
AnswerRe: A Chinese blog about integrating MS Detours Library and Mhook library Pin
Garth J Lancaster8-Dec-14 16:32
professionalGarth J Lancaster8-Dec-14 16:32 
GeneralRe: A Chinese blog about integrating MS Detours Library and Mhook library Pin
Jamming18-Dec-14 21:07
Jamming18-Dec-14 21:07 
AnswerRe: A Chinese blog about integrating MS Detours Library and Mhook library Pin
Richard MacCutchan8-Dec-14 22:04
mveRichard MacCutchan8-Dec-14 22:04 
GeneralRe: A Chinese blog about integrating MS Detours Library and Mhook library Pin
Jamming19-Dec-14 3:07
Jamming19-Dec-14 3:07 
QuestionIs there a way to move the right-most button of a CMFCToolbar to the right most position (of the rect) ? Pin
Maximilien8-Dec-14 4:38
Maximilien8-Dec-14 4:38 
AnswerRe: Is there a way to move the right-most button of a CMFCToolbar to the right most position (of the rect) ? Pin
Eugen Podsypalnikov12-Dec-14 1:28
Eugen Podsypalnikov12-Dec-14 1:28 
GeneralRe: Is there a way to move the right-most button of a CMFCToolbar to the right most position (of the rect) ? Pin
Maximilien12-Dec-14 3:20
Maximilien12-Dec-14 3:20 
QuestionMFC Grid Control does not show cells content Pin
georox6-Dec-14 2:37
georox6-Dec-14 2:37 
GeneralRe: MFC Grid Control does not show cells content Pin
SoMad6-Dec-14 14:53
professionalSoMad6-Dec-14 14:53 
QuestionPrint a long CString Pin
Gagnon Claude5-Dec-14 17:32
Gagnon Claude5-Dec-14 17:32 
AnswerRe: Print a long CString Pin
enhzflep5-Dec-14 20:26
enhzflep5-Dec-14 20:26 
AnswerRe: Print a long CString Pin
Richard MacCutchan5-Dec-14 22:18
mveRichard MacCutchan5-Dec-14 22:18 
Questionadd file version to a new text file Pin
henryh5-Dec-14 4:58
henryh5-Dec-14 4:58 
AnswerRe: add file version to a new text file Pin
den2k885-Dec-14 5:12
professionalden2k885-Dec-14 5:12 
GeneralRe: add file version to a new text file Pin
henryh5-Dec-14 5:26
henryh5-Dec-14 5:26 

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.