Click here to Skip to main content
15,922,584 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Restarting Windows Pin
Hamid_RT28-Oct-07 19:09
Hamid_RT28-Oct-07 19:09 
GeneralRe: Restarting Windows Pin
RomTibi29-Oct-07 6:27
RomTibi29-Oct-07 6:27 
GeneralRe: Restarting Windows Pin
Hamid_RT29-Oct-07 7:21
Hamid_RT29-Oct-07 7:21 
GeneralRe: Restarting Windows Pin
ThatsAlok30-Oct-07 1:57
ThatsAlok30-Oct-07 1:57 
GeneralRe: Restarting Windows Pin
RomTibi30-Oct-07 9:00
RomTibi30-Oct-07 9:00 
QuestionNeed help with console character interface Pin
jp-mocs28-Oct-07 9:20
jp-mocs28-Oct-07 9:20 
QuestionReading excel worksheet from clipboard Pin
Andy H28-Oct-07 6:37
Andy H28-Oct-07 6:37 
QuestionUnreacheable subitem prepaint stage. Pin
paper6728-Oct-07 5:36
paper6728-Oct-07 5:36 
Hi,

I have a CListCtrl derived class, where I want control over the subitem painting. The control is in report mode with some subitems. The insertion of items seems to work but nothing appears in the control since I draw all the subitems myself. I figured out that the subitem prepaint stage is never called. The item prepaint stage on the other hand gets called.
What could could be the reason for this problem ?

void CXListCtrl::OnCustomDraw(NMHDR *pNMHDR, LRESULT *pResult)
{
NMLVCUSTOMDRAW *pLVCD = reinterpret_cast<nmlvcustomdraw *="">(pNMHDR);

// Take the default processing unless we set this to something else below.
*pResult = CDRF_DODEFAULT;

// First thing - check the draw stage. If it's the control's prepaint
// stage, then tell Windows we want messages for every item.
if (pLVCD->nmcd.dwDrawStage == CDDS_PREPAINT)
*pResult = CDRF_NOTIFYITEMDRAW;
else
{
if (pLVCD->nmcd.dwDrawStage == CDDS_ITEMPREPAINT)
// This is the notification message for an item. We'll request
// notifications before each subitem's prepaint stage.
*pResult = CDRF_NOTIFYSUBITEMDRAW;
else
{
// ***** This block of code gets never called. *****

if (pLVCD->nmcd.dwDrawStage == (CDDS_ITEMPREPAINT | CDDS_SUBITEM))
{
// This is the prepaint stage for a subitem.
:
:
}
}
}
}

tia
QuestionHow to recored and play mp3 files Pin
Mohsen Saad28-Oct-07 0:26
Mohsen Saad28-Oct-07 0:26 
AnswerRe: How to recored and play mp3 files Pin
Mark Salsbery28-Oct-07 7:39
Mark Salsbery28-Oct-07 7:39 
AnswerRe: How to recored and play mp3 files Pin
Hamid_RT28-Oct-07 19:12
Hamid_RT28-Oct-07 19:12 
QuestionPadRight Pin
teejayem27-Oct-07 11:39
teejayem27-Oct-07 11:39 
AnswerRe: PadRight Pin
Mark Salsbery27-Oct-07 12:29
Mark Salsbery27-Oct-07 12:29 
GeneralRe: PadRight Pin
teejayem27-Oct-07 15:21
teejayem27-Oct-07 15:21 
GeneralRe: PadRight Pin
Mark Salsbery28-Oct-07 7:18
Mark Salsbery28-Oct-07 7:18 
GeneralRe: PadRight Pin
teejayem28-Oct-07 7:44
teejayem28-Oct-07 7:44 
GeneralRe: PadRight Pin
Mark Salsbery28-Oct-07 7:48
Mark Salsbery28-Oct-07 7:48 
GeneralRe: PadRight Pin
teejayem28-Oct-07 9:46
teejayem28-Oct-07 9:46 
GeneralRe: PadRight Pin
Mattias G28-Oct-07 10:37
Mattias G28-Oct-07 10:37 
GeneralRe: PadRight Pin
teejayem28-Oct-07 12:51
teejayem28-Oct-07 12:51 
GeneralRe: PadRight Pin
Mark Salsbery29-Oct-07 5:50
Mark Salsbery29-Oct-07 5:50 
GeneralRe: PadRight Pin
teejayem29-Oct-07 7:53
teejayem29-Oct-07 7:53 
GeneralRe: PadRight Pin
Mark Salsbery29-Oct-07 8:07
Mark Salsbery29-Oct-07 8:07 
GeneralRe: PadRight Pin
teejayem29-Oct-07 8:17
teejayem29-Oct-07 8:17 
GeneralRe: PadRight Pin
Mark Salsbery29-Oct-07 8:23
Mark Salsbery29-Oct-07 8:23 

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.