Common Dialog and Thumbnails 
Author Message
 Common Dialog and Thumbnails

Hello,

Does somebody know how to refer to the Thumbnails "style" of the List View
control on a Common Dialog window?

I am using the ccrpFD6.ocx - Extended FileDialog Control within VB6. I
display the common dialog in Explorer style and sizable. I am trying to
make it work under Win95/98, NT and 2000. I have hooks set to the Dialog
window itself and to the child window. I want to SAVE the view style
selected by the user for the List View control. Using the following code in
the window procedure for the child window I am able to extract the last List
View style before the window was closed. The code works fine for List,
Icons, Small Icons and Details styles. My question is: What is the proper
way to
extend this code to handle Thumbnails style in Windows 2000? Is Thumbnails
defined as a style or there is other extended functionality implemented for
Windows 2000? Somehow I am missing the right information about this in my
search.

Here is some partial code from my hook procedure for the child window of the
common dialog window.

Public Function OFNHookProcCCRP1(ByVal hWndDialog As Long, _
                                 ByVal Msg As Long, _
                                 ByVal wp As Long, _
                                 ByVal lp As Long) As Long

    Dim hWndList As Long
    Dim lWndStyle As Long
    Dim hWndCmbType As Long
    Dim udtRect As RECT
    Dim NMHStruct As NMHDR
    Dim nRet As Long
    Dim sClassTmp As String
    Dim hWndToolbar  As Long

    Select Case Msg

        Case WM_NOTIFY

            CopyMemory2 NMHStruct, ByVal lp, LenB(NMHStruct)

            Select Case NMHStruct.code

                Case CDN_FILEOK

                    ' At exit, remember the ListView style

                    ' Get handle of ListView (SHELLDLL_DEFVIEW)
                    hWndList =
GetDlgItem(GetParent(hWndDialog),fdlgLVLstFiles)
                    ' Get handle of ListCtrl (SYSLISTVIEW32)
                    hWndList = GetDlgItem(hWndList, 1)
                    Debug.Print "Message CDN_FILEOK, handle= ", hWndList

                    ' Check the control's class
                    sClassTmp = Space(256)
                    nRet = GetClassName(hWndList, sClassTmp, Len(sClassTmp))
                    sClassTmp = UCase(left(sClassTmp, nRet))
                    Debug.Print "Message CDN_FILEOK, class= ", sClassTmp

                    ' Mask the style that refers to report, list, icon etc.
view
                    ' of the ListCtrl control
                    g_lComdlgStyle = GetWindowLong(hWndList, GWL_STYLE) And
LVS_TYPEMASK
                    Debug.Print "Message CDN_FILEOK, style captured = ",
g_lComdlgStyle

                Case Else

            End Select

    End Select

    ' Default Windows processing
    OFNHookProcCCRP1 = CallWindowProc(g_lOldCommonDlgProc1, hWndDialog, Msg,
wp, lp)

End Function

Thanks in advance for your help,
Lilia Marinova



Sat, 28 Jun 2003 03:04:54 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Common Dialog and Thumbnails

2. I want a Non-Common Control found in Common Dialog

3. Common Dialog And Common Control Classes

4. Having problem with Common Dialog Font Dialog - Please Help

5. Question about the Common Dialog print dialog control

6. Try Again: How to change the printer in the Print Dialog of the Common Dialog

7. Common Dialog Problem - Printer Dialog Copies Property

8. Common Dialog -> File Dialog

9. print dialog w/o common dialog

10. Centering a Open Dialog box using the Common dialog

11. What is returned from the printer dialog or common dialog

12. Microsoft Common Dialog Control 6.0 Problem (Print Dialog)

 

 
Powered by phpBB® Forum Software