Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

how to let dropdownlistbox to be owner-drawed?

9 posts in Objects Last posting was on 2004-04-27 13:41:12.0Z
incats Posted on 2004-04-23 02:05:04.0Z
From: "incats" <wany@163.net>
Newsgroups: sybase.public.powerbuilder.objects
Subject: how to let dropdownlistbox to be owner-drawed?
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 61.149.145.250
X-Original-NNTP-Posting-Host: 61.149.145.250
Message-ID: <408879d0@forums-1-dub>
Date: 22 Apr 2004 19:05:04 -0700
X-Trace: forums-1-dub 1082685904 61.149.145.250 (22 Apr 2004 19:05:04 -0700)
X-Original-Trace: 22 Apr 2004 19:05:04 -0700, 61.149.145.250
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7880
Article PK: 735155

//my code here in the constructor:
long ll_hwnd
ll_hwnd = handle(this)

ulong nStyle

nStyle = n_api.GetWindowuLong(il_HwndCb, GWL_STYLE)

nStyle += n_api.CBS_OWNERDRAWFIXED

n_api.SetWindowuLong(il_HwndCb, GWL_STYLE, nStyle)
///////////////////////////////////////////////////

but it doesn't work, and GetLastError()= 1422.
so, i write a function named "of_LetMyDraw", the above code in it. and post
the function in the constructor event. it works. but no any changes appear.
i had written some codes in the ue_drawitemstruct which EventID is
"pbm_drawitemstruct". I used some tools to get the window style of the
Dropdownlistbox, yes, CBS_OWNERDRAWFIXED is there.

help me, where am i wrong? thanks.


Philip Salgannik Posted on 2004-04-23 04:22:39.0Z
From: "Philip Salgannik" <philemaxNOSPAM@comcast.net>
Newsgroups: sybase.public.powerbuilder.objects
References: <408879d0@forums-1-dub>
Subject: Re: how to let dropdownlistbox to be owner-drawed?
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: h005018067b6f.ne.client2.attbi.com
X-Original-NNTP-Posting-Host: h005018067b6f.ne.client2.attbi.com
Message-ID: <40889a0f$1@forums-1-dub>
Date: 22 Apr 2004 21:22:39 -0700
X-Trace: forums-1-dub 1082694159 24.34.95.76 (22 Apr 2004 21:22:39 -0700)
X-Original-Trace: 22 Apr 2004 21:22:39 -0700, h005018067b6f.ne.client2.attbi.com
X-Authenticated-User: pbtenbeta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7881
Article PK: 735152

http://www.xs4all.nl/~onkie/pbtip020.html

--
This is a FAQ, read Help, then search
www.groups.google.com/advanced_group_search

pbm_thisusuallydoesnothelp:-))
Philip Salgannik

"incats" <wany@163.net> wrote in message news:408879d0@forums-1-dub...
> //my code here in the constructor:
> long ll_hwnd
> ll_hwnd = handle(this)
>
> ulong nStyle
>
> nStyle = n_api.GetWindowuLong(il_HwndCb, GWL_STYLE)
>
> nStyle += n_api.CBS_OWNERDRAWFIXED
>
> n_api.SetWindowuLong(il_HwndCb, GWL_STYLE, nStyle)
> ///////////////////////////////////////////////////
>
> but it doesn't work, and GetLastError()= 1422.
> so, i write a function named "of_LetMyDraw", the above code in it. and
post
> the function in the constructor event. it works. but no any changes
appear.
> i had written some codes in the ue_drawitemstruct which EventID is
> "pbm_drawitemstruct". I used some tools to get the window style of the
> Dropdownlistbox, yes, CBS_OWNERDRAWFIXED is there.
>
> help me, where am i wrong? thanks.
>
>


incats Posted on 2004-04-23 09:01:29.0Z
From: "incats" <wany@163.net>
Newsgroups: sybase.public.powerbuilder.objects
References: <408879d0@forums-1-dub> <40889a0f$1@forums-1-dub>
Subject: Re: how to let dropdownlistbox to be owner-drawed?
Lines: 8
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Original-NNTP-Posting-Host: 221.216.152.112
Message-ID: <4088db64@forums-2-dub>
X-Original-Trace: 23 Apr 2004 02:01:24 -0700, 221.216.152.112
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 23 Apr 2004 02:01:26 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 23 Apr 2004 02:01:29 -0700
X-Trace: forums-1-dub 1082710889 10.22.108.75 (23 Apr 2004 02:01:29 -0700)
X-Original-Trace: 23 Apr 2004 02:01:29 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7882
Article PK: 735154

