Return an image to mspaint!
-
Hello, I've been trying to make a program that can basically return the contents of an image to paint via the File/Open dialog. So you'd open Paint, hit file-->Open and then either 1. Select my program which returns an image somehow or 2. Select my file type which does something else! (What I don't know!):confused: What I'd like to do is have a shortcut type program that pulls files from a database rather than the filesystem. Maybe I should be asking how do .lnk files tell paint to get the file from somewhere else? Any ideas? Thanks Gareth
-
Hello, I've been trying to make a program that can basically return the contents of an image to paint via the File/Open dialog. So you'd open Paint, hit file-->Open and then either 1. Select my program which returns an image somehow or 2. Select my file type which does something else! (What I don't know!):confused: What I'd like to do is have a shortcut type program that pulls files from a database rather than the filesystem. Maybe I should be asking how do .lnk files tell paint to get the file from somewhere else? Any ideas? Thanks Gareth
The .lnk file is a special Explorer hack that "acts" like the soft link in a Unix-like system. It's all done in the shell, so access to it is a little secretive, if possible at all. I don't think that you can get there from here. I have seen shell add-ins, though, that look like they're a part of the file system as accessed through the Explorer, but actually connect to "other stuff." You might want to see if something like shell extension handlers[^] would work for you. "we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty
-
Hello, I've been trying to make a program that can basically return the contents of an image to paint via the File/Open dialog. So you'd open Paint, hit file-->Open and then either 1. Select my program which returns an image somehow or 2. Select my file type which does something else! (What I don't know!):confused: What I'd like to do is have a shortcut type program that pulls files from a database rather than the filesystem. Maybe I should be asking how do .lnk files tell paint to get the file from somewhere else? Any ideas? Thanks Gareth
Gareth, You can also invoke ClipBoard and exchnage the image in Paint recognizable format. Which programming language are you using? Is'nt it? Vasudevan Deepak Kumar Personal Web: http://www.lavanyadeepak.tk/ I Blog At: http://www.dotnetjunkies.com/weblog/deepak/
http://deepakvasudevan.blogspot.com/
http://deepak.blogdrive.com/ -
The .lnk file is a special Explorer hack that "acts" like the soft link in a Unix-like system. It's all done in the shell, so access to it is a little secretive, if possible at all. I don't think that you can get there from here. I have seen shell add-ins, though, that look like they're a part of the file system as accessed through the Explorer, but actually connect to "other stuff." You might want to see if something like shell extension handlers[^] would work for you. "we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty
I've just come over something called a re-parse point! It sounds like something I could use!! Has anyone had any experience with these? http://www.pcguide.com/ref/hdd/file/ntfs/filesReparse-c.html[^] Quote: (From link)
In addition to allowing reparse points to implement many types of custom capabilities, Microsoft itself uses them to implement several features within Windows 2000 itself, including the following: Symbolic Links: Symbolic linking allows you to create a pointer from one area of the directory structure to the actual location of the file elsewhere in the structure. NTFS does not implement "true" symbolic file linking as exists within UNIX file systems, but the functionality can be simulated by using reparse points. In essence, a symbolic link is a reparse point that redirect access from one file to another file. Junction Points: A junction point is similar to a symbolic link, but instead of redirecting access from one file to another, it redirects access from one directory to another. Volume Mount Points: A volume mount point is like a symbolic link or junction point, but taken to the next level: it is used to create dynamic access to entire disk volumes. For example, you can create volume mount points for removable hard disks or other storage media, or even use this feature to allow several different partitions (C:, D:, E: and so on) to appear to the user as if they were all in one logical volume. Windows 2000 can use this capability to break the traditional limit of 26 drive letters--using volume mount points, you can access volumes without the need for a drive letter for the volume. This is useful for large CD-ROM servers that would otherwise require a separate letter for each disk (and would also require the user to keep track of all these drive letters!) Remote Storage Server (RSS): This feature of Windows 2000 uses a set of rules to determine when to move infrequently used files on an NTFS volume to archive storage (such as CD-RW or tape). When it moves a file to "offline" or "near offline" storage in this manner, RSS leaves behind reparse points that contain the instructions necessary to access the archived files, if they are needed in the future.
Thanks Gareth
-
Gareth, You can also invoke ClipBoard and exchnage the image in Paint recognizable format. Which programming language are you using? Is'nt it? Vasudevan Deepak Kumar Personal Web: http://www.lavanyadeepak.tk/ I Blog At: http://www.dotnetjunkies.com/weblog/deepak/
http://deepakvasudevan.blogspot.com/
http://deepak.blogdrive.com/Hi, Thanks for the idea but I'd like to do this will any registered file format! Not just images (I used that as an example). I have a program that's associated with a file format. When you double click the file from Windows explorer it loads the file from a database using the associated program (eg word for .doc, excel for .xls etc etc) I'm using C# Thanks
-
I've just come over something called a re-parse point! It sounds like something I could use!! Has anyone had any experience with these? http://www.pcguide.com/ref/hdd/file/ntfs/filesReparse-c.html[^] Quote: (From link)
In addition to allowing reparse points to implement many types of custom capabilities, Microsoft itself uses them to implement several features within Windows 2000 itself, including the following: Symbolic Links: Symbolic linking allows you to create a pointer from one area of the directory structure to the actual location of the file elsewhere in the structure. NTFS does not implement "true" symbolic file linking as exists within UNIX file systems, but the functionality can be simulated by using reparse points. In essence, a symbolic link is a reparse point that redirect access from one file to another file. Junction Points: A junction point is similar to a symbolic link, but instead of redirecting access from one file to another, it redirects access from one directory to another. Volume Mount Points: A volume mount point is like a symbolic link or junction point, but taken to the next level: it is used to create dynamic access to entire disk volumes. For example, you can create volume mount points for removable hard disks or other storage media, or even use this feature to allow several different partitions (C:, D:, E: and so on) to appear to the user as if they were all in one logical volume. Windows 2000 can use this capability to break the traditional limit of 26 drive letters--using volume mount points, you can access volumes without the need for a drive letter for the volume. This is useful for large CD-ROM servers that would otherwise require a separate letter for each disk (and would also require the user to keep track of all these drive letters!) Remote Storage Server (RSS): This feature of Windows 2000 uses a set of rules to determine when to move infrequently used files on an NTFS volume to archive storage (such as CD-RW or tape). When it moves a file to "offline" or "near offline" storage in this manner, RSS leaves behind reparse points that contain the instructions necessary to access the archived files, if they are needed in the future.
Thanks Gareth
Gareth, If you get anywhere with this solution, please drop a line here on the message board. I'd be intrigued to see what happens. Thanks. Curtis. "we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty