Solved

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

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
wordpress limitations 4 147
Problem to adjust sheet 1 96
Access 2013: API code to put hidden database icon in taskbar? 8 109
PL SQL Developer 7 90
This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…

752 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