Hi,
Does anyone have working code for the FILEREQUEST dialog, or a modification of it, that will allow me to see a thumbnail
of the image before I click open? I assume it will need a callback of some kind (not my forte!)
I want to be able to see a thumbnail of my images as I click though the files, and then select the one I require
Any ideas?
Brian
PS: I have seen some code of Sapero's, but it was way beyond me!
			
			
			
				Is this what you are wanting it to look like?
			
			
			
				Larry,
Anything like that will do - just so the user can see what's going on. I want to use
it to load pics into your IWGrid. Got it working kind of using hard-coded paths
Brian
			
			
			
				Larry,
Got Sapero's code working somewhat, but the Dialog says "Save As" where I want it to be "Open File"
Also, can't get it to change the directory from the GETSTARTPATH, as in GETSTARTPATH+"My Folder"
I would like it to open a folder of my choice without the user having to click to get there
Brian
Edit: Fixed the Save As - now shows Open File
			
			
			
				OK, worked it out. You can change the line szPath=GETSTARTPATH+"My Folder\*.jpg"
and it will open the folder required
Only thing I don't get is what variable/parameter holds the filename that you click open
on, and how it is returned
Any ideas?
Brian
			
			
			
				Here's the code for a subroutine that I use set up as a demo.
You can use the FILEREQUEST section of the help file to see how to use it.
			
			
			
				Thanks, Larry. That's a lot of code for what I want to do! I only need to see and then
open an image, but I am sure it will work a lot better than anything I could cobble up
Brian
			
			
			
				My post above will work for both load and save and on all the versions of windows.
It you want to use yours then you'll need something like this to get the path of the selected file
	g_hook=_SetWindowsHookEx(WH_CBT,&OfnCbtProc,0,_GetCurrentThreadID())
	'get the file
	if _GetOpenFileName(ofn)
		pointer ptr
		ptr =ofn.lpstrFile
		?#<string>ptr
	else
	endif
	'uninstall the hook
	_UnhookWindowsHookEx(g_hook)