I have a link. I have checked that the link is a valid URL through regular expressions. Now, I want to check if the link is a valid http link or not. i.e. it should not be a non-existing link.
Is there a way in VC++ 6.0 (MFC) to check that?
...
I am developing an application which uses the Math Input Panel that comes with Windows 7. The input panel allows users to draw math (using a pen or mouse device) and after recognizing the symbols it sends back MathML(xml).
However, I need to get the image of the recognized math as well. I am able to get a window handle for the input pa...
Hey there ,
since I've came from c# to c++ everything looks crazy for me in c++.
I just wondering If someone could explain me why do we have these kind of instantiating in c++ :
method 1:
ClassA obj1; // this is going to stack
method 2:
ClassA *obj1 = new ClassA(); //this is going to heap
whereas we don't have the common instantia...
I'm just getting stated with boost-test and unit testing in general with a new application, and I am not sure how to handle the applications initialisation (eg loading config files, connecting to a database, starting an embedded python interpretor, etc).
I want to test this initialisation process, and also most of the other modules in t...
There are two base classes have same function name. I want to inherit both of them, and over ride each method differently. How can I do that with separate declaration and definition (instead of defining in the class definition)?
#include <cstdio>
class Interface1{
public:
virtual void Name() = 0;
};
class Interface2
{
public:
...
I seeking solution for Windows first.
I need to add visual effects to screen image without breaking the interactivity of all and every controls, that are on this screen.
The solution can be straightforward:
1. take a screenshot
2. show this screenshot in a separate window, above other windows
3. apply the effect to image, being shown ...
Hi,
I am using a development environment with VS 2003 as IDE and Intel compiler as default compiler. I have to set Microsoft default compiler for compilation of my project. As I could not find where to set the compiler in VS 2003.
Thanks
Anil
...
I have following C++ code sample:
void SetVaArgs(const char* fmt, const va_list argList)
{
setlocale( LC_ALL, "C" );
// 1
m_FormatBufferLen = ::_vsnprintf(m_FormatBuffer, Logger::MAX_LOGMESSAGE_SIZE, fmt, argList);
setlocale( LC_ALL, "" );
//2
m_FormatBufferLen = ::_vsnprintf(m_FormatBuffer, Logger::MAX_LOGMESSAGE_SIZE, ...
Hello All,
I have a client - server application, where I want to add a exception to firewall so that my applications can communicate properly.
I want to add add an exception to the firewall (without changing the setup for the other firewalls options).
I am using Carbon, Qt, C++. However, I feel this has more to do with some install tim...
I am performing a scattered read of 8-bit data from a file (De-Interleaving a 64 channel wave file). I am then combining them to be a single stream of bytes. The problem I'm having is with my re-construction of the data to write out.
Basically I'm reading in 16 bytes and then building them into a single __m128i variable and then using...
Designing UIs with QtCreator under Windows, and porting the same .ui file under MacOSX leads to designs with some text parts very small -- actually, the HTML ones. It seems it comes from the fact that QtCreator uses pt instead of px as text size unit, and that the default screen resolutions are quite different under Windows and MacOSX.
...
(Edited to try to explain better)
We have an agent, written in C++ for Win32. It needs to periodically post information to a server. It must support disconnected operation. That is: the client doesn't always have a connection to the server.
Note: This is for communication between an agent running on desktop PCs, to communicate with a s...
The Quartz display services reference manual lists several functions as deprecated, (for example CGDisplayCurrentMode), but doesn't mention what the replacement function is.
What should I be using to find information about the current video mode?
Is there a way to find out this kind of information? The reference manual on the apple de...
In a typical MFC C++ dialog, I want to dynamically create a floating ListBox (or other standard control) over the dialog, possible extending past the dialog's boundaries - so it can't be a simple child or it'll be clipped.
Looking at something similar that works, I tried to achieve it but the window never appears when shown.
In my .h f...
I'm looking for a way in C++ to extract the return type of a function (without calling it). I presume this will require some template magic.
float Foo();
int Bar();
magic_template<Foo>::type var1; // Here 'var1' should be of type 'float'
magic_template<Bar>::type var2; // and 'var2' should be of type 'int'
I am currently investigati...
I have MTL header files; I want to use those header files in Visual Studio 2008. How can I link those header files so that I can write a matrix program using the MTL library?
...
I am trying to change the value of a variable which is defined as int const as below.
const int w = 10;
int* wp = const_cast <int*> (&w);
*wp = 20;
The value of w didn't change and was 10 even after the assignment, though it shows as if both w and wp are pointing to the same memory location. But I am able to the change the value of w,...
Is there a tool that can do alias analysis on a program and tell you where gcc / g++ are having to generate sub-optimal instruction sequences due to potential pointer aliasing?
...
I want to export a lot of (table) data to Excel. I'm developing on Windows Xp, Vs2005. I'm filling a COleSafeArray, which was initialized like this:
safeArray.Create( VT_VARIANT, 2, numElements ); // 2 dimensional, 30000 rows, 3 columns
Now the filling is really fast, but in TaskManager/Process Explorer/VMMap, it looks like some of th...
How can I get the location of the tnsnames.ora file by code, in a machine with the Oracle client installed?
Is there a windows registry key indicating the location of this file?
...