E
ne brauch ich nicht aktivieren - ist bereits - da es nun problemlos funktioniert
danke fuer die geduld, topic kann als [solve] betitelt werden #gg
HRESULT hr;
IActiveDesktop *pActiveDesktop;
CoInitialize( NULL );
hr = CoCreateInstance(CLSID_ActiveDesktop, NULL, CLSCTX_INPROC_SERVER, IID_IActiveDesktop, (void**)&pActiveDesktop);
pActiveDesktop->SetWallpaper( L"C:\\115.jpg", NULL );
pActiveDesktop->ApplyChanges(AD_APPLY_ALL);
pActiveDesktop->Release();
sehr komisch find ich nur, das ich wininet.h direkt unter afxext setzen muss damit es funktioniert, wenn ich es tiefer anordne bekomm ich nur schwierigkeiten
.
.
.
#include <afx.h>
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <wininet.h> // IActiveDesktop
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#endif
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#include <iostream>
// TODO: reference additional headers your program requires here
#include <shlobj.h>