Here is a window with toolbar buttons listview header bar and status bar. The buttons work and the menus under windows 9x/ME but when I give this to my friend who uses Windows XP to try he sends me back images of this program and there is no buttons, no listview header bar only menus and status bar. Where did the buttons go? Has anybody had any similar toolbar button experiences with program written under Win 98 ported to XP?

Someone please take a look at the attachment the attachment has the program, source code and a toolbarbutton.jpg showing how window should look.


any help much appreciated.

best regards,

czDrillard
Posted on 2002-04-25 15:23:17 by czDrillard
Looks like this on WinXP:
Posted on 2002-04-25 15:30:58 by bazik
I get the same thing as BaZik on XP.

Note that COLOR_BTNFACE+1 is actually COLOR_BTNSHADOW on my machine. I'm not sure if you wanted BTNSHADOW and specified it weird, or if you wanted BTNFACE and specified it wrong. :)

Good luck,

-Chalain
Posted on 2002-04-25 15:40:13 by Chalain
Win2k SP2. First image when just opened, second one when clicked on the bottom of the toolbar.

Thomas
Posted on 2002-04-25 16:00:13 by Thomas
Ditto for what Thomas said, but I'm running winnt4 sp6.
Posted on 2002-04-25 16:40:31 by Will
First, thanks very much to all you people who tested this for me. It seems to look ok under win xp, just win nt buttons not showing. Strange that my friend got similar results to the nt view when he tested it on xp.

I don't know why button five is completely grayed. It is supposed to be disabled and have grayed text only.

I don't know if it makes any difference which to use:

mov tbb.fsState,TBSTATE_INDETERMINATE or
invoke SendMessage,hToolBar,TB_ENABLEBUTTON,405,FALSE

they both give proper results with win98

thanks again, and best regards,

czDrillard
Posted on 2002-04-26 10:24:01 by czDrillard
hey!!!
I got the same thing as Thomas (still not me :-)))
I'm running under XP.

But, I may have the solution (maybe) for the ones who can't see the images!!

Just decompress the package in a directory, then execute the exe file. This should work. (maybe Thomas did not decompress the zip file, he may have executed it from Winrar or something like that).
Posted on 2002-04-26 14:38:31 by Vom-bonjour:-()
Nope, that's what I had tried. ....still the same under winnt4 sp6.

sorry
Posted on 2002-04-26 16:30:22 by Will
czDrillard, you have to properly initialise *all* structure members of your local variables, otherwise they'll be filled with random data, win nt/2k/xp is very picky here.
Posted on 2002-04-26 17:49:21 by Tola
Again thanks for the replies, I feel guilty getting this free education :)

Tola, I find your idea very interesting. Could you please explain it at little more. Specifically, I am using the following three structures:



LVITEM structure


TBADDBITMAP structure


TBBUTTON Structure


I have not initialized all members. For example I don't use the members iString, cColumns or iImage among others.

Should I be initializing all members to zero, whether I use them or not?

best regards,

czDrillard
Posted on 2002-04-27 11:20:38 by czDrillard
I have not initialized all members. For example I don't use the members iString, cColumns or iImage among others.

Should I be initializing all members to zero, whether I use them or not?

yes. set them to zero individually or just clear the entire structure before using it and then set the members you're going to use.
Posted on 2002-04-27 11:45:52 by Tola
I got the same as Thomas at win2000pro.
Posted on 2002-04-29 12:38:04 by wolfao