15,885,914 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by OlegKrivtsov (Top 6 by date)
OlegKrivtsov
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.
OlegKrivtsov
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..
OlegKrivtsov
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.
OlegKrivtsov
30-Jun-11 21:20pm
View
Btw, will my commercial videos be considered as a source code of my site?
OlegKrivtsov
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()
OlegKrivtsov
16-Jun-11 7:15am
View
Deleted
Yes, Microsoft provides both ways: using vc_redist.exe or using DLLs+manifest file.
Show More