Solved

How to change the attributes of a ComboBox in BC++ 5.0 ?

Posted on 1997-02-19
1
267 Views
Last Modified: 2013-12-04
When i do something like that :

TMyComboBox * Combo=new TMyCombobox(0,ID_MyCombo, 0, 0, 180, 150, SMAX);
Combo->Attr.Style &= ~WS_TABSTOP;

Control=new TControlGadget(*Combo);
ControlBar->Insert(*Control);

//ControlBar is a TControlBar pointer...

It make an Fatal error reading to adress XXX...
I've tried on the TMyComboBox constructor an on the SetupWindow function, but it do again the same error or it doesn't change anything...
Is there any other method to change those attributes ?

I need just to take off the WS_TABSTOP style ...

PS - Excuse-me for my english, i'm french !
0
Comment
Question by:Alexander
1 Comment
 
LVL 1

Accepted Solution

by:
edtmihu earned 70 total points
ID: 1298768
I tried in one of my apps. I also have a combobox in the controlbar. It works for me. I think the problem lies somewhere else.
However, another way of changing the style of a window is
SetWindowLong(...) and GetWindowLong(..)
For example:
DWORD dwStyle = GetWindowLong( *Combo, GWL_STYLE );
dwStyle &= ~ WS_TABSTOP;
SetWindowLong( *Combo, GWL_STYLE, dwStyle );
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

685 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