- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
application using CVF 6.6C & W2K so that it can show more files without
manual resizing. However, when I do so, the box itself gets bigger, but its
child window showing the files actually gets smaller. I have developed a
dirty method involving resizing, closing it immediately with EndDialog and
then reopening without a hook procedure - it then gives the same larger
child window as from dragging the box larger. Does anyone know a better
way? I found that the discussion in this forum "Controlling GETOPENFILENAME dialog box position" in April 2001 provided useful background on moving.
either the mouse or keyboard. I don't know how to resize with the
keyboard - how is that effected?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Alan, I'm in a big hurry & overloaded, so just a quick hint: you canplay with every control within the dialog within the hook. Instead of always hooking, you can simply select case (Msg). In this case, you can catch WM_SIZE (and/or WM_WINDOWPOSCHANGING) and resize/move the ListView containing the folder list. You can get its handle from the hook via GetDlgItem(GetParent(hDlg), ID) where ID is revealed using Spy++, or FindWindow by class "SysListView32". From there, you can move/size every control in the dialog normally (MoveWindow/SetWindowPos) -- that action will be performed whenever the dialog is being sized.
Hmm, I could swear that dialog with OFN_ENABLESIZING does size its listview according to the size by default? Or am I mistaken? (No time to check it out).
Jugosav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jugoslav,
Thanks for that - BTW, I am having problems logging on, and am sending this when visiting the company where I worked before I retired. If Lexi S. from Support manages to sort me out, I will be able to respond better.
I had previously developed a method of enlarging the dialog box, getting all the child windows using EnumChildWindows and shifting down all the child windows that were below the listview. The trouble with that was that if the box was then manually resized larger, the next time GetOpenFileName was called, it produced ghost child windows. I will dig out the code for that and see if I made an error in closing things after use.
I still hope that if anyone can tell me how to enlarge the box using the keyboard, then a programmed alternative should be fairly straightforward. I too was surprised that OFN_ENABLESIZING did not allow enlargement of the listview - what is the point of it if it doesn't? Perhaps I have missed a wrinkle there.
Regards
Alan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See also this thread about using "stc32"=1119 control in custom template, as well as this article-- maybe you find them helpful.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
type(T_NMHDR):: Hdr; pointer(pHdr, Hdr) select case(Msg) CASE(WM_NOTIFY) pHdr=lParam IF (Hdr%Code.EQ.CDN_INITDONE) THEN iSt = PostMessage(hWnd, WM_USER+1, 0, 0) END IF OpenHookProc = .FALSE. CASE(WM_USER+1) iSt=SetWindowPos(GetParent(hWnd),0,iX,iY,iWidth,iHeight,SWP_NOZORDER) OpenHookProc=.TRUE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
calculate the minimum size of the listview to show all the files in a directory.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page