Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to properly exit foobar? (Read 4379 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to properly exit foobar?

My question appears to be quite simple, and maybe the answer is simple aswell, but I still haven't found the solution yet.
How do I tell foobar to quit? I've implemented an alternative UI, but foobar doesn't quit when I close the window.
So I've implemented the OnFinalMessage function, but I can't find a function to quit foobar in the SDK.

Thanks in advance.

How to properly exit foobar?

Reply #1
i'm not a developer myself but i know of an open source component and i searched it to find this...

Code: [Select]
standard_commands::main_exit()

How to properly exit foobar?

Reply #2
Thanks for the reply. I've actually found this function aswell and tried to implement it, but it seems that nothing happens when I call it. Maybe my implementation is wrong.
Could you please post a link to this open-source component, so I can find out how this function is implemented there?

How to properly exit foobar?

Reply #3
You just have to send a WM_QUIT message through to the HookProc_t (provided to you when your user interface is initialised). For example, you could do this with PostQuitMessage().
Then your UI shutdown method will be called and the app will exit after that returns.

How to properly exit foobar?

Reply #4
Works like a charm, thanks a lot.