×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    11

    problem in using dialog resource

    Hello

    I am using carbide.vs (s60 2nd ed), I added a dialog resource (using the Add Fragment) , the code look like this
    Code:
    /* Usage:
    	#include <AknQueryDialog.h>	// Link against: avkon.lib
    	// Show dialog 'Enter password:'
    	TBuf<8> input;	// Max. length: 8
    	CAknTextQueryDialog* dialog = CAknTextQueryDialog::NewL(input);
    	if (dialog->ExecuteLD(R_PASSWORD_TEXT_QUERY)) {
    		// Ok
    	} else {
    		// Cancel
    	}
    */
    RESOURCE DIALOG pass_q {
    	flags = EGeneralQueryFlags;
    	buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
    	items = {
    		DLG_LINE {
    			type = EAknCtQuery;
    			id = EGeneralQuery;
    			control = AVKON_DATA_QUERY {
    				layout = ECodeLayout;
    				label = "Enter password:";
    				control = SECRETED;
    			};
    		}
    	};
    }
    then added AknQueryDialog.h to the header file and avkon.lib to the linker dependencies, and used it as in the example dialog->ExecuteLD(pass_q) and still get the error:
    Error 1 error: undefined identifier 'pass-q'
    what i should do else to make the application see the resource !?!
    Last edited by ayman09; 2008-05-17 at 23:54.

  2. #2
    Registered User
    Join Date
    Apr 2006
    Location
    Beijing, China
    Posts
    1,175

    Re: problem in using dialog resource

    Hi,

    "pass_q" should be modified to "PASS_Q". And make sure that the generated .rsg file is included also. "PASS_Q" is defined in that file.

    Regards,
    Dou
    Way of Simplicity

  3. #3
    Registered User
    Join Date
    Oct 2007
    Posts
    11

    Smile Re: problem in using dialog resource

    Quote Originally Posted by dougcn View Post
    Hi,

    "pass_q" should be modified to "PASS_Q". And make sure that the generated .rsg file is included also. "PASS_Q" is defined in that file.

    Regards,
    Dou
    Thanks very much...

Similar Threads

  1. custom data query dialog problem
    By pncbose in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-02-25, 04:49
  2. Dialog with label background problem
    By erst in forum Symbian User Interface
    Replies: 0
    Last Post: 2007-12-06, 19:02
  3. problem including a resource file
    By doesitmatter in forum Symbian
    Replies: 6
    Last Post: 2007-10-15, 09:38
  4. resource dialog
    By plmanikandan in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-05-19, 08:36
  5. problem in reading resource
    By danielos1 in forum Symbian User Interface
    Replies: 2
    Last Post: 2003-08-31, 02:13

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •