I want to check that there is an interactive whiteboard or projecttor attached to the system. Actually I would like to check it is not there. (To be able to make different license levels.)
Is there any technique which could be sure?
Platform: MS Windows XP/Vista, MS Visual C++
...
Is there any way to easily make a HTTP request with C++, are there any libraries that do this. Specifically, I want to download the contents of a page (an API) and check the contents to see if it contains a 1 or a 0. Is it also possible to download the contents into a string?
Code samples would be good.
...
I am using MSXMl library to parse xml
after I call put_text and then get_xml
the output will have < & > converted to < & >
How can i get rid of this?
...
Hi, is there a WIN32 API available to manage folder sharing in Windows? Some links to examples will be helpful. Thanks.
...
I am doing a series of searches in a string, and somewhere along the line one of the strings will be missed, and my set of searches should fail.
I had expected that once the position reached std::string::npos it would stay there, but it does not. Passing std::string::npos to std::string.find seems to start the search at the beginning ag...
If I use try/catch in WindowProc override of MFC window/view classes there is a performance hit. Why is it so and what is the alternative ?
This I caught as a result of profiling. Removing the block makes the function consume much lesser time. I am using MS VS 2008.
...
Anyone knows how to do this programmatically? I looked at the registry keys but I couldn't find anything. I don't know maybe I missed it.
Under the registry key HKLM/Software/Microsoft/shell/cumulativecalltimers/line_0/ there are the values "OutgoingDataPhoneLifeTime" and "OutgoingDataPhoneLifeTimeNumCalls"; but these don't seem to be w...
I've read a few answers on here about reading Unicode files etc and most people point to UTF8-CPP or iconv.
None of the libraries that I found work for both ANSI and Unicode files, ideally I want one function which I pass a filename to and it will return the contents of that file and it won't matter what the encoding is, or is that not ...
Windows provides only GetTickCount up to Windows Vista and starting from that OS also GetTickCount64. How can I make a C program compile with calls to different functions?
How can I make a C compiler check whether a function is declared in the included header files and compile different portions of code depending on whether that particu...
Hello, i'm trying to convert std::string to float/double.
I tried:
std::string num = "0.6";
double temp = (double)atof(num.c_str());
But it always returns zero. Any another ways?
You could see debugger result in this screen:
...
I am using TWAIN in C++ and I am trying to set the DPI manually so that a user is not displayed with the scan dialog but instead the page just scans with set defaults and is stored for them. I need to set the DPI manually but I can not seem to get it to work. I have tried setting the capability using the ICAP_XRESOLUTION and the ICAP_YRE...
I’m suffering from an issue, may be the bug of Microsoft. While creating the XML documentation for a managed C++ project, the methods those have the List type parameter shows the error in help file which I had created using the sandcastle utility. The same work fine for C# project. I’ve tried to know the reason for this and compared the...
what strategy should i use if i have an implimentation of std::fstream with 32-bit std::streampos? If i want to move position i can do it in several steps(10gb - 10 times +1gb). How can i get position? Or should i keep current position in some variable outside fstream?
ps
i can't change the implimentation of stl.
...
Hello,
I have installed on my computer C++Test only with UnitTest license (only Unit Test license) as a Visual Studio 2005 plugin ( cpptest_7.2.11.35_win32_vs2005_plugin.exe ).
I have a sample similar to the following:
bool MyFunction(... parameters... )
{
bool bRet = true;
// do something
if( some_condition )
{
...
Hey folks!
I am diving into boost::spirit in order to parse a ASCII-based protocoll. I mananged to extract values from the line using rules like this:
rule<> Speed = uint_parser<unsigned int,10,3,3>()[assign_a(buffer.speed)];
I also succeed to connect these rules in a meaningful manner. What is missing for a perfect day is the follow...
I need a way for a single variable to represent two kinds of objects derived from the same base class.
It's kinda hard to describe but I'll try the best:
Say the base class:
class Rectangle
{
float w;
float h;
const float area() {return w*h;}
};
And the two derived classes:
class Poker : Rectangle
{
int style; // Diam...
What is the best Opensource FSM compiler which can generate c++ code ?
...
Hi,
probably a pretty simple question, just couldn't find anything useful with Google. :(
I have a simple unmanaged c++ project in Visual Studio 2008, and would like to add a description text. Right now I just see the name of the executable in task managers description column (processes tab), but I would like to provide my own text ther...
Does anyone know what the command line option is to generated a preprocessed file using bcc32.exe (version 5.6.4)? I know that using gcc you can use -E to generate .i files.
...
Hi,
I can't draw a pattern with a transparent background. This is my snippet :
bitmap.CreateBitmap(8, 8, 1, 1, &bits)
brush.CreatePatternBrush(&bitmap)
hbrush = pCgrCurrentDC->SelectObject(&brush);
// set text color
TextCol = pCgrCurrentDC->SetTextColor(CgrColourPalRGB);
int oldBkgrdMode = pCgrCurrentDC->SetBkMode(TRANSPARENT);
//dr...