-
Comdlg32, select a FILE from FONTS directory!
I have a delicate problem that seems to be hard to solve...
In my application I need to return the actual file name for a Font Resource
file. So I use the Windows FileOpen Common Dialog, created via a wrapper
class from the ComDlg32. My problem is that this dialog simply refuses to
return any selection if the directory is the Windows Fonts directory e.g.
c:\Windows\Fonts or c:\WinNT\Fonts. It suits my purpose that the dialog for
this directory actually displays the “friendly names” instead of the true
file names. I have tried to hook the dialog to catch any useful message related
to the selection, but discovered that messages of some reason not are allowed
to “surface” when the font directory is selected.
The reason for using the FileOpen Dialog is that I need a file, not a Windows
Font Resource given by the ChooseFont dialog.
I appreciate all help given on this topic.
Thank,
Peter
-
Re: Comdlg32, select a FILE from FONTS directory!
Hi Peter --
****, but that's an intriguing question. I can see the problem, but don't really see
any way around it short of possibly hooking the dialog. Not a very pleasent option.
I'll try digging around a bit, and see if there isn't an easier way.
Later... Karl
--
http://www.mvps.org/vb
"Peter" <peter.jonsson@intermec.com> wrote in message
news:3948c3ac$1@news.devx.com...
>
> I have a delicate problem that seems to be hard to solve...
>
> In my application I need to return the actual file name for a Font Resource
> file. So I use the Windows FileOpen Common Dialog, created via a wrapper
> class from the ComDlg32. My problem is that this dialog simply refuses to
> return any selection if the directory is the Windows Fonts directory e.g.
> c:\Windows\Fonts or c:\WinNT\Fonts. It suits my purpose that the dialog for
> this directory actually displays the “friendly names” instead of the true
> file names. I have tried to hook the dialog to catch any useful message related
> to the selection, but discovered that messages of some reason not are allowed
> to “surface” when the font directory is selected.
>
> The reason for using the FileOpen Dialog is that I need a file, not a Windows
> Font Resource given by the ChooseFont dialog.
>
> I appreciate all help given on this topic.
>
> Thank,
> Peter
-
Re: Comdlg32, select a FILE from FONTS directory!
Hi Peter --
****, but that's an intriguing question. I can see the problem, but don't really see
any way around it short of possibly hooking the dialog. Not a very pleasent option.
I'll try digging around a bit, and see if there isn't an easier way.
Later... Karl
--
http://www.mvps.org/vb
"Peter" <peter.jonsson@intermec.com> wrote in message
news:3948c3ac$1@news.devx.com...
>
> I have a delicate problem that seems to be hard to solve...
>
> In my application I need to return the actual file name for a Font Resource
> file. So I use the Windows FileOpen Common Dialog, created via a wrapper
> class from the ComDlg32. My problem is that this dialog simply refuses to
> return any selection if the directory is the Windows Fonts directory e.g.
> c:\Windows\Fonts or c:\WinNT\Fonts. It suits my purpose that the dialog for
> this directory actually displays the “friendly names” instead of the true
> file names. I have tried to hook the dialog to catch any useful message related
> to the selection, but discovered that messages of some reason not are allowed
> to “surface” when the font directory is selected.
>
> The reason for using the FileOpen Dialog is that I need a file, not a Windows
> Font Resource given by the ChooseFont dialog.
>
> I appreciate all help given on this topic.
>
> Thank,
> Peter
-
Re: Comdlg32, select a FILE from FONTS directory!
Whoops! Just noted you said you'd already tried hooking the dialog? You're not
getting LBSELCHSTRING or CDN_FILEOK in that folder? Ah, jeez, I see that the
selection actually is removed when the listview loses focus. What a mess!
--
http://www.mvps.org/vb
"Karl E. Peterson" <karl@mvps.org> wrote in message news:39490a1f$1@news.devx.com...
> Hi Peter --
>
> ****, but that's an intriguing question. I can see the problem, but don't really
see
> any way around it short of possibly hooking the dialog. Not a very pleasent
option.
> I'll try digging around a bit, and see if there isn't an easier way.
>
> Later... Karl
> --
> http://www.mvps.org/vb
>
>
> "Peter" <peter.jonsson@intermec.com> wrote in message
> news:3948c3ac$1@news.devx.com...
> >
> > I have a delicate problem that seems to be hard to solve...
> >
> > In my application I need to return the actual file name for a Font Resource
> > file. So I use the Windows FileOpen Common Dialog, created via a wrapper
> > class from the ComDlg32. My problem is that this dialog simply refuses to
> > return any selection if the directory is the Windows Fonts directory e.g.
> > c:\Windows\Fonts or c:\WinNT\Fonts. It suits my purpose that the dialog for
> > this directory actually displays the “friendly names” instead of the true
> > file names. I have tried to hook the dialog to catch any useful message related
> > to the selection, but discovered that messages of some reason not are allowed
> > to “surface” when the font directory is selected.
> >
> > The reason for using the FileOpen Dialog is that I need a file, not a Windows
> > Font Resource given by the ChooseFont dialog.
> >
> > I appreciate all help given on this topic.
> >
> > Thank,
> > Peter
>
>
-
Re: Comdlg32, select a FILE from FONTS directory!
Whoops! Just noted you said you'd already tried hooking the dialog? You're not
getting LBSELCHSTRING or CDN_FILEOK in that folder? Ah, jeez, I see that the
selection actually is removed when the listview loses focus. What a mess!
--
http://www.mvps.org/vb
"Karl E. Peterson" <karl@mvps.org> wrote in message news:39490a1f$1@news.devx.com...
> Hi Peter --
>
> ****, but that's an intriguing question. I can see the problem, but don't really
see
> any way around it short of possibly hooking the dialog. Not a very pleasent
option.
> I'll try digging around a bit, and see if there isn't an easier way.
>
> Later... Karl
> --
> http://www.mvps.org/vb
>
>
> "Peter" <peter.jonsson@intermec.com> wrote in message
> news:3948c3ac$1@news.devx.com...
> >
> > I have a delicate problem that seems to be hard to solve...
> >
> > In my application I need to return the actual file name for a Font Resource
> > file. So I use the Windows FileOpen Common Dialog, created via a wrapper
> > class from the ComDlg32. My problem is that this dialog simply refuses to
> > return any selection if the directory is the Windows Fonts directory e.g.
> > c:\Windows\Fonts or c:\WinNT\Fonts. It suits my purpose that the dialog for
> > this directory actually displays the “friendly names” instead of the true
> > file names. I have tried to hook the dialog to catch any useful message related
> > to the selection, but discovered that messages of some reason not are allowed
> > to “surface” when the font directory is selected.
> >
> > The reason for using the FileOpen Dialog is that I need a file, not a Windows
> > Font Resource given by the ChooseFont dialog.
> >
> > I appreciate all help given on this topic.
> >
> > Thank,
> > Peter
>
>
-
Re: Comdlg32, select a FILE from FONTS directory!
Hi Karl,
Right – I’ve tried to hook the dialog and noted that the notification CDN_FOLDERCHANGE
is raised when selecting the FONTS directory, but the CDN_SELCHANGE stops.
So I receives no notification from the dialog telling me that an item in
the ListView has been selected! Would it possible to hook the ListView directly?
Maybe I can use the CDN_FOLDERCHANGE to check the directory and for the Fonts
directory visualize my own ListView added by a template? Hmmm...I really
lost on this one...I appreciate all help!
Later /Peter
"Karl E. Peterson" <karl@mvps.org> wrote:
>Whoops! Just noted you said you'd already tried hooking the dialog? You're
not
>getting LBSELCHSTRING or CDN_FILEOK in that folder? Ah, jeez, I see that
the
>selection actually is removed when the listview loses focus. What a mess!
>--
>http://www.mvps.org/vb
>
>
>"Karl E. Peterson" <karl@mvps.org> wrote in message news:39490a1f$1@news.devx.com...
>> Hi Peter --
>>
>> ****, but that's an intriguing question. I can see the problem, but don't
really
>see
>> any way around it short of possibly hooking the dialog. Not a very pleasent
>option.
>> I'll try digging around a bit, and see if there isn't an easier way.
>>
>> Later... Karl
>> --
>> http://www.mvps.org/vb
>>
>>
>> "Peter" <peter.jonsson@intermec.com> wrote in message
>> news:3948c3ac$1@news.devx.com...
>> >
>> > I have a delicate problem that seems to be hard to solve...
>> >
>> > In my application I need to return the actual file name for a Font Resource
>> > file. So I use the Windows FileOpen Common Dialog, created via a wrapper
>> > class from the ComDlg32. My problem is that this dialog simply refuses
to
>> > return any selection if the directory is the Windows Fonts directory
e.g.
>> > c:\Windows\Fonts or c:\WinNT\Fonts. It suits my purpose that the dialog
for
>> > this directory actually displays the “friendly names” instead of the
true
>> > file names. I have tried to hook the dialog to catch any useful message
related
>> > to the selection, but discovered that messages of some reason not are
allowed
>> > to “surface” when the font directory is selected.
>> >
>> > The reason for using the FileOpen Dialog is that I need a file, not
a Windows
>> > Font Resource given by the ChooseFont dialog.
>> >
>> > I appreciate all help given on this topic.
>> >
>> > Thank,
>> > Peter
>>
>>
>
>
-
Re: Comdlg32, select a FILE from FONTS directory!
Hi Karl,
Right – I’ve tried to hook the dialog and noted that the notification CDN_FOLDERCHANGE
is raised when selecting the FONTS directory, but the CDN_SELCHANGE stops.
So I receives no notification from the dialog telling me that an item in
the ListView has been selected! Would it possible to hook the ListView directly?
Maybe I can use the CDN_FOLDERCHANGE to check the directory and for the Fonts
directory visualize my own ListView added by a template? Hmmm...I really
lost on this one...I appreciate all help!
Later /Peter
"Karl E. Peterson" <karl@mvps.org> wrote:
>Whoops! Just noted you said you'd already tried hooking the dialog? You're
not
>getting LBSELCHSTRING or CDN_FILEOK in that folder? Ah, jeez, I see that
the
>selection actually is removed when the listview loses focus. What a mess!
>--
>http://www.mvps.org/vb
>
>
>"Karl E. Peterson" <karl@mvps.org> wrote in message news:39490a1f$1@news.devx.com...
>> Hi Peter --
>>
>> ****, but that's an intriguing question. I can see the problem, but don't
really
>see
>> any way around it short of possibly hooking the dialog. Not a very pleasent
>option.
>> I'll try digging around a bit, and see if there isn't an easier way.
>>
>> Later... Karl
>> --
>> http://www.mvps.org/vb
>>
>>
>> "Peter" <peter.jonsson@intermec.com> wrote in message
>> news:3948c3ac$1@news.devx.com...
>> >
>> > I have a delicate problem that seems to be hard to solve...
>> >
>> > In my application I need to return the actual file name for a Font Resource
>> > file. So I use the Windows FileOpen Common Dialog, created via a wrapper
>> > class from the ComDlg32. My problem is that this dialog simply refuses
to
>> > return any selection if the directory is the Windows Fonts directory
e.g.
>> > c:\Windows\Fonts or c:\WinNT\Fonts. It suits my purpose that the dialog
for
>> > this directory actually displays the “friendly names” instead of the
true
>> > file names. I have tried to hook the dialog to catch any useful message
related
>> > to the selection, but discovered that messages of some reason not are
allowed
>> > to “surface” when the font directory is selected.
>> >
>> > The reason for using the FileOpen Dialog is that I need a file, not
a Windows
>> > Font Resource given by the ChooseFont dialog.
>> >
>> > I appreciate all help given on this topic.
>> >
>> > Thank,
>> > Peter
>>
>>
>
>
-
Re: Comdlg32, select a FILE from FONTS directory!
Hi Peter --
> Right – I’ve tried to hook the dialog and noted that the notification
CDN_FOLDERCHANGE
> is raised when selecting the FONTS directory, but the CDN_SELCHANGE stops.
Found a KB article that pretty much 'splains what's up, but doesn't look like it
helps much more than that. See:
HOWTO: Support Common Dialog Browsing in a Shell Namespace Extension
http://support.microsoft.com/support.../Q216/9/54.asp
> So I receives no notification from the dialog telling me that an item in
> the ListView has been selected! Would it possible to hook the ListView directly?
Interesting thought! But if you're not getting notification when OK is pressed...?
> Maybe I can use the CDN_FOLDERCHANGE to check the directory and for the Fonts
> directory visualize my own ListView added by a template? Hmmm...I really
> lost on this one...I appreciate all help!
I'm working on an idea, and will get back here if it pans out.
Sorry... Karl
--
http://www.mvps.org/vb
-
Re: Comdlg32, select a FILE from FONTS directory!
Hi Peter --
> Right – I’ve tried to hook the dialog and noted that the notification
CDN_FOLDERCHANGE
> is raised when selecting the FONTS directory, but the CDN_SELCHANGE stops.
Found a KB article that pretty much 'splains what's up, but doesn't look like it
helps much more than that. See:
HOWTO: Support Common Dialog Browsing in a Shell Namespace Extension
http://support.microsoft.com/support.../Q216/9/54.asp
> So I receives no notification from the dialog telling me that an item in
> the ListView has been selected! Would it possible to hook the ListView directly?
Interesting thought! But if you're not getting notification when OK is pressed...?
> Maybe I can use the CDN_FOLDERCHANGE to check the directory and for the Fonts
> directory visualize my own ListView added by a template? Hmmm...I really
> lost on this one...I appreciate all help!
I'm working on an idea, and will get back here if it pans out.
Sorry... Karl
--
http://www.mvps.org/vb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks