IPB

Welcome Guest ( Log In | Register )

> foobar2000 Development Forum Rules

This forum is for developer discussions only. If you have a problem / bug report / idea / feature request that isn't related to foobar2000 SDK, post it in an appropiate forum instead - tech support questions go to support forum, everything else goes to general forum.
All non-developer posts on this forum will be removed. Continued abuse of this forum will result in admin actions (warnings, account suspension).

 
Reply to this topicStart new topic
How to properly exit foobar?
Silvar
post Oct 8 2013, 18:48
Post #1





Group: Members
Posts: 5
Joined: 8-October 13
Member No.: 110762



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.
Go to the top of the page
+Quote Post
marc2003
post Oct 8 2013, 19:34
Post #2





Group: Members
Posts: 4873
Joined: 27-January 05
From: England
Member No.: 19379



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

CODE
standard_commands::main_exit()
Go to the top of the page
+Quote Post
Silvar
post Oct 8 2013, 20:01
Post #3





Group: Members
Posts: 5
Joined: 8-October 13
Member No.: 110762



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?
Go to the top of the page
+Quote Post
The vern
post Oct 8 2013, 20:10
Post #4





Group: Developer
Posts: 203
Joined: 2-June 09
Member No.: 70332



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.

This post has been edited by The vern: Oct 8 2013, 20:11
Go to the top of the page
+Quote Post
Silvar
post Oct 8 2013, 20:22
Post #5





Group: Members
Posts: 5
Joined: 8-October 13
Member No.: 110762



Works like a charm, thanks a lot.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th December 2014 - 16:27