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

C / C++ / MFC

 
GeneralRe: UnRegisterHotKey problem Pin
Niklas L11-Aug-10 20:58
Niklas L11-Aug-10 20:58 
AnswerRe: UnRegisterHotKey problem Pin
Luc Pattyn11-Aug-10 1:55
sitebuilderLuc Pattyn11-Aug-10 1:55 
GeneralRe: UnRegisterHotKey problem Pin
wikywin11-Aug-10 15:34
wikywin11-Aug-10 15:34 
GeneralRe: UnRegisterHotKey problem Pin
Luc Pattyn11-Aug-10 15:47
sitebuilderLuc Pattyn11-Aug-10 15:47 
QuestionAssigning multi valued string. Pin
T.RATHA KRISHNAN10-Aug-10 21:09
T.RATHA KRISHNAN10-Aug-10 21:09 
AnswerRe: Assigning multi valued string. Pin
Niklas L10-Aug-10 22:31
Niklas L10-Aug-10 22:31 
AnswerRe: Assigning multi valued string. Pin
Luc Pattyn11-Aug-10 1:58
sitebuilderLuc Pattyn11-Aug-10 1:58 
QuestionCan't use 'User-defined-Message' in APP class of dialog-based MFC application. Why? Pin
JongchanAhn10-Aug-10 18:01
JongchanAhn10-Aug-10 18:01 
I created a project with VS2008, dialog-based MFC.
What I want to do with that project is Sending 'User-defined-Message' in APP Class.

So I registered my own message in app class(xxxApp.h) like this:
#define USER_MESSAGE_2 (WM_USER+ 102)

And, in message map, I added ON_MESSAGE code in app class(xxxApp.cpp) like below:
BEGIN_MESSAGE_MAP(CwmUserApp, CWinAppEx)
ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
ON_MESSAGE( USER_MESSAGE_2, OnMyMessage1HandlerApp )
...
END_MESSAGE_MAP()

Also I wrote message handler like this:
LRESULT CwmUserApp::OnMyMessage1HandlerApp(WPARAM wParam, LPARAM lParam)
{
AfxMessageBox(_T("Is it working?"));
return 0;
}

I compiiled. Then one error came up:
error C2440: 'static_cast': 'LRESULT (__thiscall CwmUserApp::* )(WPARAM,LPARAM)'에서 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'(으)로 변환할 수 없습니다.

Sorry, it's korean. If I translate, it says
Can not convert from 'LRESULT (__thiscall CwmUserApp::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'

I am not that good with programming, but as much as I understand,
Does that say I simply cannot use 'User-defined-Message' in APP class?
'User-defined-Message' in dlg class or view class works fine with me though.

Thanks in advance Smile | :)

chan
AnswerRe: Can't use 'User-defined-Message' in APP class of dialog-based MFC application. Why? Pin
Cool_Dev10-Aug-10 18:20
Cool_Dev10-Aug-10 18:20 
GeneralRe: Can't use 'User-defined-Message' in APP class of dialog-based MFC application. Why? Pin
JongchanAhn10-Aug-10 18:50
JongchanAhn10-Aug-10 18:50 
GeneralRe: Can't use 'User-defined-Message' in APP class of dialog-based MFC application. Why? Pin
Cool_Dev10-Aug-10 18:59
Cool_Dev10-Aug-10 18:59 
AnswerRe: Can't use 'User-defined-Message' in APP class of dialog-based MFC application. Why? Pin
Aescleal10-Aug-10 19:38
Aescleal10-Aug-10 19:38 
GeneralRe: Can't use 'User-defined-Message' in APP class of dialog-based MFC application. Why? Pin
Cool_Dev10-Aug-10 19:57
Cool_Dev10-Aug-10 19:57 
GeneralRe: Can't use 'User-defined-Message' in APP class of dialog-based MFC application. Why? [modified] Pin
JongchanAhn10-Aug-10 21:43
JongchanAhn10-Aug-10 21:43 
GeneralRe: Can't use 'User-defined-Message' in APP class of dialog-based MFC application. Why? Pin
Cool_Dev11-Aug-10 0:57
Cool_Dev11-Aug-10 0:57 
AnswerRe: Can't use 'User-defined-Message' in APP class of dialog-based MFC application. Why? Pin
dilara semerci10-Aug-10 20:32
dilara semerci10-Aug-10 20:32 
QuestionHot key conflict with input in Game Pin
wikywin10-Aug-10 17:10
wikywin10-Aug-10 17:10 
AnswerRe: Hot key conflict with input in Game Pin
Cool_Dev10-Aug-10 20:22
Cool_Dev10-Aug-10 20:22 
GeneralRe: Hot key conflict with input in Game Pin
wikywin10-Aug-10 21:51
wikywin10-Aug-10 21:51 
QuestionUnicode text in messagebox from utf-8 file - VC 6.0 Pin
Jayapal Chandran10-Aug-10 11:11
Jayapal Chandran10-Aug-10 11:11 
AnswerRe: Unicode text in messagebox from utf-8 file - VC 6.0 Pin
Aescleal10-Aug-10 11:46
Aescleal10-Aug-10 11:46 
GeneralRe: Unicode text in messagebox from utf-8 file - VC 6.0 Pin
Jayapal Chandran10-Aug-10 12:21
Jayapal Chandran10-Aug-10 12:21 
GeneralRe: Unicode text in messagebox from utf-8 file - VC 6.0 Pin
Aescleal10-Aug-10 19:36
Aescleal10-Aug-10 19:36 
GeneralRe: Unicode text in messagebox from utf-8 file - VC 6.0 Pin
Jayapal Chandran12-Aug-10 9:03
Jayapal Chandran12-Aug-10 9:03 
GeneralRe: Unicode text in messagebox from utf-8 file - VC 6.0 Pin
Jayapal Chandran7-Oct-10 0:53
Jayapal Chandran7-Oct-10 0:53 

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.