I have to draw a String on a transparent bitmap at first, then draw A to destination canvas.
However on certain case, there is black border around the characters.
Bitmap* tempImg = new Bitmap(1000, 1000, PixelFormat32bppARGB);
Graphics tempGr(tempImg);
tempGr.Clear(Color(0, 255,255,255));
Gdiplus::SolidBrush* brush = new SolidBrush(Colo...
I have a Windows console application written in C++ and want to hide/remove the complete title bar of the console window, including the close, min/max controls etc. I searched a lot but didn't found anything useful yet.
I inquire the console HWND with GetConsoleWindow and tried to change the console window style with SetWindowLong by r...
Hi,
I have created some QLabel type of widgets in QT, and added that to a QToolbar. I want to highlight the particular widget which is under the cursor. I am unable to understand how do I do that. Can somebody please help ? I need this information on QT 4.
Thanks.
...
In Visual Studio, I have two C++ projects - Gui.vcproj and Dll.vcproj.
Gui is an application and Dll produces a DLL.
What's the best way to make the dependency resolution automatic?
I tried adding Dll.vcproj into Gui.vcproj's references, but it doesn't seem working.
...
Maybe I should still be in bed. I woke up wanting to program. At any rate, now I'm getting some linker errors that I'm baffled over. What do you make of all this? I hope I'm not posting too much of it. I was going to post just a piece, but that didn't feel right. I checked some of the header files mentioned in the errors, but I didn't se...
I'm working on a project that already has a C++ base. I would like to have a plug-in for some natural language processing. I really like GATE but I'm not sure if it's worth launching the JVM and splitting the project into C++ and Java portions. I noticed UIMA has a C++ framework, but have not tried it but seems to have less features t...
Disclaimer: I tried to search for similar question, however this returned about every C++ question... Also I would be grateful to anyone that could suggest a better title.
There are two eminent loop structure in C++: while and for.
I purposefully ignore the do ... while construct, it is kind of unparalleled
I know of std::for_each and...
I am creating a open-source C++ library using Visual Studio 2005. I would like to provide prebuilt libs along with the source code. Are these libs, built with VS2005, also going to work with newer versions of Visual Studio (esp VS Express Edition 2008)? Or do I need to provide separate libs per VS version?
...
Actually I've a problem with compiling some library with intel compiler.
This same library has been compiled properly with g++.
Problem is caused by templates.
What I'd like to understand is the declaration of
**typename** as not template function parameter and variable declaration inside function body
example:
void func(typename so...
I try to do the following:
QList<QString> a;
foreach(QString& s, a)
{
s += "s";
}
Which looks like it should be legitimate but I end up with an error complaining that it cannot convert from 'const QString' to 'QString &'.
Why is the QT foreach iterating with a const reference?
...
On occasion I've seen some really indecipherable error messages spit out by gcc when using templates... Specifically, I've had problems where seemingly correct declarations were causing very strange compile errors that magically went away by prefixing the "typename" keyword to the beginning of the declaration... (For example, just last w...
Storing objects in heterogeneous vector with stack-allocated objects
Hello,
Say I have an abstract class CA, derived into CA1, CA2, and maybe others.
I want to put objects of these derived types into a vector, that I embbed into a class CB. To get polymorphism right, I need to store a vector of pointers:
class CB
{
std::vector <C...
I am using some macro in my source file (*.c ) .
Is there any way during compilation or from the library that I can identify the exact header file from which this particular macro is getting resolved ?
The issue is we are using a macro #defined to 10 in some header file, but the value being received in the code is 4 . So instead of g...
Is there a way to show an Internet Explorer instance/frame inside a Qt Widget? I need to show a web page in my application (just show, no need for interaction), and while I read about WebKit for Qt, I'd like to know if there is another way without it, since I'm trying to keep the application as small as possible, and it would make me ver...
Hi,
I couldn't find an answer but I am pretty sure I am not the first one looking for this.
Did anyone know / use / see an STL like container with bidirectional access iterator that has O(1) complexity for Insert/Erase/Lookup ?
Thank you.
...
I'm work on a build tool that launches thousands of processes (compiles, links etc). It also distributes executables to remote machines so that the build can be run accross 100s of slave machines. I'm implementing DLL injection to monitor the child processes of my build process so that I can see that they opened/closed the resources I ...
Hello,
I have not many experience in such language as C# so I would be pleased if you guys could help me. I wrote this method in C++ using MPIR library:
mpz_class SchnorrProtocol::getX(const mpz_class& r) const
{
mpz_class x;
mpz_powm(x.get_mpz_t(), this->params_.getBeta().get_mpz_t(), r.get_mpz_t(), this->params_.getP().get_mp...
I have a large codebase that uses a number of unsafe functions, such as gmtime and strtok. Rather than trying to search through the codebase and replace these wholesale, I would like to make the compiler emit a warning or error when it sees them (to highlight the problem to maintenance developers). Is this possible with GCC?
I already...
I am working on a project where I want users to be able to modify and customize as much as possible.
Open source might be a good choice but not due to the fact that I want to keep a few internal classes closed.
Two other options that I thought about were plug-ins as external libraries and Lua scripting.
The problem with libraries (DLL...
LessonInterface
class ILesson
{
public:
virtual void PrintLessonName() = 0;
virtual ~ILesson() {}
};
stl container
typedef list<ILesson> TLessonList;
calling code
for (TLessonList::const_iterator i = lessons.begin(); i != lessons.end(); i++)
{
i->PrintLessonName();
}
The error:
Description...