|
|
|
date: Mon, 26 May 2008 01:10:32 -0700,
group: microsoft.public.win32.programmer.ui
back
SHBrowseForFolder - Callback Kills Scroll Bar.
Hi Folks:
Developing on XP Home, VS 2008 Pro, WIN32, no MFC.
I've been using SHBrowseForFolder() for a long time, but
a user is telling me the dialog is too big to fit on their
screen. Perhaps because they are using Dragon Naturally
Speaking, which has it's own frame around the client area.
So I'm specifying a callback for SHBrowseForFolder.
This is the first time I've tried to use a callback for
this function.
The callback does seem to be able to specify a new size
for the browse folder, but the scroll bar, which was present
before the callback was used, is now gone.
How do I resurrect the scrollbar?
This is my callback:
int CALLBACK contact_import_brouwsinfo_callback(HWND hwnd,
UINT umsg,
LPARAM lparam,
LPARAM lpdata)
{
int return_val = 0;
switch(umsg)
{
case BFFM_INITIALIZED:
SetWindowPos(hwnd, HWND_TOP, 0, 0, 500, 500,
SWP_NOREPOSITION | SWP_NOZORDER);
break;
case BFFM_VALIDATEFAILED:
// There isn't an edit box, so this shouldn't happen.
// Return non-zero to keep the dialog displayed.
return_val = 1;
break;
}
return return_val;
}
For testing, this has a hard coded dialog size. Of
course, the production version will be more flexible.
Thanks
Larry
date: Mon, 26 May 2008 01:10:32 -0700
author: Larry Lindstrom
Re: SHBrowseForFolder - Callback Kills Scroll Bar.
On 26 mai, 10:10, Larry Lindstrom wrote:
> Hi Folks:
>
> Developing on XP Home, VS 2008 Pro, WIN32, no MFC.
>
> I've been using SHBrowseForFolder() for a long time, but
> a user is telling me the dialog is too big to fit on their
> screen. Perhaps because they are using Dragon Naturally
> Speaking, which has it's own frame around the client area.
>
> So I'm specifying a callback for SHBrowseForFolder.
> This is the first time I've tried to use a callback for
> this function.
>
> The callback does seem to be able to specify a new size
> for the browse folder, but the scroll bar, which was present
> before the callback was used, is now gone.
Use PostMessage() to call SetWindowPos() in a WM_USER n message
date: Mon, 26 May 2008 02:36:24 -0700 (PDT)
author: Christian ASTOR
|
|