PDA

View Full Version : Dialogs -- do they ever work?


flarb
03-11-2002, 08:05 PM
I have never been able to get a dialog to work. I've set one up in my resource file, but when I call CreateDialog it just returns EFAILED. That's it--no information, no crash, nothing.

In the end, dialogs seem kind of useless because you still have to manage its internal components individually, but I'd like to at least figure out how to use one if I ever need to.

jikesoft
03-12-2002, 12:29 AM
In my case, I also had difficulties in using Dialogs of Brew.
But there is always a way to solve the problem.
You probably find your own ways if you spend some more
time in struggling with Resource Editor and sample code.]:rolleyes:

Using dialog has some advantages if you want to layout your controls not by hard-coding but by Brew Resource Editor.

Originally posted by flarb
I have never been able to get a dialog to work. I've set one up in my resource file, but when I call CreateDialog it just returns EFAILED. That's it--no information, no crash, nothing.

In the end, dialogs seem kind of useless because you still have to manage its internal components individually, but I'd like to at least figure out how to use one if I ever need to.

wcherry
03-13-2002, 02:14 PM
I just had a similiar problem, and had to dig through the FAQ. You must handle the following dialog events by at least returning TRUE...
case EVT_DIALOG_START:
return TRUE;
case EVT_DIALOG_INIT:
return TRUE;
case EVT_DIALOG_END:
return TRUE;

See: http://www.qualcomm.com/brew/developer/support/faq/techfaq8.html#T8L

Hope that helps

--William

flarb
03-13-2002, 05:14 PM
Hmm, ok good tip. The problem is, the wParam that is supposed to actually be a pointer to the dialog is always set to 1. Which I'm assuming is some kind of error code. So even though those dialog events get handled, the pointer BREW sends to my message handler is invalid.

flarb
03-13-2002, 05:52 PM
D'oh, I'm an idiot. I should be using dwParam. :)