当前位置:编程学习 > wap >>

VIEW和资源文件

RESOURCE AVKON_VIEW r_view1
{
menubar = r_menubar1;
cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
}
RESOURCE MENU_BAR r_menubar1
{
titles =
{
MENU_TITLE { menu_pane = r_menu1; }
};
}
RESOURCE MENU_PANE r_menu1
{
items =
{
// added the new Options menu command here
MENU_ITEM
{
command = ECommand1;
txt = qtn_command1;
}
};
}

#include <aknviewappui.h>
#include <avkon.hrh>
#include "mainView.h"
#include "mainContainer.h"
void CmainView::ConstructL()
{
BaseConstructL(R_VIEW1); //undefined identifier 'R_VIEW1' mainView.cpp clock1/src line 13 C/C++ Problem

}
void CmainView::DoActivateL(
   const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
   const TDesC8& /*aCustomMessage*/)
    {
    if (!iContainer)
        {
        iContainer = new (ELeave) CmainContainer;//Creation illegal use of abstract class ('MCoeControlObserver::HandleControlEventL(CCoeControl *, MCoeControlObserver::TCoeEvent)')
        iContainer->SetMopParent(this);
        iContainer->ConstructL( ClientRect() );
        AppUi()->AddToStackL( *this, iContainer );
        }
   }

出现在上面两个错误,红色为错的地方,哪位高手能帮帮忙呢,初学者,搞不定,谢谢。 --------------------编程问答-------------------- 粉红色的地方,你的container继承了抽象类,但是没有实现它 --------------------编程问答-------------------- 红的地方缺少资源符号。在使用“R_VIEW1”符号的cpp文件中加上 #include <****.rsg>(****一般为你项目名)。同时,在mmp文件中保证包含了****.rss文件,如 RESOURCE ****.rss --------------------编程问答-------------------- 定义的VIEW资源名改成大写试试 --------------------编程问答-------------------- 同意2楼 --------------------编程问答-------------------- 粉红色的地方,你的container继承了抽象类,但是没有实现它
红的地方缺少资源符号。在使用“R_VIEW1”符号的cpp文件中加上 #include <****.rsg>(****一般为你项目名)。同时,在mmp文件中保证包含了****.rss文件,如 RESOURCE ****.rss


//undefined identifier 'R_VIEW1' mainView.cpp clock1/src line 13 C/C++ Problem ,,,//没有引资源文件
//Creation illegal use of abstract class ('MCoeControlObserver::HandleControlEventL(CCoeControl *, MCoeControlObserver::TCoeEvent)') //抽象类的函数你没有实现

补充:移动开发 ,  Symbian
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,