|
Yeah. Because when I exclude the resource file from the project, everything works as expected. As soon as I add a resource file (even an empty one) it starts doing that.
Edit: By empty I mean that no icons, bitmaps et cetera are in the resource, the file itself contains the default text.
modified 30-Jun-12 11:46am.
|
|
|
|
|
Never seen that before, I can only assume there is some corruption elsewhere on your system. Looking at some of the Google finds for that Link error I noticed a number that suggested either a system restore, or the use of a special recovery tool or both. you may wish to research some of those suggestions yourself. As a last resort you can always try the Microsoft Development Q&A - I don't have the address but I have used it in the past and got some useful feedback.
|
|
|
|
|
You know the dsp and dsw files are just text and can be edited to clean up a project? Could be you have some ting bad in one of them from what you are saying.
|
|
|
|
|
Hi Forum,
i try to open a *.chm File with a HtmlHelp() API this part works if i want to go to specific topic this all works fine.
I have a problem if i want to open my *.chm file with a HH_DISPLAY_SEARCH option.
I open my file and the "search" tab is selected, but search routine is not started?
On MSDN site http://support.microsoft.com/kb/241381[^] says that this don't work yet.
Does any one know a alternative for this?
Or is there any way to do this with hh.exe and "mk:@MSITStore:"??
Thanks for Help
bosfan
|
|
|
|
|
solved
|
|
|
|
|
typedef std::set<int> _OWN_TYPE;
_OWN_TYPE s;
int n = 10;
while(n--)
s.insert(n);
std::copy(s.begin(), s.end(), std::ostream_iterator<int>(std::cout, "\t"));
std::cout << std::endl;
cout << typeid(_OWN_TYPE::iterator).name() << endl;
std::vector<_OWN_TYPE::iterator> vec;
Now I'm confused about how to put the interator in [s.begin(), s.end()] into vec by one line code(I would prefer it occur in the construction of vec).
I don't want to use the following code, it's redundancy :
for (_OWN_TYPE::iterator itr = s.begin(); itr != s.end(); ++itr)
{
vec.push_back(itr);
}
Any one can help me?
|
|
|
|
|
|
No, it doesn't help.
What I want to do is put the iterator of std::set<int> s to std::vector ...
Thank you all the same!
|
|
|
|
|
you want to copy the std::set to a std::vector ?
just use something like :
std::vector<_OWN_TYPE::iterator > vec;
std::copy(s.begin(), s.end(), std::back_inserter(vec));
Watched code never compiles.
|
|
|
|
|
Your code can't compile...
Thank you for you reply.
|
|
|
|
|
How about abstracting the construction into a function as it's hard to grab the extra level of indirection using a vector constructor or an algorithm:
std::vector<std::set<int>::iterator> build_index( const std::set<int> &s )
{
std::vector< std::set<int>::iterator > index;
for( auto iter( s.begin() ); iter != s.end(); ++iter )
{
index.push_back( iter );
}
return index;
}
int main()
{
int set_initialisers[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
std::set<int> s( std::begin( set_initialisers ), std::end( set_initialisers ) );
std::vector< std::set<int>::iterator > index( build_index( s ) );
} It's not that inefficient in C++98 as it'll probably trigger NRVO and in C++11 it'll use the move constructor for vector.
|
|
|
|
|
Thank you very much!
It does work. You are great!
|
|
|
|
|
Be very careful about using this sort of thing - as others have mentioned it's probable that your design isn't quite what you think it is (for example setting things of multiple types through an interface).
Good luck though and nice to see someone actually using <algorithm> in their work!
|
|
|
|
|
Another question, I have to use std::sort like this:
bool func(set<int>::iterator lhs, set<int>::iterator rhs)
{
return *lhs > *rhs;
}
|
|
|
|
|
Another question, I have to use std::sort like this?
bool func(set<int>::iterator lhs, set<int>::iterator rhs)
{
return *lhs > *rhs;
}
sort(vec.begin(), vec.end(), func);
How can I use
std::copy(vec.begin(), vec.end(), std::ostream_iterator<<big>???</big>>(std::cout, "\t"));
|
|
|
|
|
It is posible to change the style of a CComboBox control from CBS_DROPDOWN to CBS_DROPDOWNLIST on runtime ?
I've tried with ModifyStyle and ModifyStyleEx and doesn't work ...
|
|
|
|
|
Your question is a bit vague...
Of course you can do it at run-time, just create the CComboBox by hand. Then you can set it when you call CComboBox::Create() . If on the other hand, you mean can you change it after you've created the CComboBox , not sure, but do you really need that capability?
|
|
|
|
|
Thank you for your answer, I realise that I thought wrong the program ... I have not create CComboBox control dinamically (with Create), I put it on a dialog, setup manually the style (CBS_DROPWDOWN), and I was wonder if some condition is true, to modify the style on InitialUpdate ...
|
|
|
|
|
Some combobox styles cannot be altered at runtime.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
If you're going to do it on InitialUpdate() , then create it dynamically (using CComboBox::Create() ).
|
|
|
|
|
Thanks all for your answers, but as while I have some request, that result that I thought the program in wrong way ... anyway, is a good your ideea, Albert, in case that I need it !
|
|
|
|
|
Even if you create it manually, there is not guaranty that the style can be change after it is created.
Watched code never compiles.
|
|
|
|
|
But he says he has to change it on the initial update... which means he only changes it once based on something, so creating it dynamically should work for him.
|
|
|
|
|
Hi,
I have a derived CAsyncsocket class in a member of my CWinThread Class
"I am trying to have each socket connection run in its own thread"
I am trying to have four threads for four connections
in the ::InitInstance of the CWinthread I get an exception in the CAsynSocket:: create
method My question is is the socket object completly created by the time it hits the
Initinstance of the CWinthread its living in
thanks
|
|
|
|
|
The CAsyncSocket class and the CWinThread class you put it in have little to do with each other by default, when it gets created depends on where you put it. You have to show us your code for us to be able to be more helpful with your issue.
Don't forget you have to call Create() on the socket class to actually create a socket.
http://msdn.microsoft.com/en-us/library/3d46645f%28v=vs.80%29.aspx[^]
|
|
|
|