devxlogo

Tip Bank

How to Print an __int64 Number in VC++

You can use the printf() function as in the following example: #include using namespace std;int main(){ __int64 i64 = 4294967296; printf(“%I64d “, i64); //in decimal printf(“%I64x “, i64); //in hexa

How To Capture a Mouse Without SetCapture

typedef BOOL ( CALLBACK *REPEATUNTILRELEASECALLBACK )( POINTptScreen, LPARAM lParam );BOOL RepeatUntilRelease( HWND hWnd, REPEATUNTILRELEASECALLBACKfctRepeatUntilRelease, LPARAM lParam, RECT* prtClipping, UINT vk ){ MSG message; ZeroMemory( &message, sizeof(message) ); if ( IsWindow(

Executing a Member Function After main() Terminates

You can execute any member function or any other execution after a termination of main() function by using “#pragma exit.”Here’s the syntax: #pragma exit [priority] //withoutsemicolon Now, here’s an example:

Update SQL Server records via HTTP

Thanks to the SQL Server extensions for the Web and XML, it is now possible to query a SQL Server database (and get the result as XML) as well as

Create zero-elements arrays

The .NET framework lets you create two types of “empty” arrays: unitialized arrays and arrays that are initialized with zero elements. Uninitialized arrays are actually array variables that are set