Windows Functions work differently with skins2 interface

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
mgreene
Blank Cone
Blank Cone
Posts: 19
Joined: 27 Nov 2006 21:56

Windows Functions work differently with skins2 interface

Postby mgreene » 07 Dec 2006 20:07

I posted a similar ? on the general discussion thread, but this one is more specific. Background: I want to be able to control the VLC window (size, position, etc.) programatically from another Windows application. I would like to run the VLC with the skins2 interface, but it seems to work differently. To wit:

If I launch VLC via command line without a skin, then using another Windows C++ MFC based app, I can minimize, reposition, and resize the VLC window:

Code: Select all

CWnd *hWndVLC; hWndVLC = FindWindow(NULL,"VLC media player"); CString s; // verify we've go the right window hWndVLC->GetWindowText(s); MessageBox (s, "Caption of VLC" , MB_OK); // minimize hWndVLC->ShowWindow(SW_MINIMIZE); // maximize hWndVLC->ShowWindow(SW_MAXIMIZE); //reposition (center on screen) CWnd *hDesktop = CWnd::GetDesktopWindow(); hWndVLC->CenterWindow(hDesktop);
But the last function (and any other repositioning or resizing functions) will only work on the VLC window when it is not skinned. What is about the skinned interface that precludes programatic repositioning?

ipkiss
Big Cone-huna
Big Cone-huna
Posts: 695
Joined: 23 Nov 2003 01:49

Postby ipkiss » 08 Dec 2006 09:25

To be able to be skin the windows easily (without a title bar and such), we create them with the WS_POPUP style (see msdn for more details). Here is the line creating the windows:

Code: Select all

m_hWnd = CreateWindowEx( WS_EX_TOOLWINDOW, "SkinWindowClass", "default name", WS_POPUP | WS_CLIPCHILDREN, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hParentWindow, 0, hInst, NULL );


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 22 guests