Hi,

I cannot get the right values for the SHELLFLAGSTATE flags (used by SHGetSettings(). In VC6, shlobj.h definition is as follows:



typedef struct {
BOOL fShowAllObjects : 1;
BOOL fShowExtensions : 1;
BOOL fNoConfirmRecycle : 1;
BOOL fShowSysFiles : 1;
BOOL fShowCompColor : 1;
BOOL fDoubleClickInWebView : 1;
BOOL fDesktopHTML : 1;
BOOL fWin95Classic : 1;
BOOL fDontPrettyPath : 1;
BOOL fShowAttribCol : 1;
BOOL fMapNetDrvBtn : 1;
BOOL fShowInfoTip : 1;
BOOL fHideIcons : 1;
UINT fRestFlags : 3;
} SHELLFLAGSTATE, * LPSHELLFLAGSTATE;


when coding in C
<varname>.fWin95Classic = TRUE;

Bit 7 (0x80) is set afterwards. That seems ok to me.

But:

the flags are defined twice. The second time they are bit masks
and equally defined in windows.inc and shlobj.h:[



#define SSF_SHOWALLOBJECTS 0x0001
#define SSF_SHOWEXTENSIONS 0x0002
#define SSF_SHOWCOMPCOLOR 0x0008
#define SSF_SHOWSYSFILES 0x0020
#define SSF_DOUBLECLICKINWEBVIEW 0x0080
#define SSF_SHOWATTRIBCOL 0x0100
#define SSF_DESKTOPHTML 0x0200
#define SSF_WIN95CLASSIC 0x0400
#define SSF_DONTPRETTYPATH 0x0800
#define SSF_SHOWINFOTIP 0x2000
#define SSF_MAPNETDRVBUTTON 0x1000
#define SSF_NOCONFIRMRECYCLE 0x8000
#define SSF_HIDEICONS 0x4000


Here the "WIN95CLASSIC" flag suddenly is 0400h!?

And at last, in windows.inc there is a "record" definition:



SHELLFLAGSTATE record fShowAllObjects:1,
fShowExtensions:1, fNoConfirmRecycle:1, fShowSysFiles:1,fShowCompColor:1,fDoubleClickInWebView:1,fDesktopHTML:1,fWin95Classic:1,fDontPrettyPath:1,fShowAttribCol:1,fMapNetDrvBtn:1,fShowInfoTip:1,fHideIcons:1, fRestFlags:3


When using this definition, for example

xor eax,eax
or eax, MASK fWin95Classic

eax is 100h afterwards?

So what is the right bit for "WIN95CLASSIC"? 80?, 100h or 400h?

japheth
Posted on 2001-12-30 17:16:08 by japheth
If an API call uses a SHELLFLAGSTATE structure (with
bitfields), the value would be 80h. Else you probably
want SSF_WIN95CLASSIC (400h). Windows.inc has been wrong
before, and might be wrong again :).

I dunno which one to use since I rarely mess with the
shell stuff (I loathe it). So apart from the above guesses,
my only advice is "experiment". That usually works for me.
But ok, I've been at it a long time... you know, trial and
error, like when you didn't have the manuals for that new
game you got... pretty annoying in MS flight sim ;-).
Posted on 2001-12-30 22:49:35 by f0dder
f0dder,

thanks for your reply but actually I only have a winnt machine available here and this system lacks function SHGetSettings(). So no own experiments are possible. (If you may ask yourself why I am coding stuff that cannot be executed on my machine: I'm in the process of converting some source code from C to ASM and just want to be "accurate")

japheth
Posted on 2001-12-31 01:29:15 by japheth
I'm on win2k, I can test out the stuff for you... just post a sample
executable and source :). Seems to me that you're supposed to
use the SSF_* flags with SHGetSettings() .
Posted on 2001-12-31 04:56:08 by f0dder
f0dder,

youre right, its SHGetSettings.

the code is attached, just a small console proc. Im particularily interested in flags SSF_WIN95CLASSIC and SSF_DOUBLECLICKINWEBVIEW. These settings should be self explanatory.

Thanks in advance

japheth
Posted on 2001-12-31 09:07:52 by japheth
sizeof SHELLFLAGSTATE is 2
value of sfs is 20, dummy is -65536 (should be -1)
Posted on 2002-01-01 17:18:24 by f0dder
f0dder,

thanks for the reply, but to be a useful test I'm afraid the prog has to be executed twice. One time with desktop in classic look, the other with desktop in "weblook".

I dont know if you can switch to weblook and return without problems. So could anyone else who already has his desktop in "weblook" please execute the small test prog and post the outputs?

japheth
Posted on 2002-01-02 03:16:18 by japheth