Solved

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

Posted on 1997-02-19
1
258 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now