Search found 26 matches

by Chan Bok
26 Nov 2012 10:18
Forum: Visual Prolog Tips & Samples
Topic: Tiny Encryption Algorithm (TEA)
Replies: 0
Views: 6265

Tiny Encryption Algorithm (TEA)

The c codes for TEA (from Wikipedia) are as follows: void encrypt (uint32_t* v, uint32_t* k) { uint32_t v0=v[0], v1=v[1], sum=0, i; /* set up */ uint32_t delta=0x9e3779b9; /* a key schedule constant */ uint32_t k0=k[0], k1=k[1], k2=k[2], k3=k[3]; /* cache key */ for (i=0; i < 32; i++) { /* basic cyc...
by Chan Bok
8 Jun 2010 15:33
Forum: Visual Prolog Tips & Samples
Topic: HTTP Demo
Replies: 4
Views: 9472

HTTP Demo

This demo uses WinInet (HTTP) to transfer data between client and server. The demo is developed on VIP7.2 (CE). To compile, you need to include wininet.lib The demo essentially simulates the following HTML form: <form enctype="multipart/form-data" action="myphp.php" method="...
by Chan Bok
21 Mar 2010 1:25
Forum: Visual Prolog Tips & Samples
Topic: Computing MD5 and SHA-1 using CryptoAPI
Replies: 0
Views: 5781

Computing MD5 and SHA-1 using CryptoAPI

There were two previous posts on this topic: "SHA-1 Hash" - http://discuss.visual-prolog.com/viewtopic.php?t=8225 "MDI Extension" - http://discuss.visual-prolog.com/viewtopic.php?t=7958 Here is yet another way to compute MD5 and SHA-1, using Microsoft's CtyptoAPI. constants md5 =...
by Chan Bok
29 Jan 2010 12:35
Forum: Visual Prolog Tips & Samples
Topic: An OpenGL Application
Replies: 9
Views: 12488

I don't have any examples other than the complete source codes (for Axon).
There are some examples in the Examples (that come with Visual Prolog) for drawing including a gdiplus demo.

Best Regards,

Chan Bok
Axon Research
by Chan Bok
23 Jan 2010 16:15
Forum: Visual Prolog Tips & Samples
Topic: An OpenGL Application
Replies: 9
Views: 12488

Dear Erkki, Firstly a belated congratulations to your PhD, and to your excellent work and blog, and also your book that you showed me while in St. Petersberg. I must admit I am overwhelmed by what I see. As you can see I have experimented with both 2D and 3D. I am not sure if you are referring to 2D...
by Chan Bok
16 Sep 2009 0:05
Forum: Visual Prolog Tips & Samples
Topic: An OpenGL Application
Replies: 9
Views: 12488

Axon2010 is now post beta.
The Lite version is, as usual, freely available for download.

Chan Bok
Axon Research
by Chan Bok
9 Sep 2009 8:35
Forum: Visual Prolog Tips & Samples
Topic: An OpenGL Application
Replies: 9
Views: 12488

An OpenGL Application

I recently launched a beta version of Axon Idea Processor (Axon2010) that uses GDI+ for 2D and OpenGL for 3D display (switcheable). Many thanks to Gildas for pioneering OpenGL in VIP and sharing his knowhow by publishing the V3D package. Unlike V3D, the Axon version uses only opengl.lib and glu32.li...
by Chan Bok
5 Dec 2008 1:58
Forum: Visual Prolog
Topic: Rotated text?
Replies: 7
Views: 5868

Yes, it is the Escapement that determines the rotation.
The Orientation can be set to 0.
by Chan Bok
4 Dec 2008 22:22
Forum: Visual Prolog
Topic: Rotated text?
Replies: 7
Views: 5868

The LOGFONT structure has a lfOrientation field: typedef struct tagLOGFONT { LONG lfHeight; LONG lfWidth; LONG lfEscapement; LONG lfOrientation; LONG lfWeight; BYTE lfItalic; BYTE lfUnderline; BYTE lfStrikeOut; BYTE lfCharSet; BYTE lfOutPrecision; BYTE lfClipPrecision; BYTE lfQuality; BYTE lfPitchAn...
by Chan Bok
14 Aug 2008 14:26
Forum: Visual Prolog Tips & Samples
Topic: Visual Prolog code browser
Replies: 0
Views: 4969

Visual Prolog code browser

At the recent VIP-ALC conference I described a method for browsing codes using Class Diagrams. You can now do this in 3 simple steps: 1. Download and install the latest Axon2009 Lite (freeware) from: http://web.singnet.com.sg/~axon2000/download.htm 2. Open the file OO-GUI.xon 3. Set [Folder1] to whe...
by Chan Bok
29 Nov 2007 0:17
Forum: Visual Prolog Tips & Samples
Topic: (Howto) Add a bitmap to a menu
Replies: 2
Views: 8809

Dear Steve,

It is good to know that gui_Native::loadImage can be replaced by
pure prolog predicates (pictLoad and pictToBitmap).

The menu bitmap size is 13x13 using
Control Panel|Display|Appearance|Font Size|Default.
Hence it is better not to hard code it.

Chan Bok
Axon Research
by Chan Bok
18 Oct 2007 4:39
Forum: Visual Prolog Tips & Samples
Topic: WebBrowser "Class Diagram"
Replies: 1
Views: 8316

WebBrowser "Class Diagram"

This is a Class Diagram of the WebBrowser Demo that demonstrates how to
use ActiveX controls in VIP7.

The complexity is well beyond me, but here is the diagram anyway.

Chan Bok
Axon Research
by Chan Bok
12 Oct 2007 4:28
Forum: Visual Prolog Tips & Samples
Topic: COM Interfacing "Class Diagram"
Replies: 1
Views: 5203

COM Interfacing "Class Diagram"

I was trying to understand the demo "How to use COM components in Visual Prolog" by Yuri (last updated Aug 2006). The demo shows how a COM component can be created using VIP, and how to interface with a COM component using VIP. To aid understanding I drew another "Class Diagram" ...
by Chan Bok
3 Oct 2007 10:00
Forum: Visual Prolog Tips & Samples
Topic: OO-GUI "Class Diagram"
Replies: 8
Views: 18859

Here is an update of the OO-GUI Class Diagram for VIP7.1 As before, the diagram is only an approximation and rough guide. I foresee that there will be more changes especially in having the controls inheriting from userControlSupport and drawControlSupport. I also attach a zipped version of the nativ...
by Chan Bok
3 Oct 2007 2:03
Forum: Visual Prolog Tips & Samples
Topic: RichEdit control
Replies: 8
Views: 15360

Astonishing!

I tested with some rtf texts and it works fine.

Many thanks.

Chan Bok
Axon Research