@myisjwj,
Thank you for kind advice, but 64-bit or 32-bit is not an issue.
There was a long discussion with ChatGPT, and I made an application based on the program you mentioned. The skeleton seems good, and thank you for your information.
The first change is comparing classname of application (notepad.exe in this case), not ProcessID in EnumWindowsProc. AI gave a long explanation, which I really don't understand.
I could push notepad.exe into TPanel of Lazarus. So far so good. But when I clicked in the notepad, its location has changed. ChatGPT says the notepad is not act in general way in Windows 11. I don't understand what it says.
I can embed MicroSIP within the panel. This is good, and seems to work as intended at the beginning. But when I input number, and press "call" then it clears the number in the dropdown box, and the focus is lost. I cannot make the dropdown list focused, which mean I cannot input numbers from my keyboard. The softphone keypad works. Other functions seem to work.
The AI said there are some ways to call MicroSIP's internal procedures directly from outside application. I'd like to try them.