Resources on Learning Win32 API

Here are a set of online tutorials that helped me learn about Windows Programming , This is a short post – hoping that someone who happen to bump on to my blog finds it useful

(a) Forgers Win32 API programming tutorial  :  http://winprog.org/tutorial/

(b) Iczelion Win32 programming tutorials :- In assembly but the concepts remain the same.

http://win32assembly.programminghorizon.com/tutorials.html

http://www.woodmann.com/RCE-CD-SITES/Iczelion/

 

The best book on Windows Programming is by Charles Petzold , search on amazon.

 

 

 

Linux – bash ( commonly used commands )

I know no one really reads my blog , so here is again another note to myself on commonly used  linux commands for the heck of it ! . Hopefully someones finds it useful . Hoping that writing this down refreshes my frail memory

Getting help

[sourcecode language=”bash”]
$ # try –help with the command
$ man <command name>
$ info <command name>
$ apropos <command name>
[/sourcecode]

Listing Directories

[sourcecode language=”bash”]
$ls -a #lists all files
$ls -l #long listing
$ls -t # time
$ls -s # size
$ls -r # reverse
$ ls -ar # combination
[/sourcecode]

Changing Directories

[sourcecode language=”bash”]
$pwd # returns the current directory
$cd <dirname> # change directory to the given directory
[/sourcecode]

Copying files

[sourcecode language=”bash”]
$cp
$cp -r #recursive copy
$cp -i #interactive
[/sourcecode]

Creating/Removing directories

[sourcecode language=”bash”]
$mkdir #Creates
$rmdir #Removes
[/sourcecode]

Displaying file contents

[sourcecode language=”bash”]
$cat <file1> <file2> <file3>
$more <file1> <file2> <file3>
$less <file1> <file2> <file3> # you do more with less !
$head -n <file> # top n lines of the file
$tail -n <file> #bottom n lines of the file
[/sourcecode]

Pattern matching with grep

[sourcecode language=”bash”]
$grep <pattern> <files>
$grep -i <pattern> <files> #case insensitive

[/sourcecode]

Sorting

[sourcecode language=”bash”]
$sort <filename>
$sort -r <filename> #sort in reverse
[/sourcecode]

Sed

[sourcecode language=”bash”]
$# See : http://www.regular-expressions.info/ , sed can be used to parsing text and performing various transformations
$sed ‘s/<pattern>/<pattern to replace> <filename>
$#man sed
[/sourcecode]

Symbolic Links

[sourcecode language=”bash”]
$ln -s <filename> <link name> #soft link , omit -s for hard links
[/sourcecode]

Changing Permissions

[sourcecode language=”bash”]
$chmod <permissions> <files> # permissions – a,b,c = r*4+w*2+x

[/sourcecode]

Switch Users

[sourcecode language=”bash”]
$su (switch user)

[/sourcecode]

Tee send output to 2 devices

[sourcecode language=”bash”]
$tee [a] file

[/sourcecode]

Fill standard output with same thing

[sourcecode language=”bash”]
$yes <string> | <command>

[/sourcecode]

Useful process control commands

[sourcecode language=”bash”]
$jobs
$fg
$bg
$kill <pid>
$ps

[/sourcecode]

Environment Variables

[sourcecode language=”bash”]
$export varname = value

[/sourcecode]

Shortcuts with alias

[sourcecode language=”bash”]
$alias ls=’ls la’

[/sourcecode]

which is the executable

[sourcecode language=”bash”]
$which commandname

[/sourcecode]

Disk utilities

[sourcecode language=”bash”]
$du # disk usage
$df # disk free

[/sourcecode]

Compression utilities

[sourcecode language=”bash”]
$gzip / gunzip
$tar
$bunzip2
$lzma / unlzma

[/sourcecode]

Checking integrity

[sourcecode language=”bash”]
$md5sum

[/sourcecode]

File Comparison

[sourcecode language=”bash”]
$diff

[/sourcecode]

Location of files

[sourcecode language=”bash”]
$find <path> -name <name>
$locate <filename>

[/sourcecode]

Downloading websites offline

[sourcecode language=”bash”]
$wget
[/sourcecode]

Setting up your haXe Development Environment

