From: LFSoftDev on
Thank you for your reply.

I have not got chance to go home and try this yet but I am using VS2008 and
I have not hanged that WINVERmacro. So that may be the issue. If I do this
though, will I still be able to run the compiled application using XP?

Liam
From: Giovanni Dicanio on

"LFSoftDev" <LFSoftDev(a)discussions.microsoft.com> ha scritto nel messaggio
news:0AA9AD55-CE2C-4E32-A216-FB110ADE41BC(a)microsoft.com...

> I have not got chance to go home and try this yet but I am using VS2008

OK

> and I have not hanged that WINVERmacro.

I believe that the VS2008 wizard for MFC dialog-based apps writes
out-of-the-box a "targetver.h" file with proper preprocessor definitions to
target Windows Vista (at least, this is on my current machine, where I am
running in this Vista partition VS2008 without SP1).

So, if you did not modify the predefined "targetver.h" file, I think that
the problem is somewhere else...

However, give a look to your targetver.h.

> So that may be the issue. If I do this
> though, will I still be able to run the compiled application using XP?

If you use *Vista-only* features, I believe that you will have some errors
on XP.

For example, if you use the COM interfaces to modify and customize the
Vista-style file-dialog box, being these COM interfaces a Vista-only
features, I believe that your code will fail on XP (probably COM methods
will return some HRESULT indicating error code... or QueryInterface would
fail because these COM interfaces are not available on XP, I've never tried
that...).

Giovanni


From: LFSoftDev on
Hello

> So, if you did not modify the predefined "targetver.h" file, I think that
> the problem is somewhere else...
I started from a tutorial and extended it. SO i'll def look.

> If you use *Vista-only* features, I believe that you will have some errors
> on XP.
Ok. Thanks. I'll try to stick to things that are not vista specific. I'll
use false in the vista parameter and give it a go. Thank you again for your
help. I will let you know the results asap.

Best Regards,

Liam

From: Giovanni Dicanio on

"LFSoftDev" <LFSoftDev(a)discussions.microsoft.com> ha scritto nel messaggio
news:8F39F8C1-7824-4E43-956C-19F29AE8D690(a)microsoft.com...

>> So, if you did not modify the predefined "targetver.h" file, I think that
>> the problem is somewhere else...
> I started from a tutorial and extended it. SO i'll def look.

OK.
But in the beginning of the thread you wrote:

> I have tried the exact code listed here and get tthe same result:
> http://msdn.microsoft.com/en-us/library/dk77e5e7.aspx

So, you signaled a problem from MSDN code, which instead appeared fine for
me.


>> If you use *Vista-only* features, I believe that you will have some
>> errors
>> on XP.
> Ok. Thanks. I'll try to stick to things that are not vista specific. I'll
> use false in the vista parameter and give it a go. Thank you again for
> your
> help. I will let you know the results asap.

You wrote in your first message:

> This line appears higher up the call stack - I am using windows vista,

So, my understanding is that you were actually using Windows Vista (not XP),
and you got the failure: this is the problem.

Instead, with the test code I posted, using the default bVistaStyle = TRUE
in CFileDialog constructor, under Windows Vista there is no problem.

Do your own tests, comparing also the test-project I posted, and I would
suggest you to post here a *compilable* code sample to get better help about
your problem.
Maybe there is some problem in some other part of the code that is causing
you this bug...

Giovanni

From: Daniel James on
In article news:<#$pdeTxdJHA.1528(a)TK2MSFTNGP03.phx.gbl>, Giovanni
Dicanio wrote:
> Note that I used VS2008 to build the test code.
> In VS2008's MFC, there is a last parameter in CFileDialog constructor
> that is of type BOOL, named 'bVistaStyle'. It's default value is
> TRUE.
>
> http://msdn.microsoft.com/en-us/library/wh5hz49d.aspx

Oh Yuk! That is, IMHO, an *extremely* bad piece of design. No
application should ever decide (or have to decide) for itself whether or
not it will use Vista styling. If it's run on Vista in the Vista style
then it should use Vista styling, if it's run on something other than
Vista or on Vista with the Classic style then it should not use the
classic style ... but this should all be done under the covers by the
framework code. The programmer should be aware of the decision being
taken, but should never have to take it himself.

> If you are compiling the code with a previous version of VS, I think
> that MFC does not support the new Vista-style dialogs ...

That would seem to be the case ... and it's understandable that the MFC
libraries supplied with earlier VS versions won't include that support.

However, the documentation (your link, reproduced above) says (and I
haven't tested this) that even if you are using the latest VS you also
have to be compiling on Vista for the new Vista support to be enabled.
That means that if you compile your app on XP and deploy on Vista you
will NOT see the Vista style -- that's appalling.

You would obviously want to test your app on Vista before shipping --
and you'd probably need to build and debug the Vista aspects of the GUI
code on Vista during development -- but there is absolutely no reason
for the tools to require you to run your automated build system on Vista
in order to get the Vista look!

The same code, built with the same tools, should behave the same way
regardless of the OS on which it is compiled. If MS have really broken
that fundamental notion then they can have no clue at all.

MS must be really desparate to force developers to use Vista for their
own work, if they are happy to build this sort of nonsense into the
toolsets!

Cheers,
Daniel.


First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: Strings again :(
Next: Pass CWnd or CView to DLL