How to use an API in C ++?

1

I've been researching on several sites that explain how to use an API, but for some reason I'm doing it wrong. I would like to know how to use the Windows WM_PASTE API to block the Paste of the mouse (ctrl + v) in a TComboBox. I'm using Embarcadero C ++ Builder.

    
asked by anonymous 21.06.2015 / 03:18

1 answer

2

When you ask "How to use an API" you are asking for any API, since there are many like Win32 API, DirectX, OpenGL and many others.

Did you mean how to use the Win32 API? Correct?

WM_PASTE is not an API but a compiler directive that is used as a constant in the Win32 API that represents 0x0302 hex.

And apparently you are using another graphical API, so it is necessary to know the API you are using to know if it is possible to do this only with the API that you are using. If you really need to use the Win32 API you will need access to the HWND (Handle WiNDow) of the TComboBox control which is the control handler, and access to the program's message loop.

    
22.06.2015 / 04:05