Wednesday, December 02, 2009

Web Analytics

With the recent news on Yahoo Finance regarding Omniture-Adobe acquisition, I was curious to know a bit more about Web Analytics and provide pointers to anyone reading my blog. I posted an article some time ago on how to add Google Web Analytics to a SWF. Anyhow, here is a very great blog that I found at Tealium.com for those interested in Web Analytics. The blog is really well written by web Analytics Experts. Former Web Side Story, Visual Science and Omniture folks...


http://www.tealium.com/blog/

Thursday, October 08, 2009

Virtual-Key Codes Windows Platform

The following table shows
the symbolic constant names, decimal values, and mouse or keyboard equivalents
for the virtual-key codes used by the system. The codes are listed in numeric
order.



Virtual-Key Codes

The following table shows the symbolic constant names, hexadecimal values, and mouse or keyboard equivalents for the virtual-key codes used by the system. The codes are listed in numeric order.

Constants

VK_LBUTTON (0x01)
Left mouse button
VK_RBUTTON (0x02)
Right mouse button
VK_CANCEL (0x03)
Control-break processing
VK_MBUTTON (0x04)
Middle mouse button (three-button mouse)
VK_XBUTTON1 (0x05)
Windows 2000/XP: X1 mouse button
VK_XBUTTON2 (0x06)
Windows 2000/XP: X2 mouse button
- (0x07)
Undefined
VK_BACK (0x08)
BACKSPACE key
VK_TAB (0x09)
TAB key
- (0x0A-0B)
Reserved
VK_CLEAR (0x0C)
CLEAR key
VK_RETURN (0x0D)
ENTER key
- (0x0E-0F)
Undefined
VK_SHIFT (0x10)
SHIFT key
VK_CONTROL (0x11)
CTRL key
VK_MENU (0x12)
ALT key
VK_PAUSE (0x13)
PAUSE key
VK_CAPITAL (0x14)
CAPS LOCK key
VK_KANA (0x15)
Input Method Editor (IME) Kana mode
VK_HANGUEL (0x15)
IME Hanguel mode (maintained for compatibility; use VK_HANGUL)
VK_HANGUL (0x15)
IME Hangul mode
- (0x16)
Undefined
VK_JUNJA (0x17)
IME Junja mode
VK_FINAL (0x18)
IME final mode
VK_HANJA (0x19)
IME Hanja mode
VK_KANJI (0x19)
IME Kanji mode
- (0x1A)
Undefined
VK_ESCAPE (0x1B)
ESC key
VK_CONVERT (0x1C)
IME convert
VK_NONCONVERT (0x1D)
IME nonconvert
VK_ACCEPT (0x1E)
IME accept
VK_MODECHANGE (0x1F)
IME mode change request
VK_SPACE (0x20)
SPACEBAR
VK_PRIOR (0x21)
PAGE UP key
VK_NEXT (0x22)
PAGE DOWN key
VK_END (0x23)
END key
VK_HOME (0x24)
HOME key
VK_LEFT (0x25)
LEFT ARROW key
VK_UP (0x26)
UP ARROW key
VK_RIGHT (0x27)
RIGHT ARROW key
VK_DOWN (0x28)
DOWN ARROW key
VK_SELECT (0x29)
SELECT key
VK_PRINT (0x2A)
PRINT key
VK_EXECUTE (0x2B)
EXECUTE key
VK_SNAPSHOT (0x2C)
PRINT SCREEN key
VK_INSERT (0x2D)
INS key
VK_DELETE (0x2E)
DEL key
VK_HELP (0x2F)
HELP key
(0x30)
0 key
(0x31)
1 key
(0x32)
2 key
(0x33)
3 key
(0x34)
4 key
(0x35)
5 key
(0x36)
6 key
(0x37)
7 key
(0x38)
8 key
(0x39)
9 key
- (0x3A-40)
Undefined
(0x41)
A key
(0x42)
B key
(0x43)
C key
(0x44)
D key
(0x45)
E key
(0x46)
F key
(0x47)
G key
(0x48)
H key
(0x49)
I key
(0x4A)
J key
(0x4B)
K key
(0x4C)
L key
(0x4D)
M key
(0x4E)
N key
(0x4F)
O key
(0x50)
P key
(0x51)
Q key
(0x52)
R key
(0x53)
S key
(0x54)
T key
(0x55)
U key
(0x56)
V key
(0x57)
W key
(0x58)
X key
(0x59)
Y key
(0x5A)
Z key
VK_LWIN (0x5B)
Left Windows key (Microsoft Natural keyboard)
VK_RWIN (0x5C)
Right Windows key (Natural keyboard)
VK_APPS (0x5D)
Applications key (Natural keyboard)
- (0x5E)
Reserved
VK_SLEEP (0x5F)
Computer Sleep key
VK_NUMPAD0 (0x60)
Numeric keypad 0 key
VK_NUMPAD1 (0x61)
Numeric keypad 1 key
VK_NUMPAD2 (0x62)
Numeric keypad 2 key
VK_NUMPAD3 (0x63)
Numeric keypad 3 key
VK_NUMPAD4 (0x64)
Numeric keypad 4 key
VK_NUMPAD5 (0x65)
Numeric keypad 5 key
VK_NUMPAD6 (0x66)
Numeric keypad 6 key
VK_NUMPAD7 (0x67)
Numeric keypad 7 key
VK_NUMPAD8 (0x68)
Numeric keypad 8 key
VK_NUMPAD9 (0x69)
Numeric keypad 9 key
VK_MULTIPLY (0x6A)
Multiply key
VK_ADD (0x6B)
Add key
VK_SEPARATOR (0x6C)
Separator key
VK_SUBTRACT (0x6D)
Subtract key
VK_DECIMAL (0x6E)
Decimal key
VK_DIVIDE (0x6F)
Divide key
VK_F1 (0x70)
F1 key
VK_F2 (0x71)
F2 key
VK_F3 (0x72)
F3 key
VK_F4 (0x73)
F4 key
VK_F5 (0x74)
F5 key
VK_F6 (0x75)
F6 key
VK_F7 (0x76)
F7 key
VK_F8 (0x77)
F8 key
VK_F9 (0x78)
F9 key
VK_F10 (0x79)
F10 key
VK_F11 (0x7A)
F11 key
VK_F12 (0x7B)
F12 key
VK_F13 (0x7C)
F13 key
VK_F14 (0x7D)
F14 key
VK_F15 (0x7E)
F15 key
VK_F16 (0x7F)
F16 key
VK_F17 (0x80H)
F17 key
VK_F18 (0x81H)
F18 key
VK_F19 (0x82H)
F19 key
VK_F20 (0x83H)
F20 key
VK_F21 (0x84H)
F21 key
VK_F22 (0x85H)
F22 key
VK_F23 (0x86H)
F23 key
VK_F24 (0x87H)
F24 key
- (0x88-8F)
Unassigned
VK_NUMLOCK (0x90)
NUM LOCK key
VK_SCROLL (0x91)
SCROLL LOCK key
(0x92-96)
OEM specific
- (0x97-9F)
Unassigned
VK_LSHIFT (0xA0)
Left SHIFT key
VK_RSHIFT (0xA1)
Right SHIFT key
VK_LCONTROL (0xA2)
Left CONTROL key
VK_RCONTROL (0xA3)
Right CONTROL key
VK_LMENU (0xA4)
Left MENU key
VK_RMENU (0xA5)
Right MENU key
VK_BROWSER_BACK (0xA6)
Windows 2000/XP: Browser Back key
VK_BROWSER_FORWARD (0xA7)
Windows 2000/XP: Browser Forward key
VK_BROWSER_REFRESH (0xA8)
Windows 2000/XP: Browser Refresh key
VK_BROWSER_STOP (0xA9)
Windows 2000/XP: Browser Stop key
VK_BROWSER_SEARCH (0xAA)
Windows 2000/XP: Browser Search key
VK_BROWSER_FAVORITES (0xAB)
Windows 2000/XP: Browser Favorites key
VK_BROWSER_HOME (0xAC)
Windows 2000/XP: Browser Start and Home key
VK_VOLUME_MUTE (0xAD)
Windows 2000/XP: Volume Mute key
VK_VOLUME_DOWN (0xAE)
Windows 2000/XP: Volume Down key
VK_VOLUME_UP (0xAF)
Windows 2000/XP: Volume Up key
VK_MEDIA_NEXT_TRACK (0xB0)
Windows 2000/XP: Next Track key
VK_MEDIA_PREV_TRACK (0xB1)
Windows 2000/XP: Previous Track key
VK_MEDIA_STOP (0xB2)
Windows 2000/XP: Stop Media key
VK_MEDIA_PLAY_PAUSE (0xB3)
Windows 2000/XP: Play/Pause Media key
VK_LAUNCH_MAIL (0xB4)
Windows 2000/XP: Start Mail key
VK_LAUNCH_MEDIA_SELECT (0xB5)
Windows 2000/XP: Select Media key
VK_LAUNCH_APP1 (0xB6)
Windows 2000/XP: Start Application 1 key
VK_LAUNCH_APP2 (0xB7)
Windows 2000/XP: Start Application 2 key
- (0xB8-B9)
Reserved
VK_OEM_1 (0xBA)
Used for miscellaneous characters; it can vary by keyboard.

