Click here to Skip to main content
15,914,071 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralGetting HDN_ITEMDBLCLICK to work for ListCtrl Pin
Eldon Zacek4-Aug-04 21:51
Eldon Zacek4-Aug-04 21:51 
GeneralAdd encoding in xml file Pin
JensB4-Aug-04 21:31
JensB4-Aug-04 21:31 
QuestionHow to remove flickering of a window Pin
nnvidya4-Aug-04 21:09
nnvidya4-Aug-04 21:09 
AnswerRe: How to remove flickering of a window Pin
Antti Keskinen4-Aug-04 22:03
Antti Keskinen4-Aug-04 22:03 
AnswerRe: How to remove flickering of a window Pin
mickelliot5-Aug-04 5:58
mickelliot5-Aug-04 5:58 
Generalautomating CreateMsgService in MAPI Pin
kanetheterrible14-Aug-04 20:58
kanetheterrible14-Aug-04 20:58 
QuestionHow to communicate with Parallel Port Pin
Zeeshan Bilal4-Aug-04 19:53
Zeeshan Bilal4-Aug-04 19:53 
AnswerRe: How to communicate with Parallel Port Pin
Cohen6-Aug-04 0:35
Cohen6-Aug-04 0:35 
QuestionWhy do MS prefer to provide a new function, CWnd::CreateEx, rather than override CWnd::Create? Pin
bloggs19744-Aug-04 19:52
bloggs19744-Aug-04 19:52 
AnswerRe: Why do MS prefer to provide a new function, CWnd::CreateEx, rather than override CWnd::Create? Pin
Antti Keskinen4-Aug-04 22:12
Antti Keskinen4-Aug-04 22:12 
GeneralGetItemText returns bad CString & can't change subitem color in CustomDraw Pin
Mike Landis4-Aug-04 19:34
Mike Landis4-Aug-04 19:34 
GeneralRe: GetItemText returns bad CString & can't change subitem color in CustomDraw Pin
Tomasz Sowinski5-Aug-04 0:15
Tomasz Sowinski5-Aug-04 0:15 
GeneralRe: GetItemText returns bad CString & can't change subitem color in CustomDraw Pin
Mike Landis5-Aug-04 1:40
Mike Landis5-Aug-04 1:40 
GeneralRe: GetItemText returns bad CString & can't change subitem color in CustomDraw Pin
Tomasz Sowinski5-Aug-04 1:51
Tomasz Sowinski5-Aug-04 1:51 
GeneralRe: GetItemText returns bad CString & can't change subitem color in CustomDraw Pin
Mike Landis5-Aug-04 6:33
Mike Landis5-Aug-04 6:33 
GeneralRe: GetItemText returns bad CString & can't change subitem color in CustomDraw Pin
Tomasz Sowinski5-Aug-04 7:39
Tomasz Sowinski5-Aug-04 7:39 
GeneralRe: GetItemText returns bad CString & can't change subitem color in CustomDraw Pin
Mike Landis5-Aug-04 9:10
Mike Landis5-Aug-04 9:10 
GeneralRe: GetItemText returns bad CString & can't change subitem color in CustomDraw Pin
Tomasz Sowinski5-Aug-04 9:27
Tomasz Sowinski5-Aug-04 9:27 
GeneralRe: GetItemText returns bad CString & can't change subitem color in CustomDraw Pin
Mike Landis5-Aug-04 9:57
Mike Landis5-Aug-04 9:57 
GeneralRe: GetItemText returns bad CString & can't change subitem color in CustomDraw Pin
Tomasz Sowinski5-Aug-04 10:14
Tomasz Sowinski5-Aug-04 10:14 
Mike Landis wrote:
I am not sure what you're referring to regarding the controls. I build up dialogs by adding controls in the resource editor. I've been finding them by calling GetDlgItem(). It's been working for responding to other messages. I didn't think NM_CUSTOMDRAW worked differently.

Well, when your dialog is created, the controls are Win32 controls. More specifically, list control can be accessed as CListCtrl, but it's not CYourListCtrl unless you subclass it. This is usually by adding data member in ClassWizard (of course you can manually add CYourListCtrl as data member and insert DDX_Control call in DoDataExchange -- or use SubclassDlgItem in OnInitDialog).


Mike Landis wrote:
On Pooling - all I know is that there is a data longevity requirement which Blazczak's AddPool solves

Ok, I see what you mean. This is indeed fragile approach which can fail when you call GetItemText in custom draw handler.

I vaguely remember copying text (using strncpy) straight into item.pszText in some list control. But this was on Win32, not CE. You may try that approach - pszText may point to internal buffer when you're receiving LVN_GETDISPINFO.

Tomasz Sowinski -- http://www.shooltz.com

*** Purgamentum init, exit purgamentum ***

GeneralRe: GetItemText returns bad CString & can't change subitem color in CustomDraw Pin
Mike Landis5-Aug-04 10:49
Mike Landis5-Aug-04 10:49 
GeneralRe: GetItemText returns bad CString & can't change subitem color in CustomDraw Pin
Tomasz Sowinski5-Aug-04 11:03
Tomasz Sowinski5-Aug-04 11:03 
GeneralRe: GetItemText returns bad CString & can't change subitem color in CustomDraw Pin
Tomasz Sowinski6-Aug-04 1:17
Tomasz Sowinski6-Aug-04 1:17 
GeneralRe: GetItemText returns bad CString & can't change subitem color in CustomDraw Pin
Tomasz Sowinski5-Aug-04 2:18
Tomasz Sowinski5-Aug-04 2:18 
Generalthread stack overflow problem.. Pin
TssPrasad4-Aug-04 17:47
sussTssPrasad4-Aug-04 17:47 

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.