From: winapi on
Hello,

I have this "simple" example of a rebar control. I originally tried it in
later versions of
Microsoft Visual Studio C++, and for some reason the control is "not"
displaying.
I thought I would go back and try it in an earlier version of the Visual
Studio, so I tried
it in version 6, which is quite old now. The control "displayed" fine. I was
wondering if
someone might be kind enough to download the example from the link below,
and maybe
be able to tell me why it is not diplaying in later versions of visual
stuido, 2008, and 2008 express editions.

http://www.filedropper.com/rebarcontrol

Thanks!


From: winapi on

"winapi" <apiwin(a)hotmail.com> wrote in message
news:hqkese$98m$1(a)speranza.aioe.org...
> Hello,
>
> I have this "simple" example of a rebar control. I originally tried it in
> later versions of
> Microsoft Visual Studio C++, and for some reason the control is "not"
> displaying.
> I thought I would go back and try it in an earlier version of the Visual
> Studio, so I tried
> it in version 6, which is quite old now. The control "displayed" fine. I
> was wondering if
> someone might be kind enough to download the example from the link below,
> and maybe
> be able to tell me why it is not diplaying in later versions of visual
> stuido, 2008, and 2008 express editions.
>
> http://www.filedropper.com/rebarcontrol
>
> Thanks!
>


It appears the problem is to do with "commctrl.h" file in visual stuido
2008. I located this file in the includes folder, and then replaced the
"rebar section", with the one from visual studio 6. This seems to have fixed
the problem, that is, it now displays.


From: Timo Kunze on
Some struct definitions (I think REBARINFO was one of them) have been
extended for Windows XP and Vista, so sizeof(<such a struct>) now
returns something different than it did with the old definition.
Depending on the version of Windows that you run the program on, this
might be a problem. Commctrl.h contains some constants that can be used
instead of sizeof() to keep compatibility.

Timo
--
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
"Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der
Überzeugung, dass die demokratischen Kräfte überwiegen und sich – auf
demokratischem Wege – durchsetzen."
From: winapi on
> Some struct definitions (I think REBARINFO was one of them) have been
> extended for Windows XP and Vista, so sizeof(<such a struct>) now
> returns something different than it did with the old definition.
> Depending on the version of Windows that you run the program on, this
> might be a problem. Commctrl.h contains some constants that can be used
> instead of sizeof() to keep compatibility.

This is currently on XP. I did think about the point you made, "after" I had
changed that
data in the "commctrl.h" header. I was wondering if you might be able to
tell me some
of the problems that could possible appear with updates for
"sizeof(REBARINFO)"?

I have been trying to follow the MSDN rebar example currently, and it does
not seem
to look like the one in their picture. The toolbar seems to sit over the
combo box obscuring it from view. Also I can't seem to size the rebar
control, it just assumes the "width" of the window on creation, or something
of that manner.

Maybe this is something to do with the "sizeof(REBARINFO)"?

Do you know of any "simple" working examples?

Thanks.


From: winapi on
This is fixed now.
It seems I was missing a few required styles for the "toolbar".