|
Posted by Lisa Pearlson on July 12, 2005, 6:31 pm
Please log in for more thread options I guess I cheered too soon. Just 1 page explaining the difference between
PocketPC and SmartPhone screens and controls.
No sample code. :(
Is my code to display dialog using "DialogBox" the way to go? How do I add a
scroll bar and make ALL controls on that dialog scroll (or do I have to move
each of them myself using MoveWindow?)
How can I change Class name for my dialog, or can it not be changed? If not,
how else can I use FindWindow effectively? Just the window name is not
reliable.
Cheers,
Lisa
> Thank you a lot. By looking up SHINITDLGINFO in the online docs, I was
> able to reveal the documentation I was looking for!!! Haven't read the
> docs yet, but hopefully it includes how to add scroll bars and such.
>
> Thanks,
> Lisa
>
>
>> [cut]
>>>
>>> But this just pops up a floating dialog box, doesn't put the caption on
>>> top, of the window (the bar that also has standard icons like battery
>>> status and such) but puts the title in the dialog, which doesn't cover
>>> the entire screen.
>>>
>>> The dialog should be full size, and contain menu items.. How do I resize
>>> the dialog box, and make sure the title appears where it should?
>>> Obviously it is not by making the dialog full screen and overlappen.
>>>
>>> I'm really frustrated.. dialog based apps are so common, why the wizard
>>> doesn't provide one is beyond me.
>>
>> add a WM_INITDIALOG handler in your dialog procedure; in the
>> WM_INITDIALOG handler add this code:
>>
>> SHINITDLGINFO shidi;
>> memset(&shidi, 0, sizeof(SHINITDLGINFO));
>> shidi.dwMask = SHIDIM_FLAGS;
>> shidi.dwFlags = SHIDIF_SIZEDLGFULLSCREEN;
>> shidi.hDlg = hDlg; //hDlg is the dialog window handle
>> SHInitDialog(&shidi); //error checking omitted
>>
>> this will make your dialog full screen and will add the dialog title to
>> the top bar.
>> To add a menu bar, use this code (again, in WM_INITDIALOG handler):
>>
>> SHMENUBARINFO si;
>> memset(&si, 0, sizeof(SHMENUBARINFO));
>> si.cbSize = sizeof(SHMENUBARINFO);
>> si.hwndParent = hDlg;
>> si.nToolBarId = IDR_MENUBAR;
>> si.hInstRes = hInstance;
>> SHCreateMenuBar(&si);
>>
>>
>> HTH,
>>
>>
>> --
>> Giuseppe Govi
>> g.govi <a> vodafone.it
>>
>>
>
>
|