|
TVN_BEGINLABELEDIT is a notification, which isn't the same as a message. The message in this case is WM_NOTIFY.
You'll probably want to use TVM_EDITLABEL[^].
modified 13-Sep-18 21:01pm.
|
|
|
|
|
Thanks Jones,
Now It's working.
Amrit Agrawal
|
|
|
|
|
Hi all,
can anybody please tell me how can i use the proxy settings in vc++ MFC Application?
thanks in advance.
|
|
|
|
|
|
this article use proxy settings of IE only what about other browsers?
|
|
|
|
|
I have extended a CComboBox and implemented three messages (or events) like below
BEGIN_MESSAGE_MAP(CComboCtrl, CComboBox)
ON_WM_KEYDOWN()
ON_CONTROL_REFLECT(CBN_EDITUPDATE, &CComboCtrl::OnCbnEditupdate)
ON_CONTROL_REFLECT(CBN_SELCHANGE, &CComboCtrl::OnCbnSelchange)
END_MESSAGE_MAP()
Now when a selection changes it calls OnCbnSelchange message-handler. I am using this class inside a dialog class. I have tried to register a message handler in that dialog class for CBN_SELCHANGE event but I think it is not receiving CBN_SELCHANGE event or it is sending that event to custom control. How can I handle CBN_SELCHANGE event inside a dialog class.
This is the implementation inside derived class (or custom control class)
void CComboCtrl::OnCbnSelchange()
{
GetLBText(GetCurSel(),m_str_sel);
}
|
|
|
|
|
It's a long time since I used MFC message maps, but it looks to me like you are capturing the CBN_SELCHANGE notification in your control, so the dialog box won't see it. I think you may need to move that notification to the dialog or reflect it back somehow. Pual Di Lascia wrote an excellent paper[^] on MFC message processing which I recommend to anyone struggling with this subject.
The best things in life are not things.
|
|
|
|
|
thanks Richard, you got the problem right. I am reading that article now.
|
|
|
|
|
Hi all,
How can i drag drop the PictureControl.
I have taken a picture control on my dialog and loading one bitmap.Now how can i drag drop that picture control
Thanks
Sharan
|
|
|
|
|
Please don't repost the same question - see my suggestions below.
The best things in life are not things.
|
|
|
|
|
Hi all,
How can i load a bitmap on dialog so that i can drag that bitmap using CImagelist.
Anyone having any idea please share with me.
Any links or any samples will be great
Thanks
Sharan
|
|
|
|
|
What do you mean by drag? If you are trying to move it to a different window then you need to implement drag and drop as described in some of these links[^]. If you just mean that you want to move the control around within its parent window then you just need to capture your mouse and redraw the control at whatever position the mouse takes you to.
The best things in life are not things.
|
|
|
|
|
Hi,
I am using multimap and key value can be duplicates.
I can find first key value using find() function.
But how to get next duplicate key value?
|
|
|
|
|
Which multimap implementation are you talking about?
|
|
|
|
|
I assume any standard compliant one will do.
Steve
|
|
|
|
|
I can see no standard compliance requirements in the original post, but your assumptions seem right.
|
|
|
|
|
multimap<string, string> mymap;
string strKey;
:
:
multimap<string, string>::iterator it;
:
it = mymap.find( strKey );
if(it != mymap.end())
{
do
{
cout << strKey << " = " << it->second << "\n";
it++;
}
while( it != mymap.upper_bound( strKey ));
}
|
|
|
|
|
This is inefficient. Why calculate the upper bound each loop?
Steve
|
|
|
|
|
cppreference.com
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Try something like this:
#include "stdafx.h"
#include <iostream>
#include <string>
#include <map>
void Go()
{
using namespace std;
typedef multimap<int, string> Tmm;
typedef Tmm::value_type TmmVal;
typedef Tmm::const_iterator TmmIt;
Tmm mm;
mm.insert(TmmVal(1, "One"));
mm.insert(TmmVal(1, "Single"));
mm.insert(TmmVal(2, "Two"));
mm.insert(TmmVal(2, "1+1"));
mm.insert(TmmVal(2, "Duo"));
mm.insert(TmmVal(3, "Three"));
pair<TmmIt, TmmIt> ip = mm.equal_range(2);
for (TmmIt it=ip.first; it!=ip.second; ++it)
{
cout << it->first << " : " << it->second << endl;
}
}
int main(int argc, char* argv[])
{
Go();
return 0;
}
Output is:
2 : Two
2 : 1+1
2 : Duo
Steve
|
|
|
|
|
I need to handle more than 1 lakhs entries inside a data structure.
I am thinking to use std::map becuase of ease of searching.
Is map can hold more than 1 lakhs entires? If not what data strucure should I use to perform fast search opeartion?
|
|
|
|
|
john5632 wrote: I am thinking to use std::map becuase of ease of searching.
Is map can hold more than 1 lakhs entires? If not what data strucure should I use to perform fast search opeartion?
yes map can hold such a large data-structure, does your computer has enough memory for same first, second you can check that yourself by writing small program
like:-
map<int,int> intMap;
for(int i=0;i<100000;i++)
{
intMap.insert(map<int,int>::value_type(i,i));
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
Hi all,
Can anyone suggest me,how can i drag and drop a bitmap on the dialog.
Actually i am loading a bitmap on OnPaint.How can i get the control of it so that i can move it accordingly...
Any example or any good links will be helpful
Thanks
Sharan
|
|
|
|
|
manju 3 wrote: Can anyone suggest me,how can i drag and drop a bitmap on the dialog.
for drag & drop, your control should support it. read more here :- Drag and Drop in a Dialog[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|