Click here to Skip to main content
16,013,489 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Edit control Pin
tom groezer11-Jun-07 6:08
tom groezer11-Jun-07 6:08 
QuestionRe: Edit control Pin
David Crow11-Jun-07 6:22
David Crow11-Jun-07 6:22 
AnswerRe: Edit control Pin
tom groezer11-Jun-07 8:29
tom groezer11-Jun-07 8:29 
GeneralRe: Edit control Pin
David Crow11-Jun-07 8:35
David Crow11-Jun-07 8:35 
GeneralRe: Edit control Pin
tom groezer11-Jun-07 21:04
tom groezer11-Jun-07 21:04 
QuestionRe: Edit control Pin
David Crow12-Jun-07 2:30
David Crow12-Jun-07 2:30 
QuestionFind Parent Dialog data in custom control on dialog? [modified] Pin
ldsdbomber11-Jun-07 4:00
ldsdbomber11-Jun-07 4:00 
AnswerRe: Find Parent Dialog data in custom control on dialog? Pin
ldsdbomber11-Jun-07 6:21
ldsdbomber11-Jun-07 6:21 
OK, this is what I am now trying in the function from the alternate shaded list view


void CColoredListCtrl::OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult)


...



////////////

LVITEM lvi;
memset(&lvi, 0, sizeof(lvi));

lvi.mask = LVIF_TEXT;
lvi.state = 0;
lvi.stateMask = 0;

unsigned char LVtext[16];
lvi.cchTextMax = 15;
// Length of string to be copied into pszText member

lvi.pszText = (LPTSTR)LVtext;
// String buffer for pszText member

// Nota bene : starts at zero (item) and ends at 'lCols' (last subitem) :
lvi.iSubItem = 5; // 6 columns in total, I assume that means 5 is the last one, also tried 4

// Retrieve the text in an item or a subitem of line 'i' :
mainDlg->SendMessage(LVM_GETITEMTEXT, (WPARAM) 0, (LPARAM) &lvi);

CString resultText(LVtext);
if(!strcmp((LPCSTR)LVtext, "Failed"))
{
do stuff...
}
///////////

it's never going into the do stuff bit. "Failed" is definitely being written/drawn in the listview report in the last column as per a SetItem call.


It would be easier if I could work out how to just get at data belonging to the dialog class itself that holds the listview control, but failing that, am not sure what I am doing wrong here.
GeneralRe: Find Parent Dialog data in custom control on dialog? Pin
Mark Salsbery11-Jun-07 6:54
Mark Salsbery11-Jun-07 6:54 
GeneralRe: Find Parent Dialog data in custom control on dialog? Pin
ldsdbomber11-Jun-07 21:27
ldsdbomber11-Jun-07 21:27 
GeneralRe: Find Parent Dialog data in custom control on dialog? Pin
Mark Salsbery12-Jun-07 6:31
Mark Salsbery12-Jun-07 6:31 
QuestionPassing parameters to Thread function. Pin
priyank_ldce11-Jun-07 3:33
priyank_ldce11-Jun-07 3:33 
AnswerRe: Passing parameters to Thread function. Pin
KarstenK11-Jun-07 3:47
mveKarstenK11-Jun-07 3:47 
AnswerRe: Passing parameters to Thread function. [modified] Pin
Mark Salsbery11-Jun-07 6:58
Mark Salsbery11-Jun-07 6:58 
AnswerRe: Passing parameters to Thread function. Pin
Mark Salsbery11-Jun-07 7:22
Mark Salsbery11-Jun-07 7:22 
AnswerRe: Passing parameters to Thread function. Pin
ThatsAlok11-Jun-07 20:03
ThatsAlok11-Jun-07 20:03 
QuestionQuick change of class of custom control? Pin
ldsdbomber11-Jun-07 3:26
ldsdbomber11-Jun-07 3:26 
AnswerRe: Quick change of class of custom control? Pin
ldsdbomber11-Jun-07 3:29
ldsdbomber11-Jun-07 3:29 
QuestionHow to detect modal loops in MFC Pin
Jörgen Sigvardsson11-Jun-07 3:21
Jörgen Sigvardsson11-Jun-07 3:21 
QuestionIOCP supports [modified] Pin
Jhony george11-Jun-07 3:05
Jhony george11-Jun-07 3:05 
AnswerRe: IOCP supports Pin
Matthew Faithfull11-Jun-07 3:28
Matthew Faithfull11-Jun-07 3:28 
GeneralRe: IOCP supports Pin
Jhony george11-Jun-07 19:40
Jhony george11-Jun-07 19:40 
QuestionConvert SYSTEMTIME to char * Pin
Programm3r11-Jun-07 2:45
Programm3r11-Jun-07 2:45 
AnswerRe: Convert SYSTEMTIME to char * Pin
Nibu babu thomas11-Jun-07 2:57
Nibu babu thomas11-Jun-07 2:57 
GeneralRe: Convert SYSTEMTIME to char * Pin
Programm3r11-Jun-07 3:23
Programm3r11-Jun-07 3: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.