尚未声明TMessage [英] TMessage has not been declared

查看:120
本文介绍了尚未声明TMessage的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我在声明此事件处理程序时遇到问题...错误消息是"BEGIN_MESSAGE_MAP"未命名类型...我真的很想知道为什么由于其他代码将其放在头文件中而导致工作...但是我不知道该怎么办...

 BEGIN_MESSAGE_MAP
        MESSAGE_HANDLER(MM_WIM_DATA,TMessage,OnWaveMessage)
        END_MESSAGE_MAP(wxFrame)



我也像这样声明了上面的TMessage:

  class  Draft10Frm: public  wxFrame
{
    私有:
        DECLARE_EVENT_TABLE();
         void  OnWaveMessage(TMessage& msg); 



另一个错误是尚未声明TMessage ...据我所知,它是变量名msg的变量...

我正在尝试捕获表示已完成录制会话的MM_WIM_DATA ...请帮助我...谢谢!

OP的更新:
经过一番谷歌搜索后,我发现BEGIN_MESSAGE_MAP是在Borland下编译的...因此我将其放在头文件中...这是我的头文件的样子:

#ifdef __BORLANDC__
BEGIN_MESSAGE_MAP 
MESSAGE_HANDLER(MM_WIM_DATA, TMessage, OnWaveMessage)
END_MESSAGE_MAP (wxFrame) 
#pragma hdrstop
#endif

但是,我得到未声明TMessage的错误...
有人能解决这个问题吗?


hi!

i''m having a problem declaring this event handler... the error message is ''BEGIN_MESSAGE_MAP'' does not name a type... I''m really wondering why since other codes just put this on the header file and they work... but i don''t know what to do with this...

BEGIN_MESSAGE_MAP
        MESSAGE_HANDLER(MM_WIM_DATA, TMessage, OnWaveMessage)
        END_MESSAGE_MAP (wxFrame)



i also declared the TMessage above it like this:

class Draft10Frm : public wxFrame
{
    private:
        DECLARE_EVENT_TABLE();
        void OnWaveMessage(TMessage& msg); 



another error is that TMessage has not been declared... as i understand, it''s a variable for the variable name msg...

i''m trying to catch the MM_WIM_DATA which indicates finished recording session... please help me... thanks!

UPDATE from OP:
after some googling, i found that the BEGIN_MESSAGE_MAP is compiled under Borland... so i placed it there from the header file... here is what it looks like at my header file:

#ifdef __BORLANDC__
BEGIN_MESSAGE_MAP 
MESSAGE_HANDLER(MM_WIM_DATA, TMessage, OnWaveMessage)
END_MESSAGE_MAP (wxFrame) 
#pragma hdrstop
#endif

however, i get the error that TMessage is not declared...
anybody who can solve that?

解决方案

Try to find the declaration in you c++ compiler (sdk) directory and put it to your code (with or without some transformation).


这篇关于尚未声明TMessage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