Brew Question:
Download Questions PDF

How to create a dialog?

Answer:

Use the BREW Resource Editor to create a dialog. You can also construct the dialog manually by creating data structures in your application to define the contents of the dialog.

Note: If a bmp file is being used, make sure that the bmp format is supported and that the bmp file is a valid full path, all in lowercase.

Once the dialog has been created, it will have a resource ID and a resource file (.bar file). Use ISHELL_CreateDialog() to create the dialog:

ISHELL_CreateDialog(pMe->a.pIShell, SAMPLEAPP_RES_FILE,
RESOURCE_ID, NULL);
// SAMPLEAPP_RES_FILE is the resource file (.bar file) and
// RESOURCE_ID is the resource ID specified in the resource
// editor


Process the following events (return TRUE at the very least) in the app handler function:

case EVT_DIALOG_START:
return TRUE;
case EVT_DIALOG_INIT:
return TRUE;
case EVT_DIALOG_END:
return TRUE;


Call ISHELL_EndDialog when the dialog object is no longer needed.

ISHELL_EndDialog(pMe->a.pIShell);

Download Brew Interview Questions And Answers PDF

Previous QuestionNext Question
How to draw a line in a specific color?How to create a scroll bar if menu is larger than the screen size?