Re: Old-Style File Dialogs on Vista?



I am not familiar with LotusScript, but if it has the same limitations as
VBA does under apps such as Word or Access, there is no AddressOf provided
there either. But several sites for Access in particular do have a solution
for achiveing the same thing ... check out Dev or Bryan's sites at
http://www.mvps.org/access/ and http://www.mvps.org/vbvision - I know one of
those has the code.

--

Randy
http://vbnet.mvps.org/


"retroman" <retroman@xxxxxxxxxxx> wrote in message
news:0pffi3hbpc0u2c6ltlbf6f10mbeau9hu5m@xxxxxxxxxx
On Tue, 30 Oct 2007 15:55:22 -0400, "Randy Birch" wrote:

You are misinterpreting. There is no such thing as OFNHookProc and
OFNHookProcOldStyle. What the MSDN is saying is that to design a hook for
an OpenFileName common dialog, you would develop a rountine - the hook -
whose format follows the defininition provided in the sample OFNHookProc
procedure. You can call this whatever the heck you wanted, since it is in
*your* app, not part of windows. When you pass the address of that
procedure - whatever its name - windows uses it.

The MSDN then means to say that if you want to implement an "old style"
hook, follow the OFNHookProcOldStyle template for your code - which is in
fact identical to the OFNHookProc template - and then change *your* code
in
that procedure to provide an interface in an "old" style. IOW, you have a
"normal" hook for later OS versions, and if running on an earlier version,
your code would instead pass the address of the "old style" hook instead.

The fact you are using a hook called (or not called) OldStyle has
absolutely
no bearing on what the hook does or how the dialog appears, unless you
code
otherwise.

Hello Randy and thanks for taking the time to enlighten me! What you say
makes
perfect sense (now!).

At first, I thought that the MSDN entry for the OFN_EXPLORER flag offered
an
alternative for me:

"If you want the old-style user interface, omit the OFN_EXPLORER flag and
provide a
replacement old-style template or hook procedure. If you want the old
style but do
not need a custom template or hook procedure, simply provide a hook
procedure that
always returns FALSE."

But now I think that describes exactly what Thorsten's code does. Then
Timo's
response made me aware of a new problem: I can't use the VB6 keyword
AddressOf. I'm
looking into constructing the equivalent in LotusScript, but that may be
beyond my
skills. Otherwise, even with the right hook procedure, I won't be able
point to it
using lpfnHook.

I may just have to learn to live those darn new-fangled Vista file dialogs
:-(

Regards,

Doug M. in NJ

PS: many thanks for the treasure trove of code on your site. It has saved
my behind
on more than one occasion....


.



Relevant Pages

  • Re: Old-Style File Dialogs on Vista?
    ... Windows XP and VB6 or so the old interface invoked by using OFN_EXPLORER ... you would develop a rountine - the hook - ... The MSDN then means to say that if you want to implement an "old style" ...
    (microsoft.public.vb.winapi)
  • Re: Cloud computing is the story of our lifetime
    ... software running in a VM or a Cloud. ... hosted app that's in an environment with a lot of other hosted apps. ... currently being able to hook across virtualized environments. ... No doubt there are technical issues here, but the cloud services that make ...
    (borland.public.delphi.non-technical)
  • Re: I want a msgbox to display BIG and LITTLE instead of YES and NO
    ... You've got a space missing after AddressOf ... > 'Wrapper function for the MessageBox API ... > 'Set up the CBT hook ...
    (comp.databases.ms-access)
  • Basic questions
    ... Some years ago I wrote a user-mode DLL which uses a WH_MOUSE_LL hook ... to translate WM_MBUTTONDOWN into a double-right click. ... I've coaxed various apps, including Explorer, to load it at logon. ...
    (microsoft.public.development.device.drivers)
  • Re: CBT hook and Subclassing
    ... If you don't want some apps run with your hook, you can return FALSE in your ... side effects like mmc windows do not come up. ... I am having no clue why they are crashing. ...
    (microsoft.public.win32.programmer.kernel)

Quantcast