473,324 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Scrollbar of a CComboBox

Hi,
I'd like to know if there's a way to subclass the scrollbar of a CComboBox
control?

Thanks in advance,
David
Nov 17 '05 #1
8 1305
"Seko" <da***@aquilanet.hu> wrote in message
news:1109524585.d57822b3dc23e9042895ac1b5817f74a@t eranews...
Hi,
I'd like to know if there's a way to subclass the scrollbar of a CComboBox
control?


No.
--
Jeff Partch [VC++ MVP]
Nov 17 '05 #2
Can you please explain, why not? :-(
Nov 17 '05 #3
"Seko" <da***@aquilanet.hu> wrote in message
news:1109527821.c7e51863a9dd69f073a8302d9c42d333@t eranews...
Can you please explain, why not? :-(


Because a window scrollbar is not a window itself.
--
Jeff Partch [VC++ MVP]
Nov 17 '05 #4
Is there no way of making it a window?
It should have a handle, no?
Nov 17 '05 #5
> Can you please explain, why not? :-(

Some scrollbars are windows and some are not. If you create a window with
the WS_HSCROLL or WS_VSCROLL styles then that window gets "standard"
scrollbars that are not separate controls, they are just part of the
non-client portion of the window that contains them. This is the case for a
combobox.
Nov 17 '05 #6
So, there's totally no way of accessing the scrollbars, and therefore no way
to perform any custom-drawing on them?
How are XP styles handled, giving those scrollbars a whole different look
than the standard, then?

"Mike Martin" <no****@nowhere.com> wrote:
Ot**************@TK2MSFTNGP14.phx.gbl...
Can you please explain, why not? :-(


Some scrollbars are windows and some are not. If you create a window with
the WS_HSCROLL or WS_VSCROLL styles then that window gets "standard"
scrollbars that are not separate controls, they are just part of the
non-client portion of the window that contains them. This is the case for
a
combobox.

Nov 17 '05 #7
Seko wrote:
So, there's totally no way of accessing the scrollbars, and therefore no way
to perform any custom-drawing on them?
How are XP styles handled, giving those scrollbars a whole different look
than the standard, then?

It is handled by (I think) the WM_NCPAINT code for the listbox window that
goes with the combo box.
Nov 17 '05 #8
>> So, there's totally no way of accessing the scrollbars, and therefore
no way to perform any custom-drawing on them?
There is. Catch combobox's WM_NCPAINT and play with it as you wish.
How are XP styles handled, giving those scrollbars a whole different
look than the standard, then?

JW> It is handled by (I think) the WM_NCPAINT code for the listbox
JW> window that goes with the combo box.
Rather by DefWindowProc, I think.

--
Serge
Nov 17 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Sujan | last post by:
Hello all, Is it possible to remove scrollbar(s) without using frames. Is there any code which could be applied in body tag to remove scrollbar(s). Thanks in adv, Sujan
4
by: Price Brattin | last post by:
I dragged a datagrid onto a VB.Net WinForm and used the properties page and a few lines of code to set it up, including the DataSource. No wizard setup was used. It works fine except for one...
9
by: kjs | last post by:
Is there any was to control the color of the scrollbars when using the 'overflow: scroll' attribute? TIA, Karl
0
by: h-h | last post by:
BODY { scrollbar-face-color: #f5f5f5; scrollbar-highlight-color: #666666; scrollbar-shadow-color: #666666; scrollbar-3dlight-color: #ffffff; scrollbar-arrow-color: #666666;...
1
by: Shun | last post by:
Hello, How to the add a blue color scrollbar to the browser Left and bottom. Thanx Shun
2
by: kurt sune | last post by:
How do I render the scrollbars by CSS in a listbox? I have understood that an asp listbox gets rendered as a select element. So I tried first by adding a style element: ..TA...
0
by: anansi | last post by:
Hi Im using MFC (visual studio 2005), I want to create a table, so to speak, of two columns. the first column is a list of strings, and the second column is a respective combo box. This happens to...
3
by: nicky77 | last post by:
Hi, before you say it i know frames are bad practice - but i'm developing dynamic content on a site which has already been designed, so alas there's no option but to use them. Anyway, I just want to...
1
by: Tom | last post by:
First, I posted a similar request for help in another group and now don't find the posting. Problem with my newsreader perhaps ... but apologies if this appears as a cross posting. My code is...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.