CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 15

Threaded View

  1. #5
    Join Date
    Apr 2010
    Location
    Western WA, USA
    Posts
    59

    Re: Highlite entry in GetOpenFileName() list, programmatically.

    Thanks edpat,
    I tried trapping the CDN_INITDONE notification, and discovered some interesting results.

    At the time of CDN_INITDONE, the Spy++ listing for the OFN dialog shows a window with a "ListBox" class, and the VC8 help docs say that this is a child with control ID "lst1". So doing this:
    Code:
    hWlv = GetDlgItem(hWnd, lst1);
    gets a handle to that list box, but the list seems to be empty. Trying to fetch the count, using:
    Code:
    ListView_GetItemCount(hWlv);
    returns 0.

    If I let the code run to the point where the OFN dialog appears, and then look at the child window list in Spy++ again, there are items that weren't present earlier: a window with a "SHELLDLL_DefView" class, which has a child titled "FolderView" with a "SysListView32" class.

    I am assuming the "SysListView32" window (which has the identical coordinates as the empty "ListBox" window) is the one containing the actual file list. My problem is that these windows don't exist at the time of the CDN_INITDONE notification, so I am at a loss as to how to get a notification after they are created.

    Any ideas?
    Last edited by cosmicvoid; October 16th, 2012 at 03:14 AM.

Tags for this Thread

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

Featured