Results 1 to 4 of 4

Thread: Common Dialog problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Location
    CA
    Posts
    4

    Question Common Dialog problem

    Hi All,

    I am using common dialog for the purpose of selecting files
    but I do not want the file deletion or renaming facility from it which can
    be done by either choosing the delete option from the context popup menu
    on a file or directory or simply pressing the "DEL" key, i.e. I just want
    the files can be selected from there.

    I tried two things :

    a)setting the commondialog.flag to cdlOFNAllowMultiselect
    which in turn sets off the explorer view of common dialog hence the
    context popupmenu is not available ,
    but,
    in this case creation of new folder from common dialog is not available.I
    do want that .

    b) The second thing i tried is subclassing common dialog , i successfully
    subclassed that but not able to intercept the right click message
    (WM_RBUTTONUP) or pressing of "DEL" key ?

    This is urgent , if anybody has any idea what to do or have some
    direction/links. Please Help.

    Thanks
    Pankaj

  2. #2
    Megatron
    Guest
    It's the WM_RBUTTONDOWN message, not WM_RBUTTONUP. And make sure that you're subclassing the ListView within the CommonDialog, not the common dialog itself.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Location
    CA
    Posts
    4
    Oh, yeah sure , that is the missing link ,
    I must subclass the listview but that present another problem, how would i get the handle of contained listview ?

    Pankaj

  4. #4
    Megatron
    Guest
    Well, since you already have the handle of the CommonDialog itself, just use FindWindowEx to get the handle of the ListView. The classname is SysListView32.
    VB Code:
    1. hwndListView = FindWindowEx(handle_of_CmDlg, 0, "SysListView32", vbNullString)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width