Click here to Skip to main content
15,905,325 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Communication of CCheckListViewCtrl with parent CMainFrame Pin
Stuart Dootson10-Jun-07 8:27
professionalStuart Dootson10-Jun-07 8:27 
GeneralRe: Communication of CCheckListViewCtrl with parent CMainFrame Pin
Vlad011-Jun-07 8:20
Vlad011-Jun-07 8:20 
GeneralRe: Communication of CCheckListViewCtrl with parent CMainFrame Pin
Stuart Dootson11-Jun-07 8:40
professionalStuart Dootson11-Jun-07 8:40 
GeneralRe: Communication of CCheckListViewCtrl with parent CMainFrame Pin
Vlad012-Jun-07 8:20
Vlad012-Jun-07 8:20 
GeneralRe: Communication of CCheckListViewCtrl with parent CMainFrame Pin
Stuart Dootson12-Jun-07 8:57
professionalStuart Dootson12-Jun-07 8:57 
GeneralRe: Communication of CCheckListViewCtrl with parent CMainFrame [modified] Pin
Vlad013-Jun-07 5:13
Vlad013-Jun-07 5:13 
GeneralRe: Communication of CCheckListViewCtrl with parent CMainFrame Pin
Stuart Dootson12-Jun-07 11:17
professionalStuart Dootson12-Jun-07 11:17 
GeneralRe: Communication of CCheckListViewCtrl with parent CMainFrame [modified] Pin
Vlad013-Jun-07 5:58
Vlad013-Jun-07 5:58 
1. The immediate child windows of the splitter in my app
are 2 CPaneContainers (their function is just to show
text labels). ListView and RichEdit controls are childs
of these Pane containers. I think this is not essential
difference with Your sample. Except the eventual cases
when I will need the "real" parent of List View -- CMainFrame
and not CPaneContainer -- I should call GetParent() twice.

2. And what is very essential difference, surely responsible
for the bug in my app is that I choose wrong format
for notification handlers. I mimicked the definition
of the message handler for LVN_ITEMCHANGED:

NOTIFY_CODE_HANDLER_EX(LVN_ITEMCHANGED, OnLvnItemChanged)

Now I see from Your example that the correct format
for LVN_ODSTATECHANGED and LVN_GETDISPINFO
must use the macro NOTIFY_HANDLER(...) instead!

OK, now I'll rewrite my code in accord with Your sample code.
Hope this really would help.

Thank You very much in advance!

...Well I've modified my code. Really, my app now triggers
messages if shift+Mouse is clicked. But:

1) After several such clicks app crashes due to variety
of reasons. One of them is out of memory error.
These bugs probably can be fixed,
but this may take too much time;

2) Check boxes do not appear. If one or's the item state flag
with LVIF_IMAGE an empty place appears before messages instead of
checkboxes.

3) List view items info, set by ListView.InsertItem(i,text)
is ignored:
if one comments the line:

lstrcpy(getDispInfo->item.pszText, s);

in OnGetDispInfo() the texts of all items becomes empty.
This is not fatal, because I can set item texts
in OnGetDispInfo() calling InsertItem with empty text=L"";

4) Most important of all: there are no notifications
in case of ctrl+click as well as in case of simple clicks.
Using of LVN_ITEMCHANGED together with LVN_ODSTATECHANGED
does not resolve the problem of multiple LVN_ITEMCHANGED
events (see posts above), creating an additional mess.
By the way, even a single mouse click (with no shift or ctrl)
can clearly change the state of many items at once
creating multiple LVN_ITEMCHANGED events.

-- modified at 13:17 Wednesday 13th June, 2007
QuestionUsing fonction recv , dynamic buffer Pin
NorGUI8-Jun-07 4:23
NorGUI8-Jun-07 4:23 
AnswerRe: Using fonction recv , dynamic buffer Pin
Stuart Dootson8-Jun-07 11:08
professionalStuart Dootson8-Jun-07 11:08 
QuestionDereferencing a function pointer in std::map Pin
Cpt Rick8-Jun-07 2:37
Cpt Rick8-Jun-07 2:37 
AnswerRe: Dereferencing a function pointer in std::map [modified] Pin
Stuart Dootson8-Jun-07 2:57
professionalStuart Dootson8-Jun-07 2:57 
GeneralRe: Dereferencing a function pointer in std::map Pin
Cpt Rick8-Jun-07 3:16
Cpt Rick8-Jun-07 3:16 
Questionplease Its Urgent Pin
Banks K7-Jun-07 20:03
Banks K7-Jun-07 20:03 
AnswerRe: please Its Urgent Pin
Paul Conrad14-Jul-07 11:11
professionalPaul Conrad14-Jul-07 11:11 
QuestionWhy can not define _ATL_MIN_CRT in Service Project? Pin
samfromcn6-Jun-07 23:05
samfromcn6-Jun-07 23:05 
AnswerRe: Why can not define _ATL_MIN_CRT in Service Project? Pin
Stuart Dootson7-Jun-07 0:27
professionalStuart Dootson7-Jun-07 0:27 
Questionhow can an ATL get its own name in the container? Pin
Rex.xie6-Jun-07 3:14
Rex.xie6-Jun-07 3:14 
AnswerRe: how to get the instance name of an ATL shown in the container. Pin
Steve S7-Jun-07 2:36
Steve S7-Jun-07 2:36 
GeneralRe: how to get the instance name of an ATL shown in the container. Pin
Rex.xie7-Jun-07 16:47
Rex.xie7-Jun-07 16:47 
GeneralRe: how to get the instance name of an ATL shown in the container. Pin
Steve S11-Jun-07 21:22
Steve S11-Jun-07 21:22 
GeneralRe: how to get the instance name of an ATL shown in the container. Pin
Rex.xie11-Jun-07 21:30
Rex.xie11-Jun-07 21:30 
Questionhow to block print screen with C++ Pin
satish_abiram5-Jun-07 3:17
satish_abiram5-Jun-07 3:17 
AnswerRe: how to block print screen with C++ Pin
Fatbuddha 113-Jun-07 2:21
Fatbuddha 113-Jun-07 2:21 
AnswerRe: how to block print screen with C++ Pin
Paul Conrad14-Jul-07 11:11
professionalPaul Conrad14-Jul-07 11:11 

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.