How to correctly link the WinAPI function alphablend () to achieve a translucent effect in the BCB

zhaozj2021-02-08  211

Home: http://www.maxss.netemail: Maxss.net@163.com

Today attempt to increase translucent UI style in a small aircraft game made to do it, it is mainly combined with the API function alphablend () provided in Windows, in the completion of the relevant encoding steps and by compiling, but finally The information content of the linked error is approximately as follows: [Linker Error] unresolved External 'alphablend' referenced from f: /xxx/xxx/main.obj The reason is that this error is that the linker does not find the function alphablend () The external reference is caused, and after viewing the information of the MSDN, it is learned that the function needs "msimg32.dll" support, but does not directly provide the corresponding link library in BCB. The current solution can only rely on the issue of BCB by doing it. In fact, the steps are simple (the following steps are for Windows2000, other versions are different): 1. Copy files from {WinNT} / system32 / {WinNT} / system32 / in the project directory 2. Then enter the console and transfer to the project directory, execute The following command: Implib msimg32.lib msimg32.dll3. Finally, add file msimg32.lib to the project and recompile, link success! The above is just a little experience in the development, I hope I can help it, I hope that I can play a little inspiration to everyone. After encountering similar simple questions, I can try my own to solve it, you will get it will not Only solve the problem is so simple.

转载请注明原文地址:https://www.9cbs.com/read-2159.html

New Post(0)