- Painting to a back buffer instead of directly to screen
- Overriding WM_ERASEBKGND with "return true" so that it doesn't erase the background every second/every time the screen is invalidated.
Next, to get rid of the black background.
Next, to get rid of the black background.
After much research, came upon this solution: http://msdn.microsoft.com/en-us/library/ms632599(VS.85).aspx#layered
Instead of I used That solved it. Code
The above problem statement, requires the output to be the minimum possible number. The first step is to understand that the number would be smaller if you take the smallest possible 'Base System' for the number. To find the base system that you want, you would have to find the number of unique symbols in the input string. If there are 2 'Unique' symbols in the string, take it as 'Base 2' system. If there are 10 unique symbols, take it as 'Base 10 (Decimal)' system.....and so on. Since the 'Unary System' is not used, ignore that.
After that, we need to find how we can make the sum, as minimal as possible. Since we don't know which digit stands for what, we have to make a decision for each symbol, so as to make the number, as small as possible. Since the left most digit carries more weight, this digit should be multiplied by the smallest digit. But since the left-most digit can't be zero (0), make it '1'. Use the Zero (0) for the second left-most digit (if there is 2nd digit in the number). Then use '2' for the third left most digit (if it is unique), '3' for the 4th left most digit (if it is unique)..and so on, unitl the end of the string with symbols.^^