Introduction

 HaXe is a multi-platform development environment. In this book we will specifically concentrate haXe as a free flash game development platform . With haXe you can develop for windows , Linux , iPhone , android as well as for the world wide web . A source file written in haXe can have multiple targets . The source file may be compiled into different targets such as c++ , JavaScript , neko vm byte code, php . As of writing both Java and .Net back ends are under development. This gives the developer the flexibility to use the right platform for the purpose. The opportunities and applications of haXe is quite endless.

Setting up your haXe Development Environment

 Installing haXe & swfmill

  1. Download appropriate installer from http://haxe.org/download

  2. Run the installer for your platform

  3. Test your haxe installation by typing haxe in your command line

  4. Download swfmill from swfmill.org

Install swfmill by compiling from sources or download the appropriate binary

Free IDE’s for haXe with syntax highlighting and code completion

 Eclihx

Eclihx is an eclipse plug in that allows provides syntax highlighting and code completion features for the haxe development. Since eclipse it in cross platform it works in all platforms including Linux. However as of writing eclihx is still in not yet really stable and has some glitches.

Eclihx home page : http://www.eclihx.org

null

 FlashDevelop

FlashDevelop is another good and free ide for haxe . It is at the time of writing the best available ide for haxe. The downside side of it is that it is available only for the windows operating system.

FlashDevelop home page : http://www.flashdevelop.org/

null

Most of the popular editor like vim , geany , gedit etc have syntax highlighting for haXe . But it is particularly difficult to remember all the class names by heart and for a more productive programming session , I would recommend either flashdevelop or eclihx.


HaXe resources and links

 Haxe home page : http://www.haxe.org/

 haXe game programming blog : http://gamehaxe.org

 haXe documentation and tutorials : http://haxe.org/doc

 haXe projects : http://www.haxe.org/com/projects

GUI toolkits compared

GUI Toolkits Compared

I have worked with few UI libraries during my college days (late night hackwork !). Although It has months since i really coded something in C/C++ . Here is my opinion on most of the UI frameworks ( choices available  :)   ) .

(a) Win32 API , GDI (user32.dll)
This was the most difficult to work with initially . I initially found it more difficult to work with than X , with strange typedef’s and cumbersome hungarian Notation etc . But once you get the hang of it , its quite easy . But getting the hang of it may take some time . You may look at Charles Petzold programming Windows for more information.(Works only on Windows AFAIK , or may be Wine and ReactOS )

(b) MFC
MFC is quite friendly . You can make ui’s pretty quickly and easily . But if you follow one of those ”
teach yourself MFC in xx days ” , you might get stuck at some point of time . You should start from the ground up without using the wizards provided and then later switch to wizards after you get more advanced . It also provides many features (Document View Architecture , to name a few ) and most developers usually do not properly utilize them :(  . Works only on Windows AKIK , or may be Wine and ReactOS )

(c)GTK
The Gimp”s toolkit . It was initially made for the development of the GNU Image manipulation program or the GIMP . Its very easy to write ui’s in GIMP and now you have glade available . The gimp website provides sufficent documentation and its pretty cool ! . The downside of gtk is that , its strong only in *nix platforms . The ui elements may look a touch different depending upon the platform .

(d)FOX
Its yet another cool framework which i have worked with. Its pretty impressive , ui elements look the same in all platforms . But the downside of fox is that it has a slightly steeper learning curve compared to Gtk , and it somewhat mimics MFC in its API .

(e)QT
QT is the best i guess in terms of quality and portability , but qt has a confusing license . Other than that its awesome .It competes with MFC in ease of use and beats it completely in portability   . It boasts of a signal — connect sort of thing , but there is nothing novel in it .

(f)svgalib
its pretty good as well . its easy to use , but need root privilleges ,its quite buggy as well

(g)Allegro
Easy to use multiplatform gaming framework

(h)SDL- Simple DirectMedia Layer
Same as Allegro

(i)Xlib
Honestly its initially easier to learn Xlib , than Win32 API . But it only provides barebones functionality . There is an autoritative X book by main authours themselfves. I havent coded in Xlib for the past 3 years , so forgot most of it . Also if you have experience programming Windows , programming X should not be too difficult .

There are others as well , but I will stop for the time being …….