|
Thanks for reply..I want to change color of small box which is reside in my dialog box ( Picture control )..ITs showing me whole dialog box back groung color (not Small box ( picture control).
Any suggestion..How to change Backgroung color of Picture control box ?
Shah
|
|
|
|
|
H
Shah Satish wrote: How to change Backgroung color of Picture control box ?
So, you want to have a picture-control on the dialog, which displays the background color of the dialog?
The same color the dialog is alredy showing? Odd!
What is the picture control to begin with?
A CBitmapButton?
Well your PictureControl probably wants a bitmap, wo create one with the background color brush and set it as bitmap in the control.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Yeh..In my dialog box,There are two small box..One is text control and second one is Picture control..Picture control box is showing preview of my Autocad file(dwg file)..Here Backgroing color is White and Color of the drawing is black..
I changed by your method but here its changinf color of whole dialog box but not Picture control box.
Shah
|
|
|
|
|
Shah Satish wrote: Picture control box is showing preview of my Autocad file(dwg file).
Who, I mean what code, is rendering the dwg-file?
Most probably this code has a setting to set the background-color of its rendering?
You can also subclass the control and in the derived class handle WM_ERASEBKGND .
There you use the background-colored brush to erase the background.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
You can use of
pDC->SetTextColor( m_clrText );
pDC->SetBkColor( m_clrBkgnd );
return m_brBackground;
On the WM_CTLCOLOR
|
|
|
|
|
Dear Sir,
My Object is to do some things automatically, without using a mouse.
I need when the focus is in my ComboBox control, to drop down directly this control to show me all item inside it.
What to do to drop down a Combox Box with codes without using mouse
|
|
|
|
|
can't the user do Alt+downArrow ?
|
|
|
|
|
Thanks,
I don't need to use mouse or keys.
Programmatically what codes to write.
For example after writting this :
CFlatComboBox* cana = (CFlatComboBox*) GetDlgItem(IDC_analyse);
What to do sothat this control show all items inside it ?
|
|
|
|
|
then how does the Combo get the focus ?
|
|
|
|
|
Thanks,
I suppose that I have before sent focus to that control writting this;
CWnd::PostMessage( WM_COMMAND, MAKELONG( IDC_analyse, BN_SETFOCUS ) );
|
|
|
|
|
ok. then i have a design question for you. why do you use a GUI if the user cannot interract with it ?
|
|
|
|
|
I suppose that I am in my first control, when I lost focus there I write codes that you have seen. And when I arrive in my second control that is ComboBox, I prefere to show directly all items inside. That's my wish
|
|
|
|
|
...and how can the user select something in the comboBox List if he has no keyboard nor mouse ?
ps: you didn't answer my question, that was what is the need of having a graphical user interface if the user cannot interact on it ?!
|
|
|
|
|
Dear Sir, I used Access 5 years, and in Access, I had done it (forms!article!Modifiable1.dropdown).
That why I think that. When the focus arrive in my ComboBox, it's possible to show directly all items inside it.
If It's not possible in this language, I accept it.
|
|
|
|
|
you still don't answer my question because you're blind with whqt you have in mind.
yes it is possible in C++ (thanksfully, you can do anything in C++) and the answer has already been given.
but my question is not that, and I wont repeat it thrice. reread it, understand it, and answer only then.
|
|
|
|
|
mikobi wrote: When the focus arrive in my ComboBox, it's possible to show directly all items inside it.
Yes, but you're still going to need to use the mouse or keyboard to make a selection.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Besides toxcct's questions you should keep in mind that the Windows GUI is an event driven thing. This means that everything that happens is a reaction of smoe kind of user input.
What seems to be puzzling us is that you want things to happen without such user input.
For instance, what triggers any control in your form to loose focus, or get focus for that matter? And then again like toxcct said, what's the point of dropping down a combo if the user's not supposed to select anything?
It seems like you haven't really thought this through, or you have to describe what you're trying to do further. But, judging from the level of expertise in your questions I would bet on the former.
N.B. the above is not meant to be offensive, just trying to help you helping yourself.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
mikobi wrote: CFlatComboBox* cana = (CFlatComboBox*) GetDlgItem(IDC_analyse);
cana->ShowDropDown();
|
|
|
|
|
Thanks a lot Sir; Your are right.
ShowDropDown()
I test it; it's work very well.
Thanks all for your help.
|
|
|
|
|
VC ++ 2005
private: System::Void comboBox1_Enter(System::Object^ sender, System::EventArgs^ e) {
comboBox1->DroppedDown=true;
}
|
|
|
|
|
Hey guys,
I was wondering if u can have a user defined type such as:
public enum Pizza { SMALL = 5.99, M = 7.99, L = 9.99 };
I am not quite sure if you can declare double variables inside the Pizza type?
I believe someone can help
|
|
|
|
|
Enum values are always integers.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
nope ; internally, enum s are actually int s
|
|
|
|
|
|
Dear Sir, my problem have not solution up to now.
For example; my button have IDC_Button identifier,
I want that if values on two edit controls are equals, automatically there is a click on my button to confirm the result.
What to do it ?
|
|
|
|