Thanks first.
Before i post the question, i had read the color combox sample before.
After finished reading, i think if i can directly inherit from the standard
dropdownlistbox, i need not to provide extra methods. They have being there.
i just only paint something myselft, not the whole.
any suggestion will be appreciated.


Philip Salgannik Posted on 2004-04-23 13:33:45.0Z
From: "Philip Salgannik" <philemaxNOSPAM@comcast.net>
Newsgroups: sybase.public.powerbuilder.objects
References: <408879d0@forums-1-dub> <40889a0f$1@forums-1-dub> <4088db64@forums-2-dub>
Subject: Re: how to let dropdownlistbox to be owner-drawed?
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: h005018067b6f.ne.client2.attbi.com
X-Original-NNTP-Posting-Host: h005018067b6f.ne.client2.attbi.com
Message-ID: <40891b39$1@forums-1-dub>
Date: 23 Apr 2004 06:33:45 -0700
X-Trace: forums-1-dub 1082727225 24.34.95.76 (23 Apr 2004 06:33:45 -0700)
X-Original-Trace: 23 Apr 2004 06:33:45 -0700, h005018067b6f.ne.client2.attbi.com
X-Authenticated-User: pbtenbeta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7884
Article PK: 735157

What's the question?

pbm_thisusuallydoesnothelp:-))
Philip Salgannik

"incats" <wany@163.net> wrote in message news:4088db64@forums-2-dub...
> Thanks first.
> Before i post the question, i had read the color combox sample before.
> After finished reading, i think if i can directly inherit from the
standard
> dropdownlistbox, i need not to provide extra methods. They have being
there.
> i just only paint something myselft, not the whole.
> any suggestion will be appreciated.
>
>


incats Posted on 2004-04-27 01:46:43.0Z
From: "incats" <wany@163.net>
Newsgroups: sybase.public.powerbuilder.objects
References: <408879d0@forums-1-dub> <40889a0f$1@forums-1-dub> <4088db64@forums-2-dub> <40891b39$1@forums-1-dub>
Subject: Re: how to let dropdownlistbox to be owner-drawed?
Lines: 6
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 221.216.3.170
X-Original-NNTP-Posting-Host: 221.216.3.170
Message-ID: <408dbb83@forums-1-dub>
Date: 26 Apr 2004 18:46:43 -0700
X-Trace: forums-1-dub 1083030403 221.216.3.170 (26 Apr 2004 18:46:43 -0700)
X-Original-Trace: 26 Apr 2004 18:46:43 -0700, 221.216.3.170
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7888
Article PK: 735162

let the standard dropdownlistbox to be owner-drawed. but not create a
"COMBOBOX" on a visual userobject.
but in the constructor event, SetWindowLong will cause a error 1422. and the
event ue_drawitemstructor never fired.


Philip Salgannik Posted on 2004-04-27 05:13:19.0Z
From: "Philip Salgannik" <philemaxNOSPAM@comcast.net>
Newsgroups: sybase.public.powerbuilder.objects
References: <408879d0@forums-1-dub> <40889a0f$1@forums-1-dub> <4088db64@forums-2-dub> <40891b39$1@forums-1-dub> <408dbb83@forums-1-dub>
Subject: Re: how to let dropdownlistbox to be owner-drawed?
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: h005018067b6f.ne.client2.attbi.com
X-Original-NNTP-Posting-Host: h005018067b6f.ne.client2.attbi.com
Message-ID: <408debef$1@forums-1-dub>
Date: 26 Apr 2004 22:13:19 -0700
X-Trace: forums-1-dub 1083042799 24.34.95.76 (26 Apr 2004 22:13:19 -0700)
X-Original-Trace: 26 Apr 2004 22:13:19 -0700, h005018067b6f.ne.client2.attbi.com
X-Authenticated-User: pbtenbeta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7889
Article PK: 735161

You'll have to try a bit harder, I still don't understand neither what you
are trying to do, nor what for, etc.

pbm_thisusuallydoesnothelp:-))
Philip Salgannik

"incats" <wany@163.net> wrote in message news:408dbb83@forums-1-dub...
> let the standard dropdownlistbox to be owner-drawed. but not create a
> "COMBOBOX" on a visual userobject.
> but in the constructor event, SetWindowLong will cause a error 1422. and
the
> event ue_drawitemstructor never fired.
>
>


