testdialog.rss

来自「symbianOS第三版开发与实用教程部分源码和部分试验」· RSS 代码 · 共 177 行

RSS
177
字号
/*
============================================================================
 Name        : TestDialog.rss
 Author      : Lion
 Copyright   : Your copyright notice
 Description : This file contains all the resources for the TestDialog.
============================================================================
*/
//  RESOURCE IDENTIFIER
NAME TEST    // 4 letter ID


//  INCLUDES
#include <eikon.rh>
#include <avkon.rh>
#include <avkon.rsg>
#include <appinfo.rh>
#include "TestDialog.hrh"
#include "TestDialog.rls"

//  RESOURCE DEFINITIONS
// -----------------------------------------------------------------------------
//
//    Define the resource file signature
//    This resource should be empty.
//
// -----------------------------------------------------------------------------
//
RESOURCE RSS_SIGNATURE
    {
    }

// -----------------------------------------------------------------------------
//
//    Default Document Name
//
// -----------------------------------------------------------------------------
//
RESOURCE TBUF r_default_document_name
    {
    buf="HEWB";
    }

// -----------------------------------------------------------------------------
//
//    Define default menu and CBA key.
//
// -----------------------------------------------------------------------------
//
RESOURCE EIK_APP_INFO
    {
    menubar = r_menubar;
    cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
    }


// -----------------------------------------------------------------------------
//
//   r_menubar
//   Main menubar
//
// -----------------------------------------------------------------------------
//
RESOURCE MENU_BAR r_menubar
    {
    titles =
        {
        MENU_TITLE { menu_pane = r_menu; }
        };
    }


// -----------------------------------------------------------------------------
//
//   r_menu
//   Menu for "Options"
//
// -----------------------------------------------------------------------------
//
RESOURCE MENU_PANE r_menu
    {
    items =
        {
        // added the new Options menu command here
        MENU_ITEM
                {
                command = ECommand1;
                txt = qtn_command1;
                },
        MENU_ITEM
                {
                command = EAknSoftkeyExit;
                txt = qtn_exit;
                }
        };
    }

RESOURCE DIALOG r_simple_dialog
	{
	flags=EEikDialogFlagNoDrag | 
		EEikDialogFlagNoTitleBar | 
		EEikDialogFlagFillAppClientRect | 
		EEikDialogFlagCbaButtons | 
		EEikDialogFlagModeless;
	buttons=R_AVKON_SOFTKEYS_OPTIONS_BACK; 
	items=
		{
		DLG_LINE
			{
			id=ESimpleDlgCIdGameName;
			type=EEikCtLabel;
			control= LABEL 
				{ 
				txt = "Simple Dialog"; 
				};
			}
		};
	}


RESOURCE DIALOG r_simple_name_dialog
	{
	flags=EEikDialogFlagNoDrag | 
		EEikDialogFlagCbaButtons |
		EEikDialogFlagWait;
	buttons=R_AVKON_SOFTKEYS_OK_CANCEL; 
	items=
		{
		DLG_LINE
			{
			id=ESimpleDlgCIdUserName;
			type=EEikCtLabel;
			control= LABEL 
				{
				};
			},
		DLG_LINE
			{
			id=ESimpleDlgCIdUserNameEditor;
			type=EEikCtEdwin;
			control= EDWIN 
				{
				maxlength = 10;
				};
			}
		};	
	}
// -----------------------------------------------------------------------------
//
// Resources for messages.
//
// -----------------------------------------------------------------------------
//
RESOURCE TBUF32 r_command1_text { buf=qtn_command1_text; }
RESOURCE TBUF32 r_caption_string { buf=qtn_caption_string; }

// ---------------------------------------------------------------------------- 
//
// r_localisable_app_info
//
// ---------------------------------------------------------------------------- 
//
RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
    {
    short_caption = qtn_caption_string;
    caption_and_icon = 
    CAPTION_AND_ICON_INFO
        {
        caption = qtn_caption_string;

        number_of_icons = 1;
	   	icon_file = "\\resource\\apps\\TestDialog.mif";
	    };
    }

// End of File

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?