diff options
author | faust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-04-20 12:31:23 +0000 |
---|---|---|
committer | faust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-04-20 12:31:23 +0000 |
commit | c9b576b8b379abb43365abd418120f0fddd180c2 (patch) | |
tree | 22360f4b1731488b7af47f31e78735c7981a69d3 /libvo | |
parent | 6fc4ba0ce3ef650791177ebbb485a2448c2a9f1f (diff) | |
download | mpv-c9b576b8b379abb43365abd418120f0fddd180c2.tar.bz2 mpv-c9b576b8b379abb43365abd418120f0fddd180c2.tar.xz |
load icon from executable
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9944 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_directx.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c index 8c8817209a..484d647a6b 100644 --- a/libvo/vo_directx.c +++ b/libvo/vo_directx.c @@ -809,6 +809,8 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l static uint32_t preinit(const char *arg) { HINSTANCE hInstance = GetModuleHandle(NULL); + HICON mplayericon=NULL; + char exedir[MAX_PATH]; WNDCLASS wc; if(arg) { @@ -835,13 +837,19 @@ static uint32_t preinit(const char *arg) mp_msg(MSGT_VO, MSGL_V ,"<vo_directx><INFO>using backpuffer\n"); nooverlay = 1; } + /*load icon from the main app*/ + if(GetModuleFileName(NULL,exedir,MAX_PATH)) + { + mplayericon = ExtractIcon( hInstance, exedir, 0 ); + } + if(!mplayericon)mplayericon=LoadIcon(NULL,IDI_APPLICATION); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; wc.hCursor = LoadCursor(NULL,IDC_ARROW); - wc.hIcon = LoadIcon(NULL,IDI_APPLICATION); + wc.hIcon = mplayericon; wc.hbrBackground = CreateSolidBrush(windowcolor); wc.lpszClassName = "Mplayer - Movieplayer for Linux"; wc.lpszMenuName = NULL; |