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
Has thanked: 100 times
Been thanked: 182 times

Undocumented functions

Post by Pablo César » Sun Dec 28, 2014 8:14 pm

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

User avatar
mol
Posts: 3220
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 224 times
Been thanked: 125 times
Contact:

Post by mol » Sun Dec 28, 2014 9:03 pm

thanks for inform us!

Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México
Has thanked: 1 time
Been thanked: 2 times

Post by Javier Tovar » Sun Dec 28, 2014 9:05 pm

Hola Pablo César,

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

Un abrazo!

Post Reply