Hi group
I've already written some small apps, some with quite a number of dialogs
and they all got their own menu.
Now I'm working on a today plugin which has an own options dialog. My
problem: I set it up to show the dialog when I tap on its area on the today
screen. But then the dialog has no command bar, thus no SIP as well. But
when I open the dialog through Settings->Today->Items there is such a bar
with a SIP.
Could you please tell me what I'm doing wrong? I'd like to get a commandbar
which provides a SIP to enter settings.
Following is an excerpt from my options dialog procedure. I use the same
code in my other apps (that is, in dialogs that are opened within the
apps), where it works. Is there something evidently wrong here?
case WM_INITDIALOG:
SHINITDLGINFO shidi;
shidi.dwMask=SHIDIM_FLAGS;
shidi.hDlg=hDlg; // hDlg comes from function interface
shidi.dwFlags=SHIDIF_DONEBUTTON | SHIDIF_SIZEDLGFULLSCREEN;
SHInitDialog(&shidi);
hwndCB=CreateRpCommandBar(hDlg,IDM_OPTIONS);
hMenu=(HMENU)SendMessage(hwndCB,SHCMBM_GETMENU,(WPARAM)0,(LPARAM)0);
break;
hwndCB and hMenu are defined within the function as a static HWND and
HMENU, respectively. The menu resource IDM_OPTIONS exists, of course ;-)
The only difference I can think of is that in my other apps I have an own
main window which already brings along a commandbar in which the dialog's
menu is placed, whereas a today item's "main window" is embedded in the
today screen and therefore doesn't have that bar.
I'd apreciate any helpful answers.
--
Gruß | Greetings | Qapla'
Quoting can be so easy: http://www.netmeister.org/news/learn2quote.html