I made a custom control derived from CWnd (a line chart) and I'm wondering if I can use CToolTipCtrl for displaying tool tips for points on the graph. If yes, how could I do that?
Btw, when I move my mouse over the point, the rectangle containg string with information about values of the point, should pop up.
...
i want to read a file which consists of 1's and 0's in each line, how do can i store a false in any bool variable after reading 0 from the file.
language c++
...
I'm using the Borland (AKA "Embarcodegearland") C++Builder 2007 compiler which has a minor bug that certain static const items from system header files can cause spurious "xyzzy is declared but never used" warnings.
I'm trying to get my code 100% warning free, so want a way of masking these particular warnings (note - but not by simply ...
Hi all,
I am having problems compiling the following snippet
int temp;
vector<int> origins;
vector<string> originTokens = OTUtils::tokenize(buffer, ","); // buffer is a char[] array
// original loop
BOOST_FOREACH(string s, originTokens)
{
from_string(temp, s);
origins.push_back(temp);
}
// I'd like to use this to repl...
Hi!
I'm actually working on an app to display an image onto a Dome.
The dome projection system is constitued of two projector and a pc running a GentoO Linux and KDE, with nvidia TwinView system.
Since here i've used SDL to display a fullscreen windows, and it display my app onto the two screen.
But i just figured that i need to proj...
Since Windows doesnt have a C++ locale with UTF8 support by default, i would like to construct a custom locale object which supports UTF8 (by creating it with a custom ctype facet).
How can i construct a locale object with a my own ctype implementation (i only found functions to construct a locale using an already existing locale as bas...
Why this isn't allowed:
int a = 0;
int a = 0;
but this is:
for (int i = 0; i < 2; ++i)
{
int a = 0;
}
As far as I know code inside for loop will be executed twice whitout actually going out of its scope, so it should also be an error to define a twice.
Looking forward to your answers
Thanks.
...
[DllImport(pathimportdll)]
static extern int InitiateSession(ref _SESSION_INFO sinfo, ref _DEVICE_INFO pDevInfo);
[DllImport(pathimportdll)]
static extern int StartAcquisition();
DLL functions are imported properly. After the call, application is asserting in tcscpy.inl with the message Expression: (L"Buffer is too small" && 0).
...
I want to ask you one question about SDI MFC application.
How can I repaint some area (region) on the view in SDI MFC application but without repaint complete view?
...
Hallo everybody,
Can someone help me out of my situation, im searching for a instrucior that implements the JMP (Jump) instructior like in Assembler. I've found out that it could be withe the goto function of Flex/Bison but i have no really idea how to do. Have got anyone idea. Im very grateful of yours help. Thanks.
Here is an example ...
In code below:
map<string,vector<int>> create(ifstream& in, const vector<string>& vec)
{
/*holds string and line numbers into which each string appears*/
typedef map<string,vector<int>> myMap;
typedef vector<string>::const_iterator const_iter;
myMap result;
string tmp;
unsigned int lineCounter = 0;
while(st...
So I am coding this client/server program. This code is from the client side. The client has an instance of an object
mpqs_sieve *instance_;
The reason I make it as a pointer is, that mpqs_sieve only has a constructor that takes 3 arguments, and I want to instantiate it at a later point in time.
The client first gets some data from t...
In Visual Studio 2008, the compiler cannot resolve the call to SetCustomer in _tmain below and make it unambiguous:
template <typename TConsumer>
struct Producer
{
void SetConsumer(TConsumer* consumer) { consumer_ = consumer; }
TConsumer* consumer_;
};
struct AppleConsumer
{
};
struct MeatConsumer
{
};
struct ShillyShallyPro...
Please tell me, how to include a javascript header file or javascript function in C++ code. The C++ code is written in Linux(UBUNTU)?
Although i need to perform the above action only, but let me tell u my purpose of doing it, as i am intending to implement CTI (Computer Telephony Integration) operation.
(Help will be appreciated) Than...
Is there any way I can expose a C++ object/function to JavaScript running inside the QtWebKit browser in Qt? It's possible to expose ActionScript objects to JS code running inside the WebKit browser in Adobe AIR - I'm looking for similar functionality in Qt.
...
I posted about this sort of earlier, but I am not sure how to post back to my original question as I can only comment or answer my own question.
Anyways, I need to get 4 links from a website, the latest stable build links for windows and linux, and the latest development build links for windows and linux (4 links total) within my C++ ap...
I'd need a class like std::auto_ptr for an array of unsigned char*, allocated with new[]. But auto_ptr only calls delete and not delete[], so i can't use it.
I also need to have a function which creates and returns the array. I came out with my own implementation within a class ArrayDeleter, which i use like in this example:
#include <...
I need to draw a dynamic overlay on a QImage. The component parts of the overlay are defined in XML and parsed out to a QHash<QString, QPicture> where the QString is the name (such as "crosshairs") and the QPicture is the resolution independent drawing. I then draw components of the overlay as they are needed at a position determined dur...
Are there any C++ libraries similar to Ncurses, but for Windows? It seems there are no ports of Ncurses and I need a really good display system like it.
Any suggestions? Cross-platform is a plus.
...
I'm having problems with low performance using a Windows named pipe. The throughput drops off rapidly as the network latency increases. There is a roughly linear relationship between messages sent per second and round trip time. It seems that the client must ack each message before the server will send the next one. This leads to very po...