Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
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

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us