Click here to Skip to main content
15,889,507 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCall Invoke() fails [modified] Pin
yaxiya28-Jun-11 16:29
yaxiya28-Jun-11 16:29 
AnswerRe: Call Invoke() fails Pin
David Crow28-Jun-11 16:53
David Crow28-Jun-11 16:53 
GeneralRe: Call Invoke() fails Pin
yaxiya28-Jun-11 17:05
yaxiya28-Jun-11 17:05 
QuestionCButton::DrawItem not called when owner dialog is "Restored" Pin
Albert Holguin28-Jun-11 9:24
professionalAlbert Holguin28-Jun-11 9:24 
AnswerRe: CButton::DrawItem not called when owner dialog is "Restored" Pin
Code-o-mat28-Jun-11 22:12
Code-o-mat28-Jun-11 22:12 
GeneralRe: CButton::DrawItem not called when owner dialog is "Restored" Pin
Albert Holguin29-Jun-11 7:51
professionalAlbert Holguin29-Jun-11 7:51 
GeneralRe: CButton::DrawItem not called when owner dialog is "Restored" Pin
Albert Holguin29-Jun-11 7:52
professionalAlbert Holguin29-Jun-11 7:52 
GeneralRe: CButton::DrawItem not called when owner dialog is "Restored" Pin
Code-o-mat29-Jun-11 7:56
Code-o-mat29-Jun-11 7:56 
QuestionREAD or WRITE .XLS File Pin
svkhadilkar28-Jun-11 6:01
svkhadilkar28-Jun-11 6:01 
AnswerRe: READ or WRITE .XLS File Pin
Richard MacCutchan28-Jun-11 6:55
mveRichard MacCutchan28-Jun-11 6:55 
Questionmissing zero in ostringstream format [modified] Pin
ed welch28-Jun-11 3:58
ed welch28-Jun-11 3:58 
AnswerRe: missing zero in ostringstream format Pin
enhzflep28-Jun-11 5:24
enhzflep28-Jun-11 5:24 
GeneralRe: missing zero in ostringstream format Pin
ed welch28-Jun-11 5:31
ed welch28-Jun-11 5:31 
GeneralRe: missing zero in ostringstream format Pin
enhzflep28-Jun-11 5:56
enhzflep28-Jun-11 5:56 
Question_atoi64 in VS10 Pin
gomathylakshmanan28-Jun-11 3:43
gomathylakshmanan28-Jun-11 3:43 
AnswerRe: _atoi64 in VS10 PinPopular
Chuck O'Toole28-Jun-11 5:21
Chuck O'Toole28-Jun-11 5:21 
QuestionON_NOTIFY_REFLECT_EX called twice Pin
_Flaviu27-Jun-11 22:06
_Flaviu27-Jun-11 22:06 
QuestionRe: ON_NOTIFY_REFLECT_EX called twice Pin
David Crow28-Jun-11 3:27
David Crow28-Jun-11 3:27 
GeneralRe: ON_NOTIFY_REFLECT_EX called twice Pin
_Flaviu28-Jun-11 4:40
_Flaviu28-Jun-11 4:40 
GeneralRe: ON_NOTIFY_REFLECT_EX called twice Pin
enhzflep28-Jun-11 5:04
enhzflep28-Jun-11 5:04 
GeneralRe: ON_NOTIFY_REFLECT_EX called twice Pin
_Flaviu28-Jun-11 8:06
_Flaviu28-Jun-11 8:06 
GeneralRe: ON_NOTIFY_REFLECT_EX called twice Pin
enhzflep28-Jun-11 9:12
enhzflep28-Jun-11 9:12 
That's okay, I forget who first directed me towards that tool. It sure was helpful when I was busy trying to hack through win32 coding all that time ago.


I've just tried to compile that program in debug mode, however am presented with this "do not pass go" message:

1>c:\users\enhzflep\documents\code\test2\my3view.cpp(30): error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall CMy3View::* )(NMHDR *,LRESULT *)' to 'BOOL (__thiscall CCmdTarget::* )(NMHDR *,LRESULT *)'

Which perhaps unsurprisingly points to the below code:
BEGIN_MESSAGE_MAP(CMy3View, CListView)
	//{{AFX_MSG_MAP(CMy3View)
	ON_NOTIFY_REFLECT_EX(LVN_COLUMNCLICK, OnColumnclick) /* This is the offending line */
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


Tried it with VS2010.


Upon digging deeper, I came across this page[^] at msdn, that seems to indicate that your function OnColumnClick should have a return-type of BOOL


Hmmmmmm - just tried editing the definition of the OnColumnClick function so that it has a return type of BOOL, instead of LRESULT - that worked!

Now, finally I can see where you're coming from. Rather than the pair of messages I was seeing in my app, I can see that your app is generating 2 pairs of messages. It seems that the messages are being sent from two different controls WTF | :WTF:

Each click on a column header is giving me (amongst other messages) this:
<00323> 015A080C S WM_NOTIFY idCtrl:59680 pnmh:0040E220
<00324> 015A080C R WM_NOTIFY
<00325> 015A080C S WM_NOTIFY idCtrl: 0 pnmh:0040F96C
<00326> 015A080C R WM_NOTIFY

Perhaps an investigation into what these two controls are is in order..Unsure | :~

Perhaps one of these may help?
(1)[^]
(2)[^] (In german, use Google translate - for some reason had trouble pasting the url of the translated page)
GeneralRe: ON_NOTIFY_REFLECT_EX called twice Pin
David Crow28-Jun-11 16:57
David Crow28-Jun-11 16:57 
GeneralRe: ON_NOTIFY_REFLECT_EX called twice Pin
enhzflep28-Jun-11 21:19
enhzflep28-Jun-11 21:19 
QuestionHow to get clsid from GUID of a class Pin
gtag27-Jun-11 21:21
gtag27-Jun-11 21:21 

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.