CreateDialog | developer.brewmp.com CreateDialog | developer.brewmp.com

Developer

CreateDialog

Forums:

Hello, I am beginner in Japan.

I want to use IDialog interface, but an error occured
when I defined 'ISHELL_CreateDialog()'.

ISHELL_CreateDialog( pMe->a.m_pIShell, TEST_RES_FILE, DLG, NULL );

-> Error: CreateDialogParamA' :
It is not a member of 'IShellVtbl'.
Confirm a definition about 'IShelVTbl' (aeeshell.h(499) )

Does anyone see above this?
I dont understand this error message.
Ofcourse I didn't modify 'aeeshell.h' and confirmed about
'ISHELL_CreateDialog()'...

:confused:

I solved by myself.
The cause is the following include file.
#include
'windows.h' and 'aeeeshel.h' also has a parameter 'IShellVtbl'.
( I used "MessageBox" for debug.)
Beginers should take care of it.
Regards.

I solved by myself.
The cause is the following include file.
#include
'windows.h' and 'aeeeshel.h' also has a parameter 'IShellVtbl'.
( I used "MessageBox" for debug.)
Beginers should take care of it.
Regards.

Unfortunately usage of pre-created dialogs is very limited
in BREW beacuse controls cann't be moved in such dialogs.
I should create dialogs runtime (without res file ) in order
to have app runnable on differ BREW handsets.
Checj out
http://log.devx.com/Brew/Article/11619

Unfortunately usage of pre-created dialogs is very limited
in BREW beacuse controls cann't be moved in such dialogs.
I should create dialogs runtime (without res file ) in order
to have app runnable on differ BREW handsets.
Checj out
http://log.devx.com/Brew/Article/11619

i've been able to dynamically change the layout of controls in pre-created dialogs by setting the origin/sizes in the resource editor to -1, then in code call ICONTROL_SetRect for the controls i want to move/size (when trapping EVT_DIALOG_INIT).
is there problems with this approach ?
-Ben

i've been able to dynamically change the layout of controls in pre-created dialogs by setting the origin/sizes in the resource editor to -1, then in code call ICONTROL_SetRect for the controls i want to move/size (when trapping EVT_DIALOG_INIT).
is there problems with this approach ?
-Ben

My very simple program to use dialog, crashes on following statement:
ISHELL_CreateDialog(pMe->a.m_pIShell, APP_RES_FILE, IDD_DLG1, NULL);
All arguements in above call is correct.
Any idea why it crashes?
Is there any specific setting reqd in MIF or RES file?
regds,
Nilesh

My very simple program to use dialog, crashes on following statement:
ISHELL_CreateDialog(pMe->a.m_pIShell, APP_RES_FILE, IDD_DLG1, NULL);
All arguements in above call is correct.
Any idea why it crashes?
Is there any specific setting reqd in MIF or RES file?
regds,
Nilesh

You need to have EVT_DIALOG_INIT,EVT_DIALOG_START,and EVT_DIALOG_END events in ypur event handler .
Without this it will crash .
Check Out !
Shantanu Deo

You need to have EVT_DIALOG_INIT,EVT_DIALOG_START,and EVT_DIALOG_END events in ypur event handler .
Without this it will crash .
Check Out !
Shantanu Deo

Thanx Shantanu..
Now it works ..i have not handled the events EVT_DIALOG_INIT,EVT_DIALOG_START , EVT_DIALOG_END.
Why this reqd to be handled in my applet's event handler?
Also one more confusion:
IDIALOG_SetEventHandler( ) sets the event handler for the events that r processed by the dialog, then where i have to process the events for dialog?
Basically, if i have two dialogs in my applet, then i want to process events from each dialog in separate function. How is this possible?
Thanks once again,
regds,
Nilesh

Thanx Shantanu..
Now it works ..i have not handled the events EVT_DIALOG_INIT,EVT_DIALOG_START , EVT_DIALOG_END.
Why this reqd to be handled in my applet's event handler?
Also one more confusion:
IDIALOG_SetEventHandler( ) sets the event handler for the events that r processed by the dialog, then where i have to process the events for dialog?
Basically, if i have two dialogs in my applet, then i want to process events from each dialog in separate function. How is this possible?
Thanks once again,
regds,
Nilesh

????

????

Quote:Originally posted by nileshbhanderi
Basically, if i have two dialogs in my applet, then i want to process events from each dialog in separate function. How is this possible?
I havent used dialogs, but i would think that If you have 2 dialogs, you have to IDialog instances, and two separate calls to IDIALOG_SetEventHandler( ), where you can set 2 different handler functions..
-Tyndal

Quote:Originally posted by nileshbhanderi
Basically, if i have two dialogs in my applet, then i want to process events from each dialog in separate function. How is this possible?
I havent used dialogs, but i would think that If you have 2 dialogs, you have to IDialog instances, and two separate calls to IDIALOG_SetEventHandler( ), where you can set 2 different handler functions..
-Tyndal

Exactly !
U will need to use two dialog instances !
And then u can use different handler functions.
Shantanu Deo

Exactly !
U will need to use two dialog instances !
And then u can use different handler functions.
Shantanu Deo

Basically, if i have two dialogs in my applet, then i want to process events from each dialog in separate function. How is this possible?
~~~~~
In your EVT_DIALOG_START handler...the wParam identifies the ctrl ID of the dialog being loaded and the dwParam identifies the IDialog iface...why not just have a switch stmt that checks the ctrl ID and calls IDIALOG_SetEventHandler with the correct event handler?
Rock on.

Basically, if i have two dialogs in my applet, then i want to process events from each dialog in separate function. How is this possible?
~~~~~
In your EVT_DIALOG_START handler...the wParam identifies the ctrl ID of the dialog being loaded and the dwParam identifies the IDialog iface...why not just have a switch stmt that checks the ctrl ID and calls IDIALOG_SetEventHandler with the correct event handler?
Rock on.