|
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 ?
|
|
|
|
|
I guess the answers you got in your previous thread here[^] didn't help you.
mikobi wrote: automatically there is a click on my button to confirm the result
What do you mean by "automatically"?
You have to write code that verifies that the contents of the two edit controls are the same.
If the ID of your button equals IDC_SHOW , then you could "simulate" a click on the button by sending or posting a WM_COMMAND message to the window that contains the button, like this:
PostMessage( WM_COMMAND, MAKELONG( IDC_SHOW, BN_CLICKED ) );
-- modified at 9:49 Thursday 1st February, 2007
Added code example.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
Thanks for your reply, I wanted this code you send me.
I try it, it's work very well.
Thanks a lot
|
|
|
|
|
mikobi wrote: I try it, it's work very well.
That's nice, but why do you think that you cannot simply call the message handler directly like you were suggested by baerten in your previous thread and by David below?
Is it a threading issue, another window or what?
As I understand it you would check the contents of your two edit controls in a call chain originating from EN_CHANGE event handler for the edit controls. The most intuitive solution would be to call the event handler for the BN_CLICKED event of your button.
My point is that it's unnecessary to cross the river in order to fetch water.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
Dear Sir,
Thanks for your interesting to my idea.
I am in the same formView and in Edit change of my edit control I want to send a Clic on my button.
In previous reply, I did n't have exactly the code to write, but in your reply it's very clear for me.
If you found the next reply good for you can explain me clearly with clear codes.
Thanks
|
|
|
|
|
You can use of call message handler of button.
|
|
|
|
|
mikobi wrote:
I want that if values on two edit controls are equals, automatically there is a click on my button to confirm the result.
Why don't you just call the same function that your button-click handler would call?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|