Solved

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

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
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 video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

623 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