|
This question is part logic and part functionality...
I'm not familiar with the combo box control, but want/need to use it.
I have several items in my combo box control (drop down list) and other controls in my dialog that depend upon what is currently selected.
I want my other controls to change when the user "really changes" an item in the drop down list. For example, upon leaving the drop down list, if the selection has changed from what it previously was, then change my other controls. If the user has scrolled through the list, but has left the selected item the same, then don't change my other controls.
In short, I need to know how to react to CComboBox upon exit.
Thanks,
Johnny
|
|
|
|
|
You need to handle the CBN_SELCHANGE notification message from the combobox. You must check, if the selected item is the same as before yourself.
Sonork 100.15206;PavelK
|
|
|
|
|
use the class wizard and add a handler for the CB_SELCHANGE message
-c
A man is like a rusty wheel on a rusty cart,
He sings his song as he rattles along and then he falls apart.
-- Richard Thompson
|
|
|
|
|
john john mackey wrote:
I need to know how to react to CComboBox upon exit.
This would suggest handling CBN_KILLFOCUS. However, its usually CBN_SELENDOK - sent when user selects something from dropdown list.
Are you using MFC?
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
Group,
thanks for quick reply. Yes, I'm using MFC and VC++6.0.
Here is my problem... when I get in my CComboBox control (drop down list), I can use the up/down arrows or cursor to move in my list.
However, I don't want the reaction by other buttons to happen until the CComboBox "no longer has focus AND the selection is different than when entered."
I have tried the following:
void CForceProtectDlg::OnSelEndOkCallSign()
{
//if (m_CallSignIndex != m_comboCallSign.GetCurSel())
// Reset(); // Reset other controls
}
void CForceProtectDlg::OnSetFocusCallSign()
{ // Get the index before changes happen
m_CallSignIndex = m_comboCallSign.GetCurSel();
}
void CForceProtectDlg::OnKillFocusCallSign()
{
if (m_CallSignIndex != m_comboCallSign.GetCurSel())
Reset();
}
None of these have given me the action I want. Stumped...
Johnny
|
|
|
|
|
Does anyone know how to auto increment the build and version info in VC6? Admittedly, I'm a little lazy when it comes to this sort of thing.
Thanks for any help.
Mark Donkers
A witty saying proves nothing.
-- Voltaire
|
|
|
|
|
Mark Donkers wrote:
Admittedly, I'm a little lazy...
Well looking down a few posts would have revealed the answer
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
|
Thanks... I did a search and didn't find anything. The wrong keywords I guess. Thanks.
Mark Donkers
A witty saying proves nothing.
-- Voltaire
|
|
|
|
|
Didnt get satisfying answer hence posted again!
Friends,
Am a windows programmer using MFC and visual c++ tool.Now the thing which is bothering me is .Net has come out and they say that applications can be created in a more Sophisticated and rapid way.Is is really true?How do you see the .Net platform from the application development angle.Will MFC and MFC functions be obsolete or dead in Visual Studio.Net??
Pls answer bit detailedly.
Thanks for reading.
waiting for ur answers.
Bye
|
|
|
|
|
BK Pradeep wrote:
Will MFC and MFC functions be obsolete or dead in Visual Studio.Net??
No. VS.NET ships with MFC 7.0.
Self-confident more you be must. Here to stay MFC is.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
MFC is here to stay! The .NET Frameworks relies on the whole C#, managed C++, language. MFC relies on C/C++. C# is weak! If you want to learn C#, you might as well learn VB. I would learn VB before learning C#.
Kuphryn
|
|
|
|
|
MFC is supported in VS.NET.
I thing the principal question is Win32 "unmanaged" software development (API,MFC,ATL,... You name it) versus .NET development.
.NET seems to bring more productivity, I like the component oriented approach and C#. It has some drawbacks - performance (VM, Garbage collector), it ties You to Microsoft more than before. And it's new, not proven and commonly spread. With current projects we can't use it with our customers - problems with sysadmins, older HW and SW.
.NET is pushed from Microsoft with great force, so it seems that we are going to program for it, like it or not. But the unmanaged programing is not yet overcomed and will continue to have it's use.
Sonork 100.15206;PavelK
|
|
|
|
|
Where can I find details on the differences between defining variables/functions public, protected and private in a class (or maybe someone can explain?).
John
|
|
|
|
|
Private: Only your class may access the variables/functions, your can't access then from outside the class
Public: Functions/variables can be accessed from both inside and outside the class
Protected: Functions/variables can only be accessed by the class and any classes derived from that one
Correct me if I'm wrong
modified 12-Sep-18 21:01pm.
|
|
|
|
|
In any C++ book worth the price of paper it's printed on
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
BUT, that would require me getting out of my chair to go get the book, and I would have to talk (*shudder*) to a fellow employee to get the book.
ROFLMAO
Yeah, dumb-ish question, I kind of knew the answer...but I guess I was hoping for something enlightening...
BTW its great how fast questions get answered here!
John
-----------------------
Try this: Look up at the cieling right about your head...your mouth is open isn't it?
|
|
|
|
|
John Uhlenbrock wrote:
I would have to talk (*shudder*) to a fellow employee to get the book
I wouldn't underestimate this option. Talking to people develops social skills
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
Tomasz Sowinski wrote:
...develops social skills
I for one dont get payed for social skills or developing them, rather for programming skills and developing applications
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
I get paid for being here. So I'm not against developing social skills.
STL is a religeon. Enquiries to Reverend Christian Graus
|
|
|
|
|
Andreas Saurwein wrote:
I for one dont get payed for social skills or developing them,
As everybody in this industry. However, the social skills may be helpful someday
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
My wife is happy with what she gets, what do I need more And if one day I need these pesky "social skills", well, I send her.
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
Andreas Saurwein wrote:
My wife is happy with what she gets,
Wife? Dude, think about yourself and lost possibilities
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
Tomasz Sowinski wrote:
lost possibilities
As I said, I am programmer, not playboy
With a wife a can spend more time in front of the computer.
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
John Uhlenbrock wrote:
BUT, that would require me getting out of my chair to go get the book
You can download a good C++ book.
Sonork 100.15206;PavelK
|
|
|
|