I'm having a rather perplexing problem with the Escape key handler on a dialog box in Borland C++ Builder 5. Are there any other requirements for the Escape key to fire a cancel event (other than those I've listed below)?
The "Cancel" button (a TBitBtn) has its Cancel property set to true.
The "Cancel" button has its Default property ...
I've been extensively using smart pointers (boost::shared_ptr to be exact) in my projects for the last two years. I understand and appreciate their benefits and I generally like them a lot. But the more I use them, the more I miss the deterministic behavior of C++ with regarding to memory management and RAII that I seem to like in a prog...
I want to create a header file for C, C++ which is specific to help in randomization.
...
I'm trying to build a Vista Credential Provider. I have a field whose type is CPFT_SMALL_TEXT. I would like to put a multiline string into this field, but it keeps getting cut off part way through with an ellipsis appended at the break. How can I avoid this and get my multiline string to show up?
...
Suppose I have some per-class data: (AandB.h)
class A
{
public:
static Persister* getPersister();
}
class B
{
public:
static Persister* getPersister();
}
... and lots and lots more classes. And I want to do something like:
persistenceSystem::registerPersistableType( A::getPersister() );
persistenceSystem::registerPersistableTy...
What is the proper way to cast from an 'OLE_HANDLE' to an 'HICON' for an x64 target build?
In particular with a normal C-Style cast, I get this warning when compiling with an x64 config:
warning C4312: 'type cast' : conversion from 'OLE_HANDLE' to 'HICON' of greater size
Here is the offending code:
imgList.Add((HICON)ohIcon);
The a...
I'm working with a group of other programmers on an open source project built using C++ and Qt.
Now, we need a naming convention for widgets (and other variables generally) to use it as a standard in all of our code so that, the code gets better readability and we get better coordination between programmers.
Any advice?
EDIT: Am not t...
Hi, I am pretty much a classified beginner programmer, messing in a few languages. I know basic C# from a principle and paradigm point of view. My question is where do go from here?
Should I try out other languages, should I delve deeper into C#, learn C/C++/Ruby/Python, should I learn more about programming in general (OOP and Function...
I am not able to understand the differences between std::string and std::wstring. I know wstring supports wide characters such as Unicode characters. I have got the following questions:
When should I use std::wstring over std::string?
Can std::string hold the entire ASCII character set, including the special characters?
Is std::wstring...
In a way following on from reading a windows *.dmp file
Having received a dump file from random customer, running the debug session to see the crash, you often find it is in a MS or other third party library. The next issue is that you may not have knowledge of the PC setup to such an extent that you can ensure you have the actually mo...
I'm coming from a web-development background and I am wondering how I would make a learning algorithm in Java/C++. Not so much the algorithm part, but making the program "remember" what it learned from the previous day. I would think something like saving a file, but I suspect their might be an easier way. Apologies if this question is j...
I am trying to return an array Data Member from one smaller 2D Array Object, and trying to insert the array into a larger 2D array object. But when attempting this, I came into two problems.
First problem is that I want to return the name of the 2D array, but I do not know how to properly syntax to return 2D Array name.
This is what my...
Hi Guys,
I am working on project in Linux which involves
1) Static Lib in C++
2) GUI developed in C++/QT which uses static lib.
Now both the lib and gui are build from command prompt using makefiles.
I am trying to debug both like when I hit one button, call should go from GUI to lib.
Is it possible to do like this in Linux with ecli...
Is there any Visual Studio add-on (or windows/unix stand-alone program) that creates stub implementations in the cpp file for the functions (including class member functions) that are defined in the header file?
...
I occasionally need to process a large amount of data from one package off the network, which takes sufficiently long that when the user tries to interact with the application windows adds the "(Not Responding)" string to the window title. I am aware this is because the processing is being done within a call to handle a message (some way...
I was wondering about what makes the primary Java compiler (javac by sun) so fast at compilation?
..as well as the C# .NET compiler from Microsoft.
I am comparing them with C++ compilers (such as G++), so maybe my question should have been, what makes C++ compilers so slow :)
...
i want to do this simple piece of code work.
#include <iostream>
#include <windows.h>
void printSome (int i)
{
std::cout << i << std::endl;
}
void spawnThread (void (*threadName)(int i))
{
CreateThread
(
0, // default security attributes
0, // use default stack s...
Why does the following code NOT give an error, nor any type of a warning about an implicit conversion?
std::wstring str = L"hi";
if(str[0] == 'h')
cout<<"strange"<<endl;
The proper normal code is:
std::wstring str = L"hi";
if(str[0] == L'h')
cout<<"strange"<<endl;
Compiler: visual studio 2005
Warning level: level 4 (hi...
Is there something available that could help me convert a XSD into SQL relational tables? The XSD is rather big (in my world anyway) and I could save time and boring typing if something pushed me ahead rather than starting from scratch.
The XSD is here if you want to have a look. It's a standardized/localized format to exchange MSDS.
...
I have ~2 years of experience in Java programming, and it is basically the first programming language I have made serious and intensive use of. Currently, I need start switching to C++ for some assignments I have. Up until now I have been very comfortable with Java, and it's concepts made lots of sense to me.
Just off the top of my head...