?
Solved

How to set CBS_OWNERDRAWFIXED style programmatically !

Posted on 2001-07-23
7
Medium Priority
?
666 Views
Last Modified: 2013-11-20
Hi,

How can I programmatically set the CBS_OWNERDRAWFIXED style of my derived combobox !

I have try to set it in the PreSubclassWindow function but it doesn't works.

In general, how to set all these styles when the combobox is created (CBS_HASSTRING, CBS_SORT, ...).

My class must have the CBS_OWNERDRAWFIXED style to work, and want to do this at creation without specifiying it in the resource.
0
Comment
Question by:mike_marquet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 12

Expert Comment

by:migel
ID: 6308048
Hi!
IMHO it isn`t possible since this style is 'creation time style' that is it takes action only when control have being created.
you can use ASSERT to inform user set needed style (in the PreSubclass.. method) or delete existing control and recreate new one with needed style.
0
 
LVL 12

Expert Comment

by:migel
ID: 6317442
Any comments??
0
 

Author Comment

by:mike_marquet
ID: 6317535
I think that there is no way to switch the CBS_SORT style without deleting control and recreating it ?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 49

Accepted Solution

by:
DanRollins earned 200 total points
ID: 6324004
In your derived class, override the Create fn. Copy the code from the MFC source code.  Set the styles you want there.

-- Dan
0
 
LVL 5

Expert Comment

by:Netminder
ID: 6805716
mike_marquet,

These questions are still open and our records show you logged in recently. Please resolve them appropriately as soon as possible. Continued disregard of your open questions will result in the force/acceptance of a comment as an answer; other actions affecting your account may also be taken. I will revisit these questions in approximately seven (7) days. Please note that the recommended minimum for an "Easy" question is 50 points.

http://experts-exchange.com/jsp/qShow.jsp?qid=11532221
http://experts-exchange.com/jsp/qShow.jsp?qid=11701138
http://experts-exchange.com/jsp/qShow.jsp?qid=11841838
http://experts-exchange.com/jsp/qShow.jsp?qid=11928102
http://experts-exchange.com/jsp/qShow.jsp?qid=11931818
http://experts-exchange.com/jsp/qShow.jsp?qid=11996498
http://experts-exchange.com/jsp/qShow.jsp?qid=11998538
http://experts-exchange.com/jsp/qShow.jsp?qid=12011459
http://experts-exchange.com/jsp/qShow.jsp?qid=12039459
http://experts-exchange.com/jsp/qShow.jsp?qid=20005590
http://experts-exchange.com/jsp/qShow.jsp?qid=20006135
http://experts-exchange.com/jsp/qShow.jsp?qid=20071202
http://experts-exchange.com/jsp/qShow.jsp?qid=20084832
http://experts-exchange.com/jsp/qShow.jsp?qid=20091412
http://experts-exchange.com/jsp/qShow.jsp?qid=20093693
http://experts-exchange.com/jsp/qShow.jsp?qid=20095151
http://experts-exchange.com/jsp/qShow.jsp?qid=20099190
http://experts-exchange.com/jsp/qShow.jsp?qid=20099158
http://experts-exchange.com/jsp/qShow.jsp?qid=20100338
http://experts-exchange.com/jsp/qShow.jsp?qid=20107694
http://experts-exchange.com/jsp/qShow.jsp?qid=20114039
http://experts-exchange.com/jsp/qShow.jsp?qid=20071199
http://experts-exchange.com/jsp/qShow.jsp?qid=20116007
http://experts-exchange.com/jsp/qShow.jsp?qid=20128382
http://experts-exchange.com/jsp/qShow.jsp?qid=20137131
http://experts-exchange.com/jsp/qShow.jsp?qid=20155355
http://experts-exchange.com/jsp/qShow.jsp?qid=20192497
http://experts-exchange.com/jsp/qShow.jsp?qid=20193603
http://experts-exchange.com/jsp/qShow.jsp?qid=20238400
http://experts-exchange.com/jsp/qShow.jsp?qid=20239471
http://experts-exchange.com/jsp/qShow.jsp?qid=20245231
http://experts-exchange.com/jsp/qShow.jsp?qid=20253153

EXPERTS: Please leave your thoughts on this question here.

Thanks,

Netminder
Community Support Moderator
Experts Exchange
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6821814
hi mike_marquet,

Do you have any additional questions?  Do any comments need clarification?

-- Dan
0
 
LVL 5

Expert Comment

by:Netminder
ID: 6822798
Admin notified of user neglect. Force/accepted by

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question