Windows 2000/XP: For the US standard keyboard, the ';:' key
VK_OEM_PLUS (0xBB)
Windows 2000/XP: For any country/region, the '+' key
VK_OEM_COMMA (0xBC)
Windows 2000/XP: For any country/region, the ',' key
VK_OEM_MINUS (0xBD)
Windows 2000/XP: For any country/region, the '-' key
VK_OEM_PERIOD (0xBE)
Windows 2000/XP: For any country/region, the '.' key
VK_OEM_2 (0xBF)
Used for miscellaneous characters; it can vary by keyboard.

Windows 2000/XP: For the US standard keyboard, the '/?' key
VK_OEM_3 (0xC0)
Used for miscellaneous characters; it can vary by keyboard.

Windows 2000/XP: For the US standard keyboard, the '`~' key
- (0xC1-D7)
Reserved
- (0xD8-DA)
Unassigned
VK_OEM_4 (0xDB)
Used for miscellaneous characters; it can vary by keyboard.

Windows 2000/XP: For the US standard keyboard, the '[{' key
VK_OEM_5 (0xDC)
Used for miscellaneous characters; it can vary by keyboard.

Windows 2000/XP: For the US standard keyboard, the '\|' key
VK_OEM_6 (0xDD)
Used for miscellaneous characters; it can vary by keyboard.

Windows 2000/XP: For the US standard keyboard, the ']}' key
VK_OEM_7 (0xDE)
Used for miscellaneous characters; it can vary by keyboard.

Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key
VK_OEM_8 (0xDF)
Used for miscellaneous characters; it can vary by keyboard.
- (0xE0)
Reserved
(0xE1)
OEM specific
VK_OEM_102 (0xE2)
Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
(0xE3-E4)
OEM specific
VK_PROCESSKEY (0xE5)
Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
(0xE6)
OEM specific
VK_PACKET (0xE7)
Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KEYUP
- (0xE8)
Unassigned
(0xE9-F5)
OEM specific
VK_ATTN (0xF6)
Attn key
VK_CRSEL (0xF7)
CrSel key
VK_EXSEL (0xF8)
ExSel key
VK_EREOF (0xF9)
Erase EOF key
VK_PLAY (0xFA)
Play key
VK_ZOOM (0xFB)
Zoom key
VK_NONAME (0xFC)
Reserved
VK_PA1 (0xFD)
PA1 key
VK_OEM_CLEAR (0xFE)
Clear key

Monday, October 05, 2009

Applications for the iPhone made using Adobe Software

Annonced today at MAX. Flash Professional CS5 will enable you to build applications for iPhone and iPod touch using ActionScript 3. These applications can be delivered to iPhone and iPod touch users through the Apple App Store.

http://labs.adobe.com/technologies/flashcs5/appsfor_iphone/

Tuesday, September 29, 2009

Flash and Video Games PS3 and XNA ???

Civilisation, Mass Effect and Crysis used Scaleform GFx for their Flash graphics.

https://www.scaleform.com/products_gfx.php
https://www.scaleform.com/products/clik

Scaleform® GFx™ 3.0 introduces the Common Lightweight Interface Kit (CLIK™) to help accelerate the design and development of user interfaces on multiple platforms including PCs, Consoles, and Mobiles. The CLIK component architecture and workflow enhancement tools enable users to rapidly create user interfaces from prototype to final design.

Adobe Flash contains a variety of premade and preconfigured interface components to enable easy interface creation. The Scaleform CLIK components are similar to the components found in Flash, but have been custom-designed specifically for creating games using Scaleform GFx 3.0.

Monday, September 28, 2009

Watch Flash Web Site on your HDTV with your PS3

The beautiful part of the PS3 is that the new browser in the PS3 has Flash Player 9 installed. What’s even more beautiful is that it is at least version 9.0.115 because all of my tutorials can be watched from the comfort of your couch. Connecting the PS3 with an HDMI cable makes the tutorials look amazing.

I also recommend the Logitech PS3 keyboard which makes cruising the web a joy.

Thursday, September 24, 2009

Window subclassing is tricky




Window subclassing is tricky, and as a general rule one should not attempt to dynamically sub-class and unsubclass an HWDN multiple times
during its lifetime. Instead subclass once at the HWND creation time, and then un-subclass at the HWND destruction time.
ONLY un-subclass if the value of GWLP_WNDPROC matches your window proc.
In general, you do not know if other subclasses will unsubclass at WM_DESTROY or WM_NCDESTROY time, so it is safest if it attempt to unsubclass
rst in WM_DESTROY time, and then (if that does not succeed) at WM_NCDESTROY time. You willnot get a WM_NCDESTROY
message if you were able to unsubclass in response to the WM_DESTROY message.

Tuesday, September 15, 2009

Tealium Web analytics Blog

With the recent news on Yahoo Finance regarding Omniture-Adobe acquisition, I was curious to know a bit more about Web Analytics and provide pointers to anyone reading my blog. I posted an article some time ago on how to add Google Web Analytics to a SWF. Anyhow, here is a very great blog that I found at Tealium.com for those interested in Web Analytics. The blog is really well written by web Analytics Experts. Former Web Side Story, Visual Science and Omniture folks...


http://www.tealium.com/blog/

Wednesday, September 09, 2009

Papervision3D Essentials Book

Papervision3D Essentials (Paperback)
by Jeff Winder (Author), Paul Tondeur (Author)


http://www.amazon.com/Papervision3D-Essentials-Paul-Tondeur/dp/1847195725/ref=sr_1_12?ie=UTF8&s=books&qid=1248878573&sr=8-1
2

Quoting Paul Tondeur :

Both web pages provide information about the content and the level of the book.
Chapter 8 is available online as a free sample, and covers working with models and animated models that have been created in external programs. Among other things, the chapter discusses how to export models from Autodesk 3ds Max, SketchUp and Blender.
http://www.packtpub.com/files/5722-papervision-3d-sample-chapter-8-external-models.pdf

Those who are interested can also find some more information in our blog posts:
http://www.paultondeur.com/2009/09/03/papervision3d-essentials-out-now/
http://jeffwinder.blogspot.com/2009/09/papervision3d-essentials-book-out-now.html

Monday, August 17, 2009

Useful WM_Messages Define WIN32 Platform

using System;
///
/// Summary description for WM_Messages.
///

public enum WM_Messages
{
WM_NULL = 0x0000, //0
WM_CREATE = 0x0001, //1
WM_DESTROY = 0x0002, //2
WM_MOVE = 0x0003, //3
WM_SIZE = 0x0005, //5
WM_ACTIVATE = 0x0006, //6
WM_SETFOCUS = 0x0007, //7
WM_KILLFOCUS = 0x0008, //8
WM_ENABLE = 0x000A, //10
WM_SETREDRAW = 0x000B, //11
WM_SETTEXT = 0x000C, //12
WM_GETTEXT = 0x000D, //13
WM_GETTEXTLENGTH = 0x000E, //14
WM_PAINT = 0x000F, //15
WM_CLOSE = 0x0010, //16
WM_QUERYENDSESSION = 0x0011, //17
WM_QUERYOPEN = 0x0013, //19
WM_ENDSESSION = 0x0016, //22
WM_QUIT = 0x0012, //18
WM_ERASEBKGND = 0x0014, //20
WM_SYSCOLORCHANGE = 0x0015, //21
WM_SHOWWINDOW = 0x0018, //24
WM_WININICHANGE = 0x001A, //26
WM_DEVMODECHANGE = 0x001B, //27
WM_ACTIVATEAPP = 0x001C, //28
WM_FONTCHANGE = 0x001D, //29
WM_TIMECHANGE = 0x001E, //30
WM_CANCELMODE = 0x001F, //31
WM_SETCURSOR = 0x0020, //32
WM_MOUSEACTIVATE = 0x0021, //33
WM_CHILDACTIVATE = 0x0022, //34
WM_QUEUESYNC = 0x0023, //35
WM_GETMINMAXINFO = 0x0024, //36
WM_PAINTICON = 0x0026, //38
WM_ICONERASEBKGND = 0x0027, //39
WM_NEXTDLGCTL = 0x0028, //40
WM_SPOOLERSTATUS = 0x002A, //42
WM_DRAWITEM = 0x002B, //43
WM_MEASUREITEM = 0x002C, //44
WM_DELETEITEM = 0x002D, //45
WM_VKEYTOITEM = 0x002E, //46
WM_CHARTOITEM = 0x002F, //47
WM_SETFONT = 0x0030, //48
WM_GETFONT = 0x0031, //49
WM_SETHOTKEY = 0x0032, //50
WM_GETHOTKEY = 0x0033, //51
WM_QUERYDRAGICON = 0x0037, //55
WM_COMPAREITEM = 0x0039, //57
WM_GETOBJECT = 0x003D, //61
WM_COMPACTING = 0x0041, //65
WM_COMMNOTIFY = 0x0044, //68 /* no longer suported */
WM_WINDOWPOSCHANGING = 0x0046, //70
WM_WINDOWPOSCHANGED = 0x0047, //71
WM_POWER = 0x0048, //72
WM_COPYDATA = 0x004A, //74
WM_CANCELJOURNAL = 0x004B, //75
WM_NOTIFY = 0x004E, //78
WM_INPUTLANGCHANGEREQUEST = 0x0050, //80
WM_INPUTLANGCHANGE = 0x0051, //81
WM_TCARD = 0x0052, //82
WM_HELP = 0x0053, //83
WM_USERCHANGED = 0x0054, //84
WM_NOTIFYFORMAT = 0x0055, //85
WM_CONTEXTMENU = 0x007B, //123
WM_STYLECHANGING = 0x007C, //124
WM_STYLECHANGED = 0x007D, //125
WM_DISPLAYCHANGE = 0x007E, //126
WM_GETICON = 0x007F, //127
WM_SETICON = 0x0080, //128
WM_NCCREATE = 0x0081, //129
WM_NCDESTROY = 0x0082, //130
WM_NCCALCSIZE = 0x0083, //131
WM_NCHITTEST = 0x0084, //132
WM_NCPAINT = 0x0085, //133
WM_NCACTIVATE = 0x0086, //134
WM_GETDLGCODE = 0x0087, //135
WM_SYNCPAINT = 0x0088, //136
WM_NCMOUSEMOVE = 0x00A0, //160
WM_NCLBUTTONDOWN = 0x00A1, //161
WM_NCLBUTTONUP = 0x00A2, //162
WM_NCLBUTTONDBLCLK = 0x00A3, //163
WM_NCRBUTTONDOWN = 0x00A4, //164
WM_NCRBUTTONUP = 0x00A5, //165
WM_NCRBUTTONDBLCLK = 0x00A6, //166
WM_NCMBUTTONDOWN = 0x00A7, //167
WM_NCMBUTTONUP = 0x00A8, //168
WM_NCMBUTTONDBLCLK = 0x00A9, //169
WM_NCXBUTTONDOWN = 0x00AB, //171
WM_NCXBUTTONUP = 0x00AC, //172
WM_NCXBUTTONDBLCLK = 0x00AD, //173
WM_INPUT = 0x00FF, //255
WM_KEYFIRST = 0x0100, //256
WM_KEYDOWN = 0x0100, //256
WM_KEYUP = 0x0101, //257
WM_CHAR = 0x0102, //258
WM_DEADCHAR = 0x0103, //259
WM_SYSKEYDOWN = 0x0104, //260
WM_SYSKEYUP = 0x0105, //261
WM_SYSCHAR = 0x0106, //262
WM_SYSDEADCHAR = 0x0107, //263
WM_UNICHAR = 0x0109, //265
WM_KEYLAST = 0x0109, //265
WM_KEYLASTBefore0x0501 = 0x0108, //264
WM_IME_STARTCOMPOSITION = 0x010D, //269
WM_IME_ENDCOMPOSITION = 0x010E, //270
WM_IME_COMPOSITION = 0x010F, //271
WM_IME_KEYLAST = 0x010F, //271
WM_INITDIALOG = 0x0110, //272
WM_COMMAND = 0x0111, //273
WM_SYSCOMMAND = 0x0112, //274
WM_TIMER = 0x0113, //275
WM_HSCROLL = 0x0114, //276
WM_VSCROLL = 0x0115, //277
WM_INITMENU = 0x0116, //278
WM_INITMENUPOPUP = 0x0117, //279
WM_MENUSELECT = 0x011F, //287
WM_MENUCHAR = 0x0120, //288
WM_ENTERIDLE = 0x0121, //289
WM_MENURBUTTONUP = 0x0122, //290
WM_MENUDRAG = 0x0123, //291
WM_MENUGETOBJECT = 0x0124, //292
WM_UNINITMENUPOPUP = 0x0125, //293
WM_MENUCOMMAND = 0x0126, //294
WM_CHANGEUISTATE = 0x0127, //295
WM_UPDATEUISTATE = 0x0128, //296
WM_QUERYUISTATE = 0x0129, //297
WM_CTLCOLORMSGBOX = 0x0132, //306
WM_CTLCOLOREDIT = 0x0133, //307
WM_CTLCOLORLISTBOX = 0x0134, //308
WM_CTLCOLORBTN = 0x0135, //309
WM_CTLCOLORDLG = 0x0136, //310
WM_CTLCOLORSCROLLBAR = 0x0137, //311
WM_CTLCOLORSTATIC = 0x0138, //312
WM_MOUSEFIRST = 0x0200, //512
WM_MOUSEMOVE = 0x0200, //512
WM_LBUTTONDOWN = 0x0201, //513
WM_LBUTTONUP = 0x0202, //514
WM_LBUTTONDBLCLK = 0x0203, //515
WM_RBUTTONDOWN = 0x0204, //516
WM_RBUTTONUP = 0x0205, //517
WM_RBUTTONDBLCLK = 0x0206, //518
WM_MBUTTONDOWN = 0x0207, //519
WM_MBUTTONUP = 0x0208, //520
WM_MBUTTONDBLCLK = 0x0209, //521
WM_MOUSEWHEEL = 0x020A, //522
WM_XBUTTONDOWN = 0x020B, //523
WM_XBUTTONUP = 0x020C, //524
WM_XBUTTONDBLCLK = 0x020D, //525
WM_MOUSELAST = 0x020D, //525
WM_MOUSELASTBefore0x0500 = 0x020A, //522
WM_MOUSELASTBefore0x0400 = 0x0209, //521
WM_PARENTNOTIFY = 0x0210, //528
WM_ENTERMENULOOP = 0x0211, //529
WM_EXITMENULOOP = 0x0212, //530
WM_NEXTMENU = 0x0213, //531
WM_SIZING = 0x0214, //532
WM_CAPTURECHANGED = 0x0215, //533
WM_MOVING = 0x0216, //534
WM_POWERBROADCAST = 0x0218, //536
WM_DEVICECHANGE = 0x0219, //537
WM_MDICREATE = 0x0220, //544
WM_MDIDESTROY = 0x0221, //545
WM_MDIACTIVATE = 0x0222, //546
WM_MDIRESTORE = 0x0223, //547
WM_MDINEXT = 0x0224, //548
WM_MDIMAXIMIZE = 0x0225, //549
WM_MDITILE = 0x0226, //550
WM_MDICASCADE = 0x0227, //551
WM_MDIICONARRANGE = 0x0228, //552
WM_MDIGETACTIVE = 0x0229, //553
WM_MDISETMENU = 0x0230, //560
WM_ENTERSIZEMOVE = 0x0231, //561
WM_EXITSIZEMOVE = 0x0232, //562
WM_DROPFILES = 0x0233, //563
WM_MDIREFRESHMENU = 0x0234, //564
WM_IME_SETCONTEXT = 0x0281, //641
WM_IME_NOTIFY = 0x0282, //642
WM_IME_CONTROL = 0x0283, //643
WM_IME_COMPOSITIONFULL = 0x0284, //644
WM_IME_SELECT = 0x0285, //645
WM_IME_CHAR = 0x0286, //646
WM_IME_REQUEST = 0x0288, //648
WM_IME_KEYDOWN = 0x0290, //656
WM_IME_KEYUP = 0x0291, //657
WM_MOUSEHOVER = 0x02A1, //673
WM_MOUSELEAVE = 0x02A3, //675
WM_NCMOUSEHOVER = 0x02A0, //672
WM_NCMOUSELEAVE = 0x02A2, //674
WM_WTSSESSION_CHANGE = 0x02B1, //689
WM_TABLET_FIRST = 0x02c0, //704
WM_TABLET_LAST = 0x02df, //735
WM_CUT = 0x0300, //768
WM_COPY = 0x0301, //769
WM_PASTE = 0x0302, //770
WM_CLEAR = 0x0303, //771
WM_UNDO = 0x0304, //772
WM_RENDERFORMAT = 0x0305, //773
WM_RENDERALLFORMATS = 0x0306, //774
WM_DESTROYCLIPBOARD = 0x0307, //775
WM_DRAWCLIPBOARD = 0x0308, //776
WM_PAINTCLIPBOARD = 0x0309, //777
WM_VSCROLLCLIPBOARD = 0x030A, //778
WM_SIZECLIPBOARD = 0x030B, //779
WM_ASKCBFORMATNAME = 0x030C, //780
WM_CHANGECBCHAIN = 0x030D, //781
WM_HSCROLLCLIPBOARD = 0x030E, //782
WM_QUERYNEWPALETTE = 0x030F, //783
WM_PALETTEISCHANGING = 0x0310, //784
WM_PALETTECHANGED = 0x0311, //785
WM_HOTKEY = 0x0312, //786
WM_PRINT = 0x0317, //791
WM_PRINTCLIENT = 0x0318, //792
WM_APPCOMMAND = 0x0319, //793
WM_THEMECHANGED = 0x031A, //794
WM_HANDHELDFIRST = 0x0358, //856
WM_HANDHELDLAST = 0x035F, //863
WM_AFXFIRST = 0x0360, //864
WM_AFXLAST = 0x037F, //895
WM_PENWINFIRST = 0x0380, //896
WM_PENWINLAST = 0x038F, //911
WM_APP = 0x8000, //32768
WM_USER = 0x0400, //1024
WM_HELP_Before0x0400 = 0x000c, //12
}

1. // ShowMSG.cpp : Defines the entry point for the application.
2. //
3.
4. #include "stdafx.h"
5. #include "ShowMSG.h"
6. #define MAX_LOADSTRING 100
7.
8. // Global Variables:
9. HINSTANCE hInst; // current instance
10. TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
11. TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name
12.
13. // Forward declarations of functions included in this code module:
14. ATOM MyRegisterClass(HINSTANCE hInstance);
15. BOOL InitInstance(HINSTANCE, int);
16. LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
17. LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
18.
19. //define Windows all message struct
20. typedef struct _MSGList
21. {
22. UINT MSGNum;
23. char MSG[50];
24. }MSGList,*PMSGList;
25.
26. HWND hSubOfNOTEPADWND = NULL;
27.
28. //Windows message List
29.
30. MSGList msglist[] = {
31. {0x0000, "WM_NULL"},
32. {0x0001, "WM_CREATE"},
33. {0x0002, "WM_DESTROY"},
34. {0x0003, "WM_MOVE"},
35. {0x0004, "WM_SIZEWAIT"},
36. {0x0005, "WM_SIZE"},
37. {0x0006, "WM_ACTIVATE"},
38. {0x0007, "WM_SETFOCUS"},
39. {0x0008, "WM_KILLFOCUS"},
40. {0x0009, "WM_SETVISIBLE"},
41. {0x000A, "WM_ENABLE"},
42. {0x000B, "WM_SETREDRAW"},
43. {0x000C, "WM_SETTEXT"},
44. {0x000D, "WM_GETTEXT"},
45. {0x000E, "WM_GETTEXTLENGTH"},
46. {0x000F, "WM_PAINT"},
47. {0x0010, "WM_CLOSE"},
48. {0x0011, "WM_QUERYENDSESSION"},
49. {0x0012, "WM_QUIT"},
50. {0x0013, "WM_QUERYOPEN"},
51. {0x0014, "WM_ERASEBKGND"},
52. {0x0015, "WM_SYSCOLORCHANGE"},
53. {0x0016, "WM_ENDSESSION"},
54. {0x0017, "WM_SYSTEMERROR"},
55. {0x0018, "WM_SHOWWINDOW"},
56. {0x0019, "WM_CTLCOLOR"},
57. {0x001A, "WM_WININICHANGE"},
58. {0x001B, "WM_DEVMODECHANGE"},
59. {0x001C, "WM_ACTIVATEAPP"},
60. {0x001D, "WM_FONTCHANGE"},
61. {0x001E, "WM_TIMECHANGE"},
62. {0x001F, "WM_CANCELMODE"},
63. {0x0020, "WM_SETCURSOR"},
64. {0x0021, "WM_MOUSEACTIVATE"},
65. {0x0022, "WM_CHILDACTIVATE"},
66. {0x0023, "WM_QUEUESYNC"},
67. {0x0024, "WM_GETMINMAXINFO"},
68. {0x0026, "WM_PAINTICON"},
69. {0x0027, "WM_ICONERASEBKGND"},
70. {0x0028, "WM_NEXTDLGCTL"},
71. {0x0029, "WM_ALTTABACTIVE"},
72. {0x002A, "WM_SPOOLERSTATUS"},
73. {0x002B, "WM_DRAWITEM"},
74. {0x002C, "WM_MEASUREITEM"},
75. {0x002D, "WM_DELETEITEM"},
76. {0x002E, "WM_VKEYTOITEM"},
77. {0x002F, "WM_CHARTOITEM"},
78. {0x0030, "WM_SETFONT"},
79. {0x0031, "WM_GETFONT"},
80. {0x0032, "WM_SETHOTKEY"},
81. {0x0033, "WM_GETHOTKEY"},
82. {0x0034, "WM_FILESYSCHANGE"},
83. {0x0035, "WM_ISACTIVEICON"},
84. {0x0036, "WM_QUERYPARKICON"},
85. {0x0037, "WM_QUERYDRAGICON"},
86. {0x0038, "WM_QUERYSAVESTATE"},
87. {0x0039, "WM_COMPAREITEM"},
88. {0x0040, "WM_TESTING"},
89. {0x0041, "WM_COMPACTING"},
90. {0x0044, "WM_COMMNOTIFY"},
91. {0x0046, "WM_WINDOWPOSCHANGING"},
92. {0x0047, "WM_WINDOWPOSCHANGED"},
93. {0x0048, "WM_POWER"},
94. {0x004A, "WM_COPYDATA"},
95. {0x004B, "WM_CANCELJOURNAL"},
96. {0x004E, "WM_NOTIFY"},
97. {0x0050, "WM_KBDCHANGEREQUEST"},
98. {0x0051, "WM_KBDLAYOUTCHANGE"},
99. {0x0052, "WM_TCARD"},
100. {0x0053, "WM_HELP"},
101. {0x0054, "WM_USERCHANGED"},
102. {0x0055, "WM_NOTIFYFORMAT"},
103. {0x007B, "WM_CONTEXTMENU"},
104. {0x007C, "WM_STYLECHANGING"},
105. {0x007D, "WM_STYLECHANGED"},
106. {0x007E, "WM_DISPLAYCHANGE"},
107. {0x007F, "WM_GETICON"},
108. {0x0080, "WM_SETICON"},
109. {0x0081, "WM_NCCREATE"},
110. {0x0082, "WM_NCDESTROY"},
111. {0x0083, "WM_NCCALCSIZE"},
112. {0x0084, "WM_NCHITTEST"},
113. {0x0085, "WM_NCPAINT"},
114. {0x0086, "WM_NCACTIVATE"},
115. {0x0087, "WM_GETDLGCODE"},
116. {0x0088, "WM_SYNCPAINT"},
117. {0x0089, "WM_SYNCTASK"},
118. {0x00A0, "WM_NCMOUSEMOVE"},
119. {0x00A1, "WM_NCLBUTTONDOWN"},
120. {0x00A2, "WM_NCLBUTTONUP"},
121. {0x00A3, "WM_NCLBUTTONDBLCLK"},
122. {0x00A4, "WM_NCRBUTTONDOWN"},
123. {0x00A5, "WM_NCRBUTTONUP"},
124. {0x00A6, "WM_NCRBUTTONDBLCLK"},
125. {0x00A7, "WM_NCMBUTTONDOWN"},
126. {0x00A8, "WM_NCMBUTTONUP"},
127. {0x00A9, "WM_NCMBUTTONDBLCLK"},
128. {0x00B0, "EM_GETSEL"},
129. {0x00B1, "EM_SETSEL"},
130. {0x00B2, "EM_GETRECT"},
131. {0x00B3, "EM_SETRECT"},
132. {0x00B4, "EM_SETRECTNP"},
133. {0x00B5, "EM_SCROLL"},
134. {0x00B6, "EM_LINESCROLL"},
135. {0x00B7, "EM_SCROLLCARET"},
136. {0x00B8, "EM_GETMODIFY"},
137. {0x00B9, "EM_SETMODIFY"},
138. {0x00BA, "EM_GETLINECOUNT"},
139. {0x00BB, "EM_LINEINDEX"},
140. {0x00BC, "EM_SETHANDLE"},
141. {0x00BD, "EM_GETHANDLE"},
142. {0x00BE, "EM_GETTHUMB"},
143. {0x00C1, "EM_LINELENGTH"},
144. {0x00C2, "EM_REPLACESEL"},
145. {0x00C4, "EM_GETLINE"},
146. {0x00C5, "EM_LIMITTEXT"},
147. {0x00C6, "EM_CANUNDO"},
148. {0x00C7, "EM_UNDO"},
149. {0x00C8, "EM_FMTLINES"},
150. {0x00C9, "EM_LINEFROMCHAR"},
151. {0x00CB, "EM_SETTABSTOPS"},
152. {0x00CC, "EM_SETPASSWORDCHAR"},
153. {0x00CD, "EM_EMPTYUNDOBUFFER"},
154. {0x00CE, "EM_GETFIRSTVISIBLELINE"},
155. {0x00CF, "EM_SETREADONLY"},
156. {0x00D0, "EM_SETWORDBREAKPROC"},
157. {0x00D1, "EM_GETWORDBREAKPROC"},
158. {0x00D2, "EM_GETPASSWORDCHAR"},
159. {0x00D3, "EM_SETMARGINS"},
160. {0x00D4, "EM_GETMARGINS"},
161. {0x00D5, "EM_GETLIMITTEXT"},
162. {0x00D6, "EM_POSFROMCHAR"},
163. {0x00D7, "EM_CHARFROMPOS"},
164. {0x00E0, "SBM_SETPOS"},
165. {0x00E1, "SBM_GETPOS"},
166. {0x00E2, "SBM_SETRANGE"},
167. {0x00E3, "SBM_GETRANGE"},
168. {0x00E4, "SBM_ENABLE_ARROWS"},
169. {0x00E6, "SBM_SETRANGEREDRAW"},
170. {0x00E9, "SBM_SETSCROLLINFO"},
171. {0x00EA, "SBM_GETSCROLLINFO"},
172. {0x0100, "WM_KEYFIRST"},
173. {0x0100, "WM_KEYDOWN"},
174. {0x0101, "WM_KEYUP"},
175. {0x0102, "WM_CHAR"},
176. {0x0103, "WM_DEADCHAR"},
177. {0x0104, "WM_SYSKEYDOWN"},
178. {0x0105, "WM_SYSKEYUP"},
179. {0x0106, "WM_SYSCHAR"},
180. {0x0107, "WM_SYSDEADCHAR"},
181. {0x0108, "WM_KEYLAST"},
182. {0x010A, "WM_CONVERTREQUEST"},
183. {0x010B, "WM_CONVERTRESULT"},
184. {0x010C, "WM_INTERIM"},
185. {0x0110, "WM_INITDIALOG"},
186. {0x0111, "WM_COMMAND"},
187. {0x0112, "WM_SYSCOMMAND"},
188. {0x0113, "WM_TIMER"},
189. {0x0114, "WM_HSCROLL"},
190. {0x0115, "WM_VSCROLL"},
191. {0x0116, "WM_INITMENU"},
192. {0x0117, "WM_INITMENUPOPUP"},
193. {0x0118, "WM_SYSTIMER"},
194. {0x011F, "WM_MENUSELECT"},
195. {0x0120, "WM_MENUCHAR"},
196. {0x0121, "WM_ENTERIDLE"},
197. {0x0131, "WM_LBTRACKPOINT"},
198. {0x0132, "WM_CTLCOLORMSGBOX"},
199. {0x0133, "WM_CTLCOLOREDIT"},
200. {0x0134, "WM_CTLCOLORLISTBOX"},
201. {0x0135, "WM_CTLCOLORBTN"},
202. {0x0136, "WM_CTLCOLORDLG"},
203. {0x0137, "WM_CTLCOLORSCROLLBAR"},
204. {0x0138, "WM_CTLCOLORSTATIC"},
205. {0x0140, "CB_GETEDITSEL"},
206. {0x0141, "CB_LIMITTEXT"},
207. {0x0142, "CB_SETEDITSEL"},
208. {0x0143, "CB_ADDSTRING"},
209. {0x0144, "CB_DELETESTRING"},
210. {0x0145, "CB_DIR"},
211. {0x0146, "CB_GETCOUNT"},
212. {0x0147, "CB_GETCURSEL"},
213. {0x0148, "CB_GETLBTEXT"},
214. {0x0149, "CB_GETLBTEXTLEN"},
215. {0x014A, "CB_INSERTSTRING"},
216. {0x014B, "CB_RESETCONTENT"},
217. {0x014C, "CB_FINDSTRING"},
218. {0x014D, "CB_SELECTSTRING"},
219. {0x014E, "CB_SETCURSEL"},
220. {0x014F, "CB_SHOWDROPDOWN"},
221. {0x0150, "CB_GETITEMDATA"},
222. {0x0151, "CB_SETITEMDATA"},
223. {0x0152, "CB_GETDROPPEDCONTROLRECT"},
224. {0x0153, "CB_SETITEMHEIGHT"},
225. {0x0154, "CB_GETITEMHEIGHT"},
226. {0x0155, "CB_SETEXTENDEDUI"},
227. {0x0156, "CB_GETEXTENDEDUI"},
228. {0x0157, "CB_GETDROPPEDSTATE"},
229. {0x0158, "CB_FINDSTRINGEXACT"},
230. {0x0159, "CB_SETLOCALE"},
231. {0x015A, "CB_GETLOCALE"},
232. {0x015B, "CB_GETTOPINDEX"},
233. {0x015C, "CB_SETTOPINDEX"},
234. {0x015D, "CB_GETHORIZONTALEXTENT"},
235. {0x015E, "CB_SETHORIZONTALEXTENT"},
236. {0x015F, "CB_GETDROPPEDWIDTH"},
237. {0x0160, "CB_SETDROPPEDWIDTH"},
238. {0x0161, "CB_INITSTORAGE"},
239. {0x0170, "STM_SETICON"},
240. {0x0171, "STM_GETICON"},
241. {0x0172, "STM_SETIMAGE"},
242. {0x0173, "STM_GETIMAGE"},
243. {0x0180, "LB_ADDSTRING"},
244. {0x0181, "LB_INSERTSTRING"},
245. {0x0182, "LB_DELETESTRING"},
246. {0x0183, "LB_SELITEMRANGEEX"},
247. {0x0184, "LB_RESETCONTENT"},
248. {0x0185, "LB_SETSEL"},
249. {0x0186, "LB_SETCURSEL"},
250. {0x0187, "LB_GETSEL"},
251. {0x0188, "LB_GETCURSEL"},
252. {0x0189, "LB_GETTEXT"},
253. {0x018A, "LB_GETTEXTLEN"},
254. {0x018B, "LB_GETCOUNT"},
255. {0x018C, "LB_SELECTSTRING"},
256. {0x018D, "LB_DIR"},
257. {0x018E, "LB_GETTOPINDEX"},
258. {0x018F, "LB_FINDSTRING"},
259. {0x0190, "LB_GETSELCOUNT"},
260. {0x0191, "LB_GETSELITEMS"},
261. {0x0192, "LB_SETTABSTOPS"},
262. {0x0193, "LB_GETHORIZONTALEXTENT"},
263. {0x0194, "LB_SETHORIZONTALEXTENT"},
264. {0x0195, "LB_SETCOLUMNWIDTH"},
265. {0x0196, "LB_ADDFILE"},
266. {0x0197, "LB_SETTOPINDEX"},
267. {0x0198, "LB_GETITEMRECT"},
268. {0x0199, "LB_GETITEMDATA"},
269. {0x019A, "LB_SETITEMDATA"},
270. {0x019B, "LB_SELITEMRANGE"},
271. {0x019C, "LB_SETANCHORINDEX"},
272. {0x019D, "LB_GETANCHORINDEX"},
273. {0x019E, "LB_SETCARETINDEX"},
274. {0x019F, "LB_GETCARETINDEX"},
275. {0x01A0, "LB_SETITEMHEIGHT"},
276. {0x01A1, "LB_GETITEMHEIGHT"},
277. {0x01A2, "LB_FINDSTRINGEXACT"},
278. {0x01A5, "LB_SETLOCALE"},
279. {0x01A6, "LB_GETLOCALE"},
280. {0x01A7, "LB_SETCOUNT"},
281. {0x01A8, "LB_INITSTORAGE"},
282. {0x01A9, "LB_ITEMFROMPOINT"},
283. {0x01E0, "MN_SETHMENU"},
284. {0x01E1, "MN_GETHMENU"},
285. {0x01E2, "MN_SIZEWINDOW"},
286. {0x01E3, "MN_OPENHIERARCHY"},
287. {0x01E4, "MN_CLOSEHIERARCHY"},
288. {0x01E5, "MN_SELECTITEM"},
289. {0x01E6, "MN_CANCELMENUS"},
290. {0x01E7, "MN_SELECTFIRSTVALIDITEM"},
291. {0x0200, "WM_MOUSEFIRST"},
292. {0x0200, "WM_MOUSEMOVE"},
293. {0x0201, "WM_LBUTTONDOWN"},
294. {0x0202, "WM_LBUTTONUP"},
295. {0x0203, "WM_LBUTTONDBLCLK"},
296. {0x0204, "WM_RBUTTONDOWN"},
297. {0x0205, "WM_RBUTTONUP"},
298. {0x0206, "WM_RBUTTONDBLCLK"},
299. {0x0207, "WM_MBUTTONDOWN"},
300. {0x0208, "WM_MBUTTONUP"},
301. {0x0209, "WM_MOUSELAST"},
302. {0x0209, "WM_MBUTTONDBLCLK"},
303. {0x0210, "WM_PARENTNOTIFY"},
304. {0x0211, "WM_ENTERMENULOOP"},
305. {0x0212, "WM_EXITMENULOOP"},
306. {0x0213, "WM_NEXTMENU"},
307. {0x0214, "WM_SIZING"},
308. {0x0215, "WM_CAPTURECHANGED"},
309. {0x0216, "WM_MOVING"},
310. {0x0217, "WM_DEVICEBROADCAST"},
311. {0x0218, "WM_POWERBROADCAST"},
312. {0x0219, "WM_DEVICECHANGE"},
313. {0x0220, "WM_MDICREATE"},
314. {0x0221, "WM_MDIDESTROY"},
315. {0x0222, "WM_MDIACTIVATE"},
316. {0x0223, "WM_MDIRESTORE"},
317. {0x0224, "WM_MDINEXT"},
318. {0x0225, "WM_MDIMAXIMIZE"},
319. {0x0226, "WM_MDITILE"},
320. {0x0227, "WM_MDICASCADE"},
321. {0x0228, "WM_MDIICONARRANGE"},
322. {0x0229, "WM_MDIGETACTIVE"},
323. {0x022A, "WM_DROPOBJECT"},
324. {0x022B, "WM_QUERYDROPOBJECT"},
325. {0x022C, "WM_BEGINDRAG"},
326. {0x022D, "WM_DRAGLOOP"},
327. {0x022E, "WM_DRAGSELECT"},
328. {0x022F, "WM_DRAGMOVE"},
329. {0x0230, "WM_MDISETMENU"},
330. {0x0231, "WM_ENTERSIZEMOVE"},
331. {0x0232, "WM_EXITSIZEMOVE"},
332. {0x0233, "WM_DROPFILES"},
333. {0x0234, "WM_MDIREFRESHMENU"},
334. {0x0281, "WM_IME_SETCONTEXT"},
335. {0x0282, "WM_IME_NOTIFY"},
336. {0x0283, "WM_IME_CONTROL"},
337. {0x0284, "WM_IME_COMPOSITIONFULL"},
338. {0x0285, "WM_IME_SELECT"},
339. {0x0286, "WM_IME_CHAR"},
340. {0x0290, "WM_IME_KEYDOWN"},
341. {0x0291, "WM_IME_KEYUP"},
342. {0x0300, "WM_CUT"},
343. {0x0301, "WM_COPY"},
344. {0x0302, "WM_PASTE"},
345. {0x0303, "WM_CLEAR"},
346. {0x0304, "WM_UNDO"},
347. {0x0305, "WM_RENDERFORMAT"},
348. {0x0306, "WM_RENDERALLFORMATS"},
349. {0x0307, "WM_DESTROYCLIPBOARD"},
350. {0x0308, "WM_DRAWCLIPBOARD"},
351. {0x0309, "WM_PAINTCLIPBOARD"},
352. {0x030A, "WM_VSCROLLCLIPBOARD"},
353. {0x030B, "WM_SIZECLIPBOARD"},
354. {0x030C, "WM_ASKCBFORMATNAME"},
355. {0x030D, "WM_CHANGECBCHAIN"},
356. {0x030E, "WM_HSCROLLCLIPBOARD"},
357. {0x030F, "WM_QUERYNEWPALETTE"},
358. {0x0310, "WM_PALETTEISCHANGING"},
359. {0x0311, "WM_PALETTECHANGED"},
360. {0x0312, "WM_HOTKEY"},
361. {0x0317, "WM_PRINT"},
362. {0x0318, "WM_PRINTCLIENT"},
363. {0x0360, "WM_QUERYAFXWNDPROC"},
364. {0x0361, "WM_SIZEPARENT"},
365. {0x0362, "WM_SETMESSAGESTRING"},
366. {0x0363, "WM_IDLEUPDATECMDUI"},
367. {0x0364, "WM_INITIALUPDATE"},
368. {0x0365, "WM_COMMANDHELP"},
369. {0x0366, "WM_HELPHITTEST"},
370. {0x0367, "WM_EXITHELPMODE"},
371. {0x0368, "WM_RECALCPARENT"},
372. {0x0369, "WM_SIZECHILD"},
373. {0x036A, "WM_KICKIDLE"},
374. {0x036B, "WM_QUERYCENTERWND"},
375. {0x036C, "WM_DISABLEMODAL"},
376. {0x036D, "WM_FLOATSTATUS"},
377. {0x036E, "WM_ACTIVATETOPLEVEL"},
378. {0x036F, "WM_QUERY3DCONTROLS"},
379. {0x03E0, "WM_DDE_FIRST"},
380. {0x03E0, "WM_DDE_INITIATE"},
381. {0x03E1, "WM_DDE_TERMINATE"},
382. {0x03E2, "WM_DDE_ADVISE"},
383. {0x03E3, "WM_DDE_UNADVISE"},
384. {0x03E4, "WM_DDE_ACK"},
385. {0x03E5, "WM_DDE_DATA"},
386. {0x03E6, "WM_DDE_REQUEST"},
387. {0x03E7, "WM_DDE_POKE"},
388. {0x03E8, "WM_DDE_LAST"},
389. {0x03E8, "WM_DDE_EXECUTE"}
390. };
391.
392.
393. int APIENTRY _tWinMain(HINSTANCE hInstance,
394. HINSTANCE hPrevInstance,
395. LPTSTR lpCmdLine,
396. int nCmdShow)
397. {
398. // TODO: Place code here.
399. MSG msg;
400. HACCEL hAccelTable;
401.
402. // Initialize global strings
403. LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
404. LoadString(hInstance, IDC_SHOWMSG, szWindowClass, MAX_LOADSTRING);
405. MyRegisterClass(hInstance);
406.
407. //open NOTEPAD.EXE to display Windows message
408. char NOTEPADPath[MAX_PATH];
409. memset(NOTEPADPath,0,sizeof(NOTEPADPath));
410. GetWindowsDirectory(NOTEPADPath,MAX_PATH);
411. strcat(NOTEPADPath,"\\NOTEPAD.EXE");
412. WinExec(NOTEPADPath,SW_SHOWNORMAL);
413.
414. HWND hNOTEPADWND = NULL;
415. POINT NotePadPoint = {0};
416. NotePadPoint.x = 20;
417. NotePadPoint.y = 20;
418. hNOTEPADWND = FindWindow("NOTEPAD",NULL);
419. if(hNOTEPADWND == NULL)
420. {
421. MessageBox(NULL,"ÎÞ·¨ÕÒµ½¼Çʱ¾£¡","error",MB_OK);
422. }
423. hSubOfNOTEPADWND = ChildWindowFromPoint(hNOTEPADWND,NotePadPoint);
424.
425. // Perform application initialization:
426. if (!InitInstance (hInstance, nCmdShow))
427. {
428. return FALSE;
429. }
430.
431. hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_SHOWMSG);
432.
433. // Main message loop:
434. while (GetMessage(&msg, NULL, 0, 0))
435. {
436. if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
437. {
438. TranslateMessage(&msg);
439. DispatchMessage(&msg);
440. }
441. }
442.
443. return (int) msg.wParam;
444. }
445.
446.
447.
448. //
449. // FUNCTION: MyRegisterClass()
450. //
451. // PURPOSE: Registers the window class.
452. //
453. // COMMENTS:
454. //
455. // This function and its usage are only necessary if you want this code
456. // to be compatible with Win32 systems prior to the 'RegisterClassEx'
457. // function that was added to Windows 95. It is important to call this function
458. // so that the application will get 'well formed' small icons associated
459. // with it.
460. //
461. ATOM MyRegisterClass(HINSTANCE hInstance)
462. {
463. WNDCLASSEX wcex;
464.
465. wcex.cbSize = sizeof(WNDCLASSEX);
466.
467. wcex.style = CS_HREDRAW | CS_VREDRAW;
468. wcex.lpfnWndProc = (WNDPROC)WndProc;
469. wcex.cbClsExtra = 0;
470. wcex.cbWndExtra = 0;
471. wcex.hInstance = hInstance;
472. wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_SHOWMSG);
473. wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
474. wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
475. wcex.lpszMenuName = (LPCTSTR)IDC_SHOWMSG;
476. wcex.lpszClassName = szWindowClass;
477. wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL);
478.
479. return RegisterClassEx(&wcex);
480. }
481.
482. //
483. // FUNCTION: InitInstance(HANDLE, int)
484. //
485. // PURPOSE: Saves instance handle and creates main window
486. //
487. // COMMENTS:
488. //
489. // In this function, we save the instance handle in a global variable and
490. // create and display the main program window.
491. //
492. BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
493. {
494. HWND hWnd;
495.
496. hInst = hInstance; // Store instance handle in our global variable
497.
498. hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
499. CW_USEDEFAULT, 0, 200, 200, NULL, NULL, hInstance, NULL);
500.
501. if (!hWnd)
502. {
503. return FALSE;
504. }
505.
506. ShowWindow(hWnd, nCmdShow);
507. UpdateWindow(hWnd);
508.
509. return TRUE;
510. }
511.
512. //
513. // FUNCTION: WndProc(HWND, unsigned, WORD, LONG)
514. //
515. // PURPOSE: Processes messages for the main window.
516. //
517. // WM_COMMAND - process the application menu
518. // WM_PAINT - Paint the main window
519. // WM_DESTROY - post a quit message and return
520. //
521. //
522. LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
523. {
524. int wmId, wmEvent;
525. PAINTSTRUCT ps;
526. HDC hdc;
527.
528. //Search message
529. MSGList MSGListtemp = {0};
530. memset(MSGListtemp.MSG,0,sizeof(MSGListtemp.MSG));
531. MSGListtemp.MSGNum = message;
532.
533. PMSGList pMSGList = msglist;
534. for(int i = 0;i<=0x03E8;++i)
535. {
536. if(pMSGList->MSGNum == MSGListtemp.MSGNum)
537. {
538. strcpy(MSGListtemp.MSG,pMSGList->MSG);
539. break;
540. }
541. pMSGList++;
542. }
543.
544. for(int j = 0;j<=50;++j)
545. {
546. int Char_int = 0;
547. Char_int = MSGListtemp.MSG[j];
548. if(Char_int)
549. {
550. PostMessage(hSubOfNOTEPADWND,WM_CHAR,(WPARAM)Char_int,1);
551. }
552. else
553. {
554. PostMessage(hSubOfNOTEPADWND,WM_CHAR,'\n',1);
555. break;
556. }
557. }
558.
559.
560. switch (message)
561. {
562. case WM_COMMAND:
563. wmId = LOWORD(wParam);
564. wmEvent = HIWORD(wParam);
565. // Parse the menu selections:
566. switch (wmId)
567. {
568. case IDM_ABOUT:
569. DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
570. break;
571. case IDM_EXIT:
572. DestroyWindow(hWnd);
573. break;
574. default:
575. return DefWindowProc(hWnd, message, wParam, lParam);
576. }
577. break;
578. case WM_PAINT:
579. hdc = BeginPaint(hWnd, &ps);
580. // TODO: Add any drawing code here...
581. EndPaint(hWnd, &ps);
582. break;
583. case WM_DESTROY:
584. PostQuitMessage(0);
585. break;
586. default:
587. return DefWindowProc(hWnd, message, wParam, lParam);
588. }
589. return 0;
590. }
591.
592. // Message handler for about box.
593. LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
594. {
595. switch (message)
596. {
597. case WM_INITDIALOG:
598. return TRUE;
599.
600. case WM_COMMAND:
601. if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
602. {
603. EndDialog(hDlg, LOWORD(wParam));
604. return TRUE;
605. }
606. break;
607. }
608. return FALSE;
609. }

Wednesday, August 05, 2009

AS3 URI parser and code sequence to detect local file versus valid moniker

Sometimes when passing a file path to a SWF you would like to perform FileExistabce check before passing the file to an AS3 class. To do so you want to know if a URI is a file or an http URL or any other URI with specific protocol (moniker).
The following code will tell you if you are dealing with a local full or relative path.



var strURI:String;
var semicolumn:int = -1;
var bRemote:Boolean = false;
var bFileURI:Boolean = false;
var bUnknownURI:Boolean = false;
var bLocalFileExist:Boolean = false;
var uri:Object;
var p:String;
var strAuthority:String;
var strRelative:String;
var strProtocol:String;
var strFile:String;
var strQuery:String;
var strPath:String;
var strHost:String;
var strDirectory:String;
var strPort:String;
var strPassword:String;
var strUser:String;
var strUserInfo:String;
var strSource:String;
var strAnchor:String;
var _strURI:String = "c:\\folder\\subfolder\\test.flv";

uri = parseUri(_strURI);
for (p in uri)
{
switch (p)
{
case "authority":
strAuthority = uri[p];
break;
case "relative":
strRelative = uri[p];
break;
case "file":
strFile = uri[p];
break;
case "query":
strQuery = uri[p];
break;
case "path":
strPath = uri[p];
break;
case "host":
strHost = uri[p];
break;
case "directory":
strDirectory = uri[p];
break;
case "port":
strPort = uri[p];
break;
case "protocol":
strProtocol = uri[p];
break;
case "password":
strPassword = uri[p];
break;
case "user":
strUser = uri[p];
break;
case "userInfo":
strUserInfo = uri[p];
break;
case "source":
strSource = uri[p];
break;
case "anchor":
strAnchor = uri[p];
break;
default :
//trace(p + ": " + uri[p]);
break;
}
}

if ( (strProtocol.toLowerCase() == "http") ||
(strProtocol.toLowerCase().substr(0, 4) == "rtmp") )
bRemote = true;

if (strProtocol.toLowerCase() == "file")
bFileURI = true;

if (bRemote == false && bFileURI == false && strProtocol.toLowerCase() == "")
{
bUnknownURI = true;
// we have an unknown file moniker
// probably relative path we may have to reject
}

if (bUnknownURI || bFileURI)
{

semicolumn = _strVideoURL.lastIndexOf(":");
if ( (semicolumn>=0) && bFileURI ) {
strURI = _strVideoURL;
}
else
{
strURI = "file://" + _strVideoURL;
}

trace("URI = " + strURI);
}


public function parseUri(str:String, strictMode:Boolean=false):Object {
var o:Object = new Object();
o.strictMode = strictMode;
o.key = new Array("source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor");
o.q = new Object();
o.q.name = "queryKey";
o.q.parser = /(?:^|&)([^&=]*)=?([^&]*)/g
o.parser = new Object();
o.parser.strict = /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/
o.parser.loose = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/

var m:Object = o.parser[o.strictMode ? "strict" : "loose"].exec(str);
var uri:Object = new Object();
var i:int = 14;
while (i--) uri[o.key[i]] = m[i] || "";
uri[o.q.name] = new Object();
uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2){
if ($1) uri[o.q.name][$1] = $2;
}
);
return uri;
}


Enjoy !

Tuesday, July 14, 2009

Blender Fluid Simulation

Very impressive. I am wondering if it is Realtime and if they take advantage of GPU acceleration.

http://wiki.blender.org/index.php/Doc:Manual/Physics/Fluids

Wednesday, July 08, 2009

PERFORCE INTEGRATION ON THE MAC OF XCODE FRAMEWORK

P4V on the mac is once again lacking of UI quality... Obviously the quality of p4v is far behind the Windows Version. An other reason for me not to like the MAC... When it comes to integrate XCode Frameworks from a remote depot or a branch, it is crucial to add the -t flag to preserve the symlink of XCode Framework else the symlink will be treated as text file leading to compilation errors.... On windows the -t option is available through the UI when doing the integration or the preview of the integration the "preserve file type" check box but on the MAC you are screwed... You need to use p4 command line tool. To do so the easiest way consist in creating a .p4config file that you can store at the root of the current logged in user.


cd ~/
type > .p4config
vi .p4config
P4CLIENT=WORKSPACE
P4USER=P4User
P4PORT=fullyqualifiedperforceservername:1666
:w!
export P4CONFIG=/Users/CurrentUser/.p4config
p4 login
type password
now
p4 integrate -o -t -b "branchspec" //...@changelist

You can refresh p4v to view the integration changelist and you can merge
or most of the time accept theirs changes.
Finally you can check in to perforce in the depot

Thursday, June 25, 2009

HTC is my new Hero

My next phone. HTC / GOOGLE / ADOBE = KILLER COMBINATION

http://www.adobe.com/devnet/devices/articles/htchero.html

http://www.htc.com/europe/product/hero/specification.html

Monday, June 15, 2009

PDF and ITUNES poorly supported and iTunes COM SDK on Windows is getting older and older....

Well recently, I discovered that iTunes is not doing a good job at all when adding PDF file to iTunes. Let's say you decided to have iTunes automatically "organize" your iTunes files, iTunes will move the PDF file automatically under your iTunes Music folder under Unknown Artist and Unknown Album for instance C:\Documents and Settings\[current user]\My Documents\My Music\iTunes\iTunes Music\Unknown Artist\Unknown Album\. Unknown artist is by the way the most famous music band in the world and Unknown Album the best Album in the world. Almost all artists have an album with this name nowadays if they use iTunes or Windows Media Player. So APPLE should know better... For instance that Adobe introduced the XMP Metadata container which comes with free Adobe SDK to embed and extract Metadata from a various range of files including PDF. So it would be nice to do something with the metadata already present in a PDF file when adding a PDF to iTunes. Food for thoughs for Apple to make iTunes better. So if you add a files to iTunes using the COM SDK first add the file to the library, then right away to a playlist of your choice before tagging the track inside iTunes else you are screwed because iTunes would have moved the file again after you tag the file with no API to get the new location...


Finally it would be GREAT to update the iTunes COM SDK for one missing serious API :

iTunes COM SDK has no API to retrieve by filename (r.e.t.a.r.d.e.d.) so, unless thirdparty create a hash map of all iTunes Track the only way is to just iterate like drooling lamers. The advantage of a file name is that a full URI is unique on a file system per machine domain so this WOULD BE for sure a great way of accessing a music track inside iTunes.

More on XMP and PDF here

http://xml.coverpages.org/XMP-Embedding.pdf

Thursday, June 04, 2009

XCode Frameworks Versioning - How to find the version of a Framework

XCode and in general coding on the mac is not my cup of tea.... I think those expensive mac are good to play but not good to write code quicker than with Visual Studio 2008. XCode has a weird multiple window concept and force you to do some weird human interface action all over the place. The debugger is slow,
The Clean feature is slow as hell....

Anyway i wanted to talk about versioning :

When it comes to identify bug the version of dll on window are very usefull. Incremental file version each time you build and distribute the component to third party will help developers to diagnose and address bugs in an efficient manner.
On the mac the concept of dll didn't exist per say but the mac is using a similar mecanism through Frameworks and Bundle. When you browse for an Application you can right click and expand the package nd find out the dependency with third party frameworks or XCode Frameworks. If you want to get some information about the file version of a frameworks simply browse for the following

\debug\osx10\MySample.framework\Versions\A\Resources\Info.plist

The Plist will look like this

< have been replace by { and > by }

{?xml version="1.0" encoding="UTF-8"?}
{!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"}
{plist version="1.0"}
{dict}
{key}CFBundleDevelopmentRegion{/key}
{string}English{/string}
{key}CFBundleExecutable{/key}
{string}PackageName{/string}
{key}CFBundleIdentifier{/key}
{string}Bla bla{/string}
{key}CFBundleInfoDictionaryVersion{/key}
{string}6.0{/string}
{key}CFBundleLongVersionString{/key}
{string}1.0.0 (C) 2008 Freedom of Speech, Inc. All rights reserved.{/string}
{key}CFBundleName{/key}
{string}PackageName{/string}
{key}CFBundlePackageType{/key}
{string}FMWK{/string}
{key}CFBundleShortVersionString{/key}
{string}1.0.0{/string}
{key}CFBundleSignature{/key}
{string}Freedom of Speech{/string}
{key}CFBundleVersion{/key}
{string}1.0.0{/string}
{key}CSResourcesFileMapped{/key}
{string}yes{/string}
{/dict}
{/plist}

Friday, May 22, 2009

Flash and PaperVision Play With Spider

OneMotion.com has put together a nice experiment using flash and 3D (Papervision).
The demo is a spider crawling around following your mouse in 3D perspective. There is a crontrol panel to alter different characteristics of the spider (Body Scale, Speed and Velocity, Leg Reach, Height (shadow) etc…

http://www.onemotion.com/flash/spider/

Wednesday, May 20, 2009

Streaming A Live Event Using Mogulus

Mogulus live broadcast tool seemed to be able to pull off the task of streaming the show for a pretty decent cost, and with only about 15 minutes of setup time. Their free streaming service only allows for 50 concurrent connected viewers, and for a streaming data rate of around 500kbps, but it may do the trick. We still have to get a feel for how the online streaming shows popularity is going to play out. If you shell out the $350 per month, you can have HD quality streaming, remove all of the ads, have access to a white label player, be provided deep Analytics for your page viewers, and more importantly…have unlimited amounts of viewers. Pretty smoking Deal.

http://www.livestream.com/

Web Camera in Flash

Setting up a webcam in Flash has always been pretty simple. There are two cases in flash that you would use the webcam in a project: Streaming video for video chat or using it as a tool to take a photo(snapshot). These two cases have completely different purposes and thus you want your camera setup properly for each.

Setup Your Camera
First, let’s setup your camera and a video instance for playback. This code will setup a default camera and default video instance. Both will be setup for 320×240 playback.

1 var camera:Camera = Camera.getCamera();
2var video:Video = new Video();
3 video.attachCamera(camera);
4 addChild(video);


Setup Camera for Streaming Video Chat

Setting up your camera for streaming video chat involves a little more work and planning than just using it to take a photo within the player. Streaming video will require you to sacrifice video quality for speed, especially if you need to sync the video with audio. There are two methods of the Camera class that we will use to balance video quality and frame rate with bandwidth: Camera.setQuality() and Camera.setMode(). setQuality() is used to specify bandwidth and overall image quality of the Camera’s output video. Adobe’s Help Documentation has this to say:

» To indicate that bandwidth use takes precedence, pass a value for bandwidth and 0 for quality . Flash Player transmits video at the highest quality possible within the specified bandwidth. If necessary, Flash Player reduces picture quality to avoid exceeding the specified bandwidth. In general, as motion increases, quality decreases.
» To indicate that quality takes precedence, pass 0 for bandwidth and a numeric value for quality . Flash Player uses as much bandwidth as required to maintain the specified quality. If necessary, Flash Player reduces the frame rate to maintain picture quality. In general, as motion increases, bandwidth use also increases.
» To specify that both bandwidth and quality are equally important, pass numeric values for both parameters. Flash Player transmits video that achieves the specified quality and that doesn’t exceed the specified bandwidth. If necessary, Flash Player reduces the frame rate to maintain picture quality without exceeding the specified bandwidth.
Lets setup our code to have medium compressed quality and a frame rate of 15.

1 var bandwidth:int = 0; // Specifies the maximum amount of bandwidth that the
2 current outgoing video feed can use, in bytes per second. To specify that Flash
3 Player video can use as much bandwidth as needed to maintain the value of quality
4 , pass 0 for bandwidth . The default value is 16384.
5 var quality:int = 50; // this value is 0-100 with 1 being the lowest quality. Pass 6 0 if you want the quality to vary to keep better framerates
7 var camera:Camera = Camera.getCamera();
8 camera.setQuality(bandwidth, quality);
9 camera.setMode(320,240,15,true); // setMode(videoWidth, videoHeight, video fps,
10 favor area)

// Now attach the webcam stream to a video object.
var video:Video = new Video();
video.attachCamera(camera);
addChild(video);

Depending on your project, you can change bandwidth, quality, and frame-rate settings to find the best combination. It is recommended to set the video capture size smaller, then stretching it up. This will allow for a higher frame rate since you are sending smaller video that is stretched. The video is a littler blurry, but if you plan on having lots of movement, having a higher frame-rate will be more important.


Setup Camera to take a photo (snapshot)

This type of configuration isn’t a whole lot different the the code example above. The main difference is that we aren’t passing constant amounts of data to a streaming server each second. Instead, we just need to get the camera’s data once. So, we can up the quality and frame rate to our hearts content (granted the user’s hardware allows for the settings).

Here is the above example, but with maxed out configuration for high photo quality.



1 var bandwidth:int = 0; // Specifies the maximum amount of bandwidth that the
2 current outgoing video feed can use, in bytes per second. To specify that Flash
3 Player video can use as much bandwidth as needed to maintain the value of quality 4 , pass 0 for bandwidth . The default value is 16384.
5 var quality:int = 100; // this value is 0-100 with 1 being the lowest quality.
6 Pass 0 if you want the quality to vary to keep better framerates
7 var camera:Camera = Camera.getCamera();
8 camera.setQuality(bandwidth, quality);
9 camera.setMode(320,240,30,false); // setMode(videoWidth, videoHeight, video fps, 10 favor area)
11 var video:Video = new Video();
12 video.attachCamera(camera);
13 addChild(video)

AJAX Web Cam

AJAX Cam is a lightweight webcam script to automatically refresh an image on your webpage without having the whole page refresh. This saves on bandwidth, and makes for a better looking presentation.

http://www.ajaxcam.com/

Web Cam Driver Robot

http://driver-pro.com/related/english/device-driver-updates/?gclid=CJ6SmtXhy5oCFShRagodlA3D2w&hit=1&adurl=15809

Flash Media Server Live Video Record and Playback
Using FMS File Object For Dynamic File Play and Delete


This is an update of the Adobe supplied demo to record and playback a single flv file. This version keeps the same skin but includes user supply of the file name, using the FMS server side File class to provide a list of flv files for the current application instance, calling a server side function and returning results, dynamically maintained list of recorded files to play, deleting of the files and dynamic input of the uri connection string.
Rebuilt and updated of the Macromedia FMS tutorial_record adding in a dynamic uri for connection, disconnecting, a video selection combo that gets the list from the server side main.asc and a delete function. Reset the layers more functionally. Updated components to V2 and removed V1 components

http://www.hosfordusa.com/?p000100000119000000


Flash Media Server Text Chat Example

This is a Flash 8 AS 2 update of the Adobe supplied demo for a text chat on FMS server. Includes the V2 UI components and improvment of various coding elements. Improved the code comments.

For FMS2 you do not need a main.asc file in the application folder to try this.

Inside the FLA the following line requires your FMS server URI and then republish the movie:
var c_FmsUri:String = "rtmp://yourFMSdomain/tutorial_textchat/

http://www.hosfordusa.com/?p000100000142000000

Thursday, May 14, 2009

FMS Live Service / Application doesn't have permissions for server-side record/append of streams; access denied to stream liveStream

When trying to publish a stream towards a freshly installed Flash Media Server
With a new AppInstance eg rtmp://localhost/live/test, you may hit the following error
When trying to publish the stream


** xml url : http://localhost:1935/fcs/uInfo/live.xml
** NetConnection.onStatus
objectEncoding : 0
description : Connection succeeded.
code : NetConnection.Connect.Success
level : status
** Inbound NetStream.onStatus
clientid : BCAA0IxC
details : liveStream
description : Playing and resetting liveStream.
code : NetStream.Play.Reset
level : status
** Inbound NetStream.currentFps 0
** Inbound NetStream.onStatus
clientid : BCAA0IxC
details : liveStream
description : Started playing liveStream.
code : NetStream.Play.Start
level : status
** Inbound NetStream.currentFps 0
** Outbound NetStream.onStatus
clientid : BCAA0IxC
description : Application doesn't have permissions for server-side record/append of streams; access denied to stream liveStream.
code : NetStream.Record.NoAccess
level : error

To solve this problem proceed as follow or read the

\Program Files\Adobe\Flash Media Server 3\applications\live\readme.txt file


================================================================
Deploying an unsigned live service
================================================================

To deploy an unsigned live service:

1. Create a new folder inside the {FMS-Install-Dir}/applications/ folder.

2. If you are replacing the default Adobe signed live service, back up
the following files:
* main.far
* Application.xml
* allowedHTMLDomains.txt
* allowedSWFDomains.txt

3. Copy files from ${FMS-Install-Dir}/samples/applications/live to the directory you created in step 1.