Click here to Skip to main content
16,006,827 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionModify size of an edge drawn using DrawEdge (...) ? Pin
17-Feb-02 2:02
suss17-Feb-02 2:02 
AnswerRe: Modify size of an edge drawn using DrawEdge (...) ? Pin
Simon Walton17-Feb-02 2:19
Simon Walton17-Feb-02 2:19 
GeneralStatusbars and dialogs Pin
alex.barylski17-Feb-02 1:57
alex.barylski17-Feb-02 1:57 
GeneralSelect All message Pin
16-Feb-02 20:16
suss16-Feb-02 20:16 
GeneralRe: Select All message Pin
Paul M Watt16-Feb-02 20:40
mentorPaul M Watt16-Feb-02 20:40 
GeneralRe: Select All message Pin
Atul Dharne16-Feb-02 20:48
Atul Dharne16-Feb-02 20:48 
GeneralString compression Pin
16-Feb-02 19:13
suss16-Feb-02 19:13 
GeneralRe: String compression Pin
alex.barylski16-Feb-02 22:07
alex.barylski16-Feb-02 22:07 
If it's only for 1 to 50 characters why compress...?

Anyways...each character uses 1 byte...but normal english requires only decimal 33 to 126 ascii.

126 - 33 = 93...which is not even close to 255, the maximum value that can fit into one byte.

11111111=255
01111111=127
00111111=63, no good!

from the above you can see that by using only the ascii characters in this range you can knock off one bit on each character, 8 characters later...thats one byte saved.

If you don't need case and some of the funny characters you could further shave off another bit, saving even more memory.

"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
GeneralRe: String compression Pin
17-Feb-02 19:11
suss17-Feb-02 19:11 
GeneralRe: String compression Pin
alex.barylski17-Feb-02 21:11
alex.barylski17-Feb-02 21:11 
QuestionDrawing a bitmap from resource with GDI+? Pin
Jay Beckert16-Feb-02 18:46
Jay Beckert16-Feb-02 18:46 
AnswerRe: Drawing a bitmap from resource with GDI+? Pin
567890123416-Feb-02 20:38
567890123416-Feb-02 20:38 
GeneralRe: Drawing a bitmap from resource with GDI+? Pin
Jay Beckert17-Feb-02 5:49
Jay Beckert17-Feb-02 5:49 
GeneralRe: Drawing a bitmap from resource with GDI+? Pin
Jay Beckert17-Feb-02 5:55
Jay Beckert17-Feb-02 5:55 
Generalcast string to integer Pin
tbbooher16-Feb-02 17:28
tbbooher16-Feb-02 17:28 
GeneralRe: cast string to integer Pin
Paul M Watt16-Feb-02 17:46
mentorPaul M Watt16-Feb-02 17:46 
GeneralRe: cast string to integer Pin
Shog916-Feb-02 17:47
sitebuilderShog916-Feb-02 17:47 
GeneralRe: cast string to integer Pin
tbbooher16-Feb-02 17:57
tbbooher16-Feb-02 17:57 
GeneralRe: cast string to integer Pin
Paul M Watt16-Feb-02 18:04
mentorPaul M Watt16-Feb-02 18:04 
GeneralRe: cast string to integer Pin
Shog916-Feb-02 18:06
sitebuilderShog916-Feb-02 18:06 
GeneralAlmost There . . . just one more question Pin
tbbooher16-Feb-02 18:22
tbbooher16-Feb-02 18:22 
GeneralHelp me please! Release mode optimizations are screwing up my program! :( Pin
Julia Larson16-Feb-02 16:58
Julia Larson16-Feb-02 16:58 
GeneralRe: Help me please! Release mode optimizations are screwing up my program! :( Pin
Shog916-Feb-02 17:44
sitebuilderShog916-Feb-02 17:44 
GeneralRe: Help me please! Release mode optimizations are screwing up my program! :( Pin
Julia Larson16-Feb-02 18:06
Julia Larson16-Feb-02 18:06 
GeneralRe: Help me please! Release mode optimizations are screwing up my program! :( Pin
Shog916-Feb-02 18:28
sitebuilderShog916-Feb-02 18:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.