Tag Archives: code

FLTK tech, HICON to Fl_RGB_Image

This is a simple source code for converting Windows HICON to Fl_RGB_Image for my own customized FLTK window.

Before understanding how it works, It must be requires understanding of some Windows API like LoadImage().

API, icon_to_flrgb()

Plus, to remove Fl_RGB_Image in safe, use this.

remove_fl_rgb_image()

And, let know understand how it calls :

Sequence to convert image and apply, then discard.

remove_fl_rgb_image() may called in end of program, when it terminates or class destructor to release memory contains user allocated memory, and it is specification of FLTK 1.3.x.

How to fix wrong HTML expressions for Crayon Syntax Highlight plug-in.

If you have a problem like me in your code embedded posts for expression gone to wrong, just do like me.

First, Go wp-admin and see CSH plug-in area. And then click to Settings.

fix_crayong_sh_plugin_html_expression00  You will see CSH plug-in page and find “Code” area.

fix_crayong_sh_plugin_html_expression01  There’s will be no checked “Decode HTML entities in code”. It means your <pre … /> codes are showing like this.

fix_crayong_sh_plugin_html_expression02  You will know some HTML expressions are gone to far far away … Now we fix this just a few clicks.
Now you will check on unchecked “Decode HTML entities in code” and save settings.

fix_crayong_sh_plugin_html_expression03  How easy ! It’s done. Your <pre … /> codes on latest WordPress came back to normal like this !

fix_crayong_sh_plugin_html_expression04  I think there’s some policy changed in WordPress and CSH plug-in not changed this default option in setting. And we just need to change a setting to good code expression in post.

I love Crayon Syntax Highlighter and WordPress !

Printing bits from unsigned char (BYTE) in C.

Anybody knows what numbers made in our computer if you have experience in programming. But did you have try to print what ‘unsigned char’ or ‘BYTE’, 1 byte data to bits?
‘unsigned char’ and ‘BYTE’ contain a number in ranged 0 to 255 in 8 bits. 0000:0000 to 1111:1111. Every numbers made in bits, a digital switched. So I made this expression for simple C code.