incats Posted on 2004-04-27 06:59:51.0Z
From: "incats" <wany@163.net>
Newsgroups: sybase.public.powerbuilder.objects
References: <408879d0@forums-1-dub> <40889a0f$1@forums-1-dub> <4088db64@forums-2-dub> <40891b39$1@forums-1-dub> <408dbb83@forums-1-dub> <408debef$1@forums-1-dub>
Subject: Re: how to let dropdownlistbox to be owner-drawed?
Lines: 14
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 221.216.3.170
X-Original-NNTP-Posting-Host: 221.216.3.170
Message-ID: <408e04e7@forums-1-dub>
Date: 26 Apr 2004 23:59:51 -0700
X-Trace: forums-1-dub 1083049191 221.216.3.170 (26 Apr 2004 23:59:51 -0700)
X-Original-Trace: 26 Apr 2004 23:59:51 -0700, 221.216.3.170
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7890
Article PK: 735164

sorry, there are some problems to express myself in english.

i want to inherit from a standard DropDownListBox, not the same as the
sample code from http://www.xs4all.nl/~onkie/pbtip020.html.
the sample code use createwindowex in its constructor event, therefore, it
has to provide other methods to accesss the data.
i only want to paint the items myself, users can still think they are use a
standard control.
but in the inheritor, SetWindowLong(...+CBS_OWNERDRAWFIXED) can't work. and
the pbm_drawitemstructor can't be fired too.
in a word, inherit from a standard dropdownlistbox, how to paint the list
items myself?


Philip Salgannik Posted on 2004-04-27 13:41:12.0Z
From: "Philip Salgannik" <philemaxNOSPAM@comcast.net>
Newsgroups: sybase.public.powerbuilder.objects
References: <408879d0@forums-1-dub> <40889a0f$1@forums-1-dub> <4088db64@forums-2-dub> <40891b39$1@forums-1-dub> <408dbb83@forums-1-dub> <408debef$1@forums-1-dub> <408e04e7@forums-1-dub>
Subject: Re: how to let dropdownlistbox to be owner-drawed?
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: h005018067b6f.ne.client2.attbi.com
X-Original-NNTP-Posting-Host: h005018067b6f.ne.client2.attbi.com
Message-ID: <408e62f8$1@forums-1-dub>
Date: 27 Apr 2004 06:41:12 -0700
X-Trace: forums-1-dub 1083073272 24.34.95.76 (27 Apr 2004 06:41:12 -0700)
X-Original-Trace: 27 Apr 2004 06:41:12 -0700, h005018067b6f.ne.client2.attbi.com
X-Authenticated-User: pbtenbeta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7891
Article PK: 735163

Use a datawindow instead.

--
This is a FAQ, read Help, then search
www.groups.google.com/advanced_group_search

pbm_thisusuallydoesnothelp:-))
Philip Salgannik

"incats" <wany@163.net> wrote in message news:408e04e7@forums-1-dub...
> sorry, there are some problems to express myself in english.
>
> i want to inherit from a standard DropDownListBox, not the same as the
> sample code from http://www.xs4all.nl/~onkie/pbtip020.html.
> the sample code use createwindowex in its constructor event, therefore, it
> has to provide other methods to accesss the data.
> i only want to paint the items myself, users can still think they are use
a
> standard control.
> but in the inheritor, SetWindowLong(...+CBS_OWNERDRAWFIXED) can't work.
and
> the pbm_drawitemstructor can't be fired too.
> in a word, inherit from a standard dropdownlistbox, how to paint the list
> items myself?
>
>


incats Posted on 2004-04-23 09:12:56.0Z
From: "incats" <wany@163.net>
Newsgroups: sybase.public.powerbuilder.objects
References: <408879d0@forums-1-dub>
Subject: which eventid in PB will equal the WM_CTLCOLORLISTBOX?
Lines: 5
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Original-NNTP-Posting-Host: 221.216.152.112
Message-ID: <4088de14@forums-2-dub>
X-Original-Trace: 23 Apr 2004 02:12:52 -0700, 221.216.152.112
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 23 Apr 2004 02:12:53 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 23 Apr 2004 02:12:56 -0700
X-Trace: forums-1-dub 1082711576 10.22.108.75 (23 Apr 2004 02:12:56 -0700)
X-Original-Trace: 23 Apr 2004 02:12:56 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7883
Article PK: 735156

some artice says, when dealing message WM_CTLCOLORLISTBOX, the listbox
handle of the dropdownlistbox can be get. but there only a pbm_ctlcolor. i
tested, and never triggered it.