Board index » cppbuilder » LBS_NOSEL and winver

LBS_NOSEL and winver


2008-06-11 02:47:19 AM
cppbuilder3
Hi.
I'm using borland 5.02 and trying to fix an old project.
For some reason, I have an rc file which is compiling (i.e.
I can bring it up in thw resource workshop) but not linking...
I'm not sure why, though I have hints that it is confused as to the
value of winver.
I say this because the rc files has this line in it:
CONTROL "ListBox1", IDC_LISTBOX_MSG, "listbox", LBS_NOTIFY | LBS_NOSEL
| WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL |
WS_TABSTOP, 16, 228, 556, 40
and when I remove LBS_NOSEL, it compiles fine.
When I grep for LBS_NOSEL in the headers of borland 5.02 I see in 3
include files this or similar:
#if(WINVER>= 0x0400)
#define LBS_NOSEL 0x4000L
#endif /* WINVER>= 0x0400 */
So my assumption is that the WINVER value is less than 400.
Can someone explain what must be set wrong for this to occur, or how to
'fix' it?
thanks
Jeff
 
 

Re:LBS_NOSEL and winver

It has been a while but I think WINVER < 4 is 16 bit Windows.
Maybe you did not include windows.h I am not on a machine with BC++ 5.02 on
it right now, but the 32 bit compilers I do have mounted all define WINVER
with a number>= 4 in windows.h
. Ed
Quote
Jeff Kish wrote in message
news: XXXX@XXXXX.COM ...

I'm using borland 5.02 and trying to fix an old project.

For some reason, I have an rc file which is compiling (i.e.
I can bring it up in thw resource workshop) but not linking...
I'm not sure why, though I have hints that it is confused as to the
value of winver.

I say this because the rc files has this line in it:

CONTROL "ListBox1", IDC_LISTBOX_MSG, "listbox", LBS_NOTIFY | LBS_NOSEL
| WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL |
WS_HSCROLL | WS_TABSTOP, 16, 228, 556, 40

and when I remove LBS_NOSEL, it compiles fine.

When I grep for LBS_NOSEL in the headers of borland 5.02 I see in
3 include files this or similar:

#if(WINVER>= 0x0400)
#define LBS_NOSEL 0x4000L
#endif /* WINVER>= 0x0400 */



So my assumption is that the WINVER value is less than 400.
Can someone explain what must be set wrong for this to occur,
or how to 'fix' it?
 

Re:LBS_NOSEL and winver

On Tue, 10 Jun 2008 15:38:15 -0400, "Ed Mulroy [TeamB]"
< XXXX@XXXXX.COM >wrote:
Quote
It has been a while but I think WINVER < 4 is 16 bit Windows.

Maybe you did not include windows.h I am not on a machine with BC++ 5.02 on
it right now, but the 32 bit compilers I do have mounted all define WINVER
with a number>= 4 in windows.h

. Ed

>Jeff Kish wrote in message
>news: XXXX@XXXXX.COM ...
>
>I'm using borland 5.02 and trying to fix an old project.
>
>For some reason, I have an rc file which is compiling (i.e.
>I can bring it up in thw resource workshop) but not linking...
>I'm not sure why, though I have hints that it is confused as to the
>value of winver.
>
>I say this because the rc files has this line in it:
>
>CONTROL "ListBox1", IDC_LISTBOX_MSG, "listbox", LBS_NOTIFY | LBS_NOSEL
>| WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL |
>WS_HSCROLL | WS_TABSTOP, 16, 228, 556, 40
>
>and when I remove LBS_NOSEL, it compiles fine.
>
>When I grep for LBS_NOSEL in the headers of borland 5.02 I see in
>3 include files this or similar:
>
>#if(WINVER>= 0x0400)
>#define LBS_NOSEL 0x4000L
>#endif /* WINVER>= 0x0400 */
>
>
>
>So my assumption is that the WINVER value is less than 400.
>Can someone explain what must be set wrong for this to occur,
>or how to 'fix' it?

Thanks Ed.
I rebuilt the project from scratch and it is fine now. I had a 32 bit
target, so I don't really know why it would suddenly get weird....
regards
Jeff
 

{smallsort}