Click here to Skip to main content
13,042,329 members (96,011 online)

Comments by OlegKrivtsov (Top 6 by date)

zexspectrum 22-Jul-11 23:45pm View
To get a selected item in the right-click handler, I would call HitTest() method of the list control. For example, like this:

// Get cursor pos
CRect ptCursor;
// Hit test
LVHITTESTINFO hti; = ptCursor;

then I would determine the item from hti.
zexspectrum 16-Jul-11 2:26am View
I voted 2, because you didn't answer my question. If this is not a waste of time, than how to do this correctly? If you have ever worked with WTL, you should know that all window messages are handled inside of CCalculatorDlg class, not in another class. To handle messages in CCalculatorController class I should do a lot of work to redirect messages to that class, and I must know what's the advantage of doing this? I don't see for now..
zexspectrum 15-Jul-11 6:07am View
Thanks for your explanation, but it still unclear for me.

"The events of the window should be implemented in Controller"
Should I write another class, say CCalculatorController? But if I write it, this is waste of time, because it is easier to handle events in CCalculatorDlg class with built-in message map.
zexspectrum 30-Jun-11 21:20pm View
Btw, will my commercial videos be considered as a source code of my site?
zexspectrum 21-Jun-11 21:19pm View
Packing options are defined by #pragma pack

For example, try to add this line before your class:

#pragma pack(1)

.. and the following line after the class declaration:

#pragma pack()
zexspectrum 16-Jun-11 7:15am View
Yes, Microsoft provides both ways: using vc_redist.exe or using DLLs+manifest file.

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid