Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 1997-02-19
1
Medium Priority
?
274 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 140 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

916 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