User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 427,988 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,492 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Code Snippets By: williamhemsworth

Programming Images in cplusplus

Heres a snippet that allows you to make your own images by using a mathematical formula. It gives you fast access to each pixel in the bitmap, and then saves the image as a .bmp once its made. You can be creative like this and make images which would be impossible to make using applications such as... (View Snippet)
Heres a snippet that compares the speed of volatile (nonregister) variables, and register variables and display's the average cycle count for each. This shows you exactly how much using registers speeds up loops and calculations. I get the following output, but it may vary: (View Snippet)
Heres a code that allows you to manually change the sensitivity of the mouse by using windows hooks. (View Snippet)
This snippet shows how to use hooks to stop the cursor from entering a certain area of the screen. This example will stop the cursor from going over 300 pixels away from the centre of the screen by using a bit of maths. (View Snippet)
A program that uses hooks to detect keypresses and write them to a file. (View Snippet)

Spirals and shapes in cplusplus

Hey, Here is a program I made which has interested quite a lot of people over the past few weeks, so I figured I would share it :) Using a small amount of trigonometry you can create some very fascinating shapes and effects. But in order to draw anything you need a surface to draw on, so to keep... (View Snippet)
All times are GMT -4. The time now is 9:38 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC