Click here to Skip to main content

Comments by OlegKrivtsov (Top 6 by date)

zexspectrum at 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;
GetCursorPos(&ptCursor);
// Hit test
LVHITTESTINFO hti;
hti.pt = ptCursor;
m_list.HitTest(&hti);
 
then I would determine the item from hti.
zexspectrum at 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 at 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 at 30-Jun-11 21:20pm View
   
Btw, will my commercial videos be considered as a source code of my site?
zexspectrum at 21-Jun-11 21:19pm View
   
Packing options are defined by #pragma pack
 
http://msdn.microsoft.com/en-us/library/2e70t5y1(v=vs.80).aspx
 
For example, try to add this line before your class:
 
#pragma pack(1)
 
.. and the following line after the class declaration:
 
#pragma pack()
zexspectrum at 16-Jun-11 7:15am View
   
Deleted
Yes, Microsoft provides both ways: using vc_redist.exe or using DLLs+manifest file.

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