|
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
|
|
|
|
|
Hi Alok,
Thanks for your reply.I checked with that given demo.
If i am not wrong that demo is not for Bitmap.It will just droping the file path draged outside the dialog.
Actually i am loading a bitmap on the dialog,Then i need to select that bitmap and move accordingly with Mouse movement.
Thanks
Sharan
|
|
|
|
|
A simple Google search yields this[^].
The best things in life are not things.
|
|
|
|
|
Richard MacCutchan wrote: A simple Google search yields
google is cure for every programmer disease
"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
|
|
|
|
|
ThatsAlok google is cure for every programmer disease
Yeah that would be nice! But seriously, I continue to be amazed by the number of questions here where people just cannot be bothered to make a first attempt to research the background to their problem, but just post "How can I do ... ?". In most cases it takes less time to Google than it does to post a question.
The best things in life are not things.
|
|
|
|
|
Couldn't agree more. Apparently CP takes exception to me trying to 5 vote something more than once..
If I had a dollar for the number of times that a question could be answered simply by searching google for an exerpt of the original post, I'd 'work' from 9:30 - 11:30 in the morning and make more than I do currently!
|
|
|
|
|
The best things in life are not things.
|
|
|
|
|
right you say
"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
|
|
|
|