Page 1 of 1

Undocumented functions

Posted: Sun Dec 28, 2014 8:14 pm
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

Re: Undocumented functions

Posted: Sun Dec 28, 2014 9:03 pm
by mol
thanks for inform us!

Re: Undocumented functions

Posted: Sun Dec 28, 2014 9:05 pm
by Javier Tovar
Hola Pablo César,

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

Un abrazo!