For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
I have 3 functions that do sorting on a CArray.
CArrays are declared in header file:
// Do sorting for m_Integer here
// DO sorting for m_String
// Do sorting for m_Double
Now what i want to do is, have one generic function and then pass the CArray to that.
So far what i did is,
in Header file:
void sortAll(CArray<void*,void*> m_Array);
in CPP file:
void sortAll(CArray<void*,void*> m_Array)
int size = m_Array.GetSize();
m_Array.GetAt(0); // Error here
The error is that, it needs a class type and not a void type.
I am not sure how to proceed with writing a generic function to handle all different data types in one.
Any help is welcome!
I need to work with callback functions between different classes. With VS2010 I have done this already different times without any problem.
With VS2015 I cannot compile such code!
in Header in Class Declaration:
bool ProvideItemData(int nItem, int nSubItem);
//using namespace std::placeholders; // for `_1`
m_ListCtrl.SetOwnerData(std::bind(&CBlockEditView::ProvideItemData, this, std::placeholders::_1));
declaration in called class:
bool SetOwnerData(std::function <bool(int nItem,int nSubItem)> callback);
When compiling in VS2010, I get weird error messages:
c:\program files (x86)\microsoft visual studio 14.0\vc\include\type_traits(1501): error C2440: 'return': cannot convert from 'std::_Unforced' to 'bool'1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\type_traits(1501): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\functional(210): note: see reference to function template instantiation '_Rx std::_Invoke_ret<_Rx,_Callable&,_Ty,_Ty>(std::_Forced<_Rx,false>,_Callable &,_Ty &&,_Ty &&)' being compiled
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\functional(208): note: while compiling class template member function 'bool std::_Func_impl<_Decayed,_Alloc,_Ret,int,int>::_Do_call(int &&,int &&)'1> with
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\functional(136): note: see reference to class template instantiation 'std::_Func_impl<_Decayed,_Alloc,_Ret,int,int>' being compiled
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\functional(339): note: see reference to class template instantiation 'std::_Is_large<_Myimpl>' being compiled
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\functional(318): note: see reference to function template instantiation 'void std::_Func_class<_Ret,int,int>::_Reset_alloc<_Ty,std::allocator<int>>(_Fx &&,const _Alloc &)' being compiled
I do not find any solution. So at the moment I do not have any idea, how to solve this issue!
1. I set tab order for control in a MFC dialog.
2. Started the application.
3. Clicked a button in dialog, whose tab order is 3.
4. A modal dialog displayed.
5. Closed the modal dialog.
Now the focus automatically moved to the control having tab order 0.
Since the focus was on the button just before the click, I would like to retain the selection on the same button.
I have a similar application (Win32 rather than MFC), but the focus stays in the correct place on return from the second dialog. I can only suggest you do some debugging to try to see what is happening under the covers.
I want to create an IDE which should have similar look and feel like Visual Studio itself.
For this I created a "Visual Studio Style" Project by usage of AppWizard.
Now I am wondering, how to implement "Windows Float" functionality?
What I mean exactely? e.g. when you look at Visual Studio's Solution Explorer window, there is a small down arrow in the title bar. When you click on it, a menue opens and you can change the window style to "float".
This feature I want to use instead of a non modal dialog, becaue this would be much more flexible.
Has anybody an idea, how to implement. Maybe it is also implement in the IDE Framework of the MFC, but I do not know how to activate??
How to use C to make a Mathematical / Statistical compiler for my final year project. i need help. Need someone that will put me through all the steps to achieve this project of mine. i havent actually seen any recent work on it. Thanks
Because most of the compilers that are being written are either commercial, such as for Visual Studio or are open source and mostly people think open source is a synonym for buggy.
The compilers are just the translators used to translate the language or framework in machine language (let us skip the byte code for moment), so you need to write a back-end code that actually translates the high-level code in a low-level code such as machine code or assembly language. For mathematical expressions, the term is known as Mathematics Parsers. Have a look at this thread and give a look at the answers.
Howdy, I'm not so sure I understand your question.
rgb(198,93,82) looks like This , while rgb(120,27,20) looks like This
Obviously, these 2 colours are not only very different in terms of their RGB values and their HSL values for that matter, but they also appear very different to anyone not unfortunate enough to be hit with R-G colour blindness. Aren't you actually telling us yourself that the colours appear differently?
Their pantone numbers are also very different, 180 U vs 1815 C
I can't help but wondering 3 things:
1) What is the format of the input in the text-file and the exact input that produces these colours?
2) How is this being transformed into a colour by your application?
3) What difference did you find when you stepped through the conversion process in your debugger in each of the versions of the application?
I'm not familiar with the conversion process between rgb <--> pantone to know if a small difference in precision could produce such a wildly different result, or if it's an integer-only process that could suffer from a signed/unsigned error. Showing the input and the way it results in a final colour could well help, though it may not.
"When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down 'happy'. They told me I didn't understand the assignment, and I told them they didn't understand life." - John Lennon
Last Visit: 31-Dec-99 18:00 Last Update: 4-Sep-15 22:21