flat assembler
Message board for the users of flat assembler.

 Index > Tutorials and Examples > Monitor clipboard for changes, Win64, MathML
Author
bitRAKE

Joined: 21 Jul 2003
Posts: 3139
Location: vpcmipstrm
bitRAKE
Just a simple example to get the MathML from the Math Input Panel (Win7+).

Besides using SetClipboardViewer/ChangeClipboardChain, the important bits are:
Code:
_WM_CHANGECBCHAIN:
mov rcx,[hNextCBView]
cmp rcx,r8
jnz .1
mov [hNextCBView],r9
.0: xor eax,eax
ret
.1: jrcxz .0
invoke SendMessage,rcx,rdx,r8,r9
jmp .0

_WM_DRAWCLIPBOARD:
invoke SendMessage,[hNextCBView],rdx,r8,r9
.
. (do something)
.
xor eax,eax
ret    
...handling these messages are required by the API protocol to maintain the chain of viewers.

The Math Input Panel only exposes it's translating in a custom format. Which prevents it from being pasted into any regular text editor, so this is also a mildly useful tool.

v0.1 - added hook to center MessageBox's.

_________________

Last edited by bitRAKE on 28 Mar 2013, 14:28; edited 1 time in total
28 Mar 2013, 01:48
MHajduk

Joined: 30 Mar 2006
Posts: 6050
Location: Poland
MHajduk
That's a very nice application bitRAKE (and a perfect example of the working 64-bit code). I didn't know that such thing as mip.exe is present in my system (the only inconvenience in use is that it would be better to input formulas with a graphics tablet than mouse but it's possible).
28 Mar 2013, 12:16
bitRAKE

Joined: 21 Jul 2003
Posts: 3139
Location: vpcmipstrm
bitRAKE
MathML is going to be more popular in time, too. (Added to HTML5.) I was surprised how easy it was to enter a matrix - it looks like it isn't going to work and then MIP makes the right interpretation. I've tried it on a touch screen - felt more like writing, but the processor was very slow (couple years ago) and made the interpretation sluggish.
28 Mar 2013, 13:02
MHajduk

Joined: 30 Mar 2006
Posts: 6050
Location: Poland
MHajduk
bitRAKE wrote:
MathML is going to be more popular in time, too. (Added to HTML5.)
It's a good news to me because it will be far easier to put some mathematical text on the site. Till now not every browser has supported MathML, so to obtain a kind of universality I was forced to format all formulas as images - a lot of boring work.
28 Mar 2013, 13:11
bitRAKE

Joined: 21 Jul 2003
Posts: 3139
Location: vpcmipstrm
bitRAKE
http://www.mathjax.org/ - works in all browsers right now.
28 Mar 2013, 14:08
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

 Jump to: Select a forum Official----------------AssemblyPeripheria General----------------MainTutorials and ExamplesDOSWindowsLinuxUnixMenuetOS Specific----------------MacroinstructionsOS ConstructionIDE DevelopmentProjects and IdeasNon-x86 architecturesHigh Level LanguagesProgramming Language DesignCompiler Internals Other----------------FeedbackHeapTest Area

Forum Rules:
 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum