Undocumented functions

Topic Specific Tutorials and Tips.

Moderator: Rathinagiri

Post Reply
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Undocumented functions

Post by Pablo César »

I came to announce some HMG functions that could be very useful and is good to know it.

InsertTab()
InsertShiftTab()
InsertBackSpace()
InsertPoint() // for decimal
ExitGridCell() => F2 key
InsertEsc()


Its names speaks for itself :!: :D

Recently I have included in my this example as UDF, a new function to reproduce the Ctrl-Z, very useful to UNDO in TEXT/EDIT fields. Hereunder the code:

Code: Select all

#pragma BEGINDUMP

#include <windows.h>

#define VK_Z	90

HB_FUNC( INSERTCONTROLZ )
{
	keybd_event(
		VK_CONTROL,	// virtual-key code
		0,		    // hardware scan code
		0,		    // flags specifying various function options
		0		    // additional data associated with keystroke
	);

	keybd_event(
		VK_Z,	// virtual-key code
		0,		// hardware scan code
		0,		// flags specifying various function options
		0		// additional data associated with keystroke
	);

	keybd_event(
		VK_CONTROL,	     // virtual-key code
		0,		         // hardware scan code
		KEYEVENTF_KEYUP, // flags specifying various function options
		0		         // additional data associated with keystroke
	);
}
#pragma ENDDUMP
I would like to make UNDO in numeric fields too, but I have no idea how to do it without saving at any temporary variable. :(

I hope I was informative and helpful. :D
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: Undocumented functions

Post by Javier Tovar »

Hola Pablo César,

Claro que siempre es valiosa tu ayuda e información!

Un abrazo!
Post Reply