ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 hyiedefs constants

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
PeterPanino Posted - May 05 2025 : 09:43:49
hyiedefs.pas declares some key constants:

// Key Constants
  VK_1      = 49;
  VK_2      = 50;
  VK_5      = 53;
  VK_A      = 65;
  VK_B      = 66;
  VK_C      = 67;
  VK_D      = 68;
  VK_E      = 69;
  VK_F      = 70;
  VK_G      = 71;
  VK_H      = 72;
  VK_I      = 73;
  VK_J      = 74;
  VK_L      = 76;
  VK_M      = 77;
  VK_R      = 82;
  VK_U      = 85;
  VK_V      = 86;
  VK_X      = 88;
  VK_Y      = 89;
  VK_Z      = 90;
  VK_COMMA  = 188;
  VK_PERIOD = 190;
  VK_PLUS   = 187;
  VK_MINUS  = 189;
  VK_0      = 48;
  VK_OPENING_SQUARE_BRACKET = 219;
  VK_CLOSING_SQUARE_BRACKET = 221;


Is there a SPECIFIC reason why VK_S is not among them?
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - May 07 2025 : 02:34:06


Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - May 06 2025 : 04:52:43
Hi Nigel,

I asked because in a larger project I have a complex compiler issue where hyiedefs takes over the VK_ constants and Winapi.Windows.VK_S does no longer work. For this reason, I made my own VK_ constants unit and used it at beginning of the uses clause which solves the problem:

unit VirtualKeysAlphanumeric;

// Purpose: Explicitly defines Virtual Key constants for A-Z and 0-9
//          using the Ord() function.
//
// Usage:   Include this unit in your 'uses' clause, preferably early
//          if you suspect conflicts with other units (like third-party
//          libraries or potentially modified standard units) defining
//          these constants differently or incompletely.
//
// Note:    This unit ONLY defines VK_A..VK_Z and VK_0..VK_9. For other
//          virtual keys (VK_SHIFT, VK_ESCAPE, VK_F1, etc.), you still
//          need to include and rely on the standard Winapi.Windows or
//          System.UITypes units.

interface

const
  // --- Letter Virtual Keys (A-Z) ---
  VK_A = Ord('A'); // 65
  VK_B = Ord('B'); // 66
  VK_C = Ord('C'); // 67
  VK_D = Ord('D'); // 68
  VK_E = Ord('E'); // 69
  VK_F = Ord('F'); // 70
  VK_G = Ord('G'); // 71
  VK_H = Ord('H'); // 72
  VK_I = Ord('I'); // 73
  VK_J = Ord('J'); // 74
  VK_K = Ord('K'); // 75
  VK_L = Ord('L'); // 76
  VK_M = Ord('M'); // 77
  VK_N = Ord('N'); // 78
  VK_O = Ord('O'); // 79
  VK_P = Ord('P'); // 80
  VK_Q = Ord('Q'); // 81
  VK_R = Ord('R'); // 82
  VK_S = Ord('S'); // 83  <-- Includes the one originally missing
  VK_T = Ord('T'); // 84
  VK_U = Ord('U'); // 85
  VK_V = Ord('V'); // 86
  VK_W = Ord('W'); // 87
  VK_X = Ord('X'); // 88
  VK_Y = Ord('Y'); // 89
  VK_Z = Ord('Z'); // 90

  // --- Number Virtual Keys (0-9) ---
  VK_0 = Ord('0'); // 48
  VK_1 = Ord('1'); // 49
  VK_2 = Ord('2'); // 50
  VK_3 = Ord('3'); // 51
  VK_4 = Ord('4'); // 52
  VK_5 = Ord('5'); // 53
  VK_6 = Ord('6'); // 54
  VK_7 = Ord('7'); // 55
  VK_8 = Ord('8'); // 56
  VK_9 = Ord('9'); // 57

implementation

end.
xequte Posted - May 05 2025 : 17:57:03
Yes, we don't use VK_S.

Nigel
Xequte Software
www.imageen.com