Click here to Skip to main content
15,888,286 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: XmlReader EOF property problem [modified] Pin
ian__lindsay7-Feb-13 4:05
ian__lindsay7-Feb-13 4:05 
Questionmessage maps from derived class Pin
prithaa8-Oct-07 19:52
prithaa8-Oct-07 19:52 
AnswerRe: message maps from derived class Pin
Naveen8-Oct-07 19:58
Naveen8-Oct-07 19:58 
AnswerRe: message maps from derived class Pin
Jhony george9-Oct-07 1:08
Jhony george9-Oct-07 1:08 
QuestionProblem in SetWallpaper Pin
GauranG Shah8-Oct-07 19:05
GauranG Shah8-Oct-07 19:05 
AnswerRe: Problem in SetWallpaper Pin
Hamid_RT8-Oct-07 19:36
Hamid_RT8-Oct-07 19:36 
GeneralRe: Problem in SetWallpaper Pin
GauranG Shah8-Oct-07 20:31
GauranG Shah8-Oct-07 20:31 
GeneralRe: Problem in SetWallpaper Pin
aks.8-Oct-07 22:10
aks.8-Oct-07 22:10 
Pls have a look @ this. This work for me

#include <windows.h>
#include <wininet.h>
#include <shlobj.h>

//Main window procedure WinMain
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iShowCmd)
{
CoInitialize (NULL) ;

HRESULT hr;
IActiveDesktop *pActiveDesktop;

//Create an instance of the Active Desktop
hr = CoCreateInstance(CLSID_ActiveDesktop, NULL, CLSCTX_INPROC_SERVER,
IID_IActiveDesktop, (void**)&pActiveDesktop);

//Insert code to call the IActiveDesktop methods
LPCWSTR wcPath = L"C:\\123.jpg" ;
if (pActiveDesktop -> SetWallpaper (wcPath, 0) != S_OK)
{
//The method has failed...
}

pActiveDesktop -> ApplyChanges (AD_APPLY_ALL) ;

// Call the Release method
pActiveDesktop->Release();

CoUninitialize () ;

return 0 ;
}


Ajay

GeneralRe: Problem in SetWallpaper Pin
GauranG Shah8-Oct-07 22:45
GauranG Shah8-Oct-07 22:45 
GeneralRe: Problem in SetWallpaper Pin
aks.8-Oct-07 22:47
aks.8-Oct-07 22:47 
GeneralRe: Problem in SetWallpaper Pin
GauranG Shah8-Oct-07 22:53
GauranG Shah8-Oct-07 22:53 
GeneralRe: Problem in SetWallpaper Pin
aks.8-Oct-07 23:05
aks.8-Oct-07 23:05 
GeneralRe: Problem in SetWallpaper Pin
GauranG Shah8-Oct-07 23:12
GauranG Shah8-Oct-07 23:12 
QuestionRe: Problem in SetWallpaper Pin
David Crow9-Oct-07 3:08
David Crow9-Oct-07 3:08 
Questionhow to change the color of header of list control Pin
rajneshmalik8-Oct-07 18:55
rajneshmalik8-Oct-07 18:55 
AnswerRe: how to change the color of header of list control Pin
hiajay8-Oct-07 19:49
hiajay8-Oct-07 19:49 
QuestionAccess violation in Comctl32.dll Pin
Marimuthu.r8-Oct-07 18:53
Marimuthu.r8-Oct-07 18:53 
AnswerRe: Access violation in Comctl32.dll Pin
Marimuthu.r9-Oct-07 5:35
Marimuthu.r9-Oct-07 5:35 
Questionpointer and array Pin
KASR18-Oct-07 18:26
KASR18-Oct-07 18:26 
AnswerRe: pointer and array Pin
Naveen8-Oct-07 20:16
Naveen8-Oct-07 20:16 
GeneralRe: pointer and array Pin
KASR18-Oct-07 20:28
KASR18-Oct-07 20:28 
GeneralRe: pointer and array Pin
Naveen8-Oct-07 20:33
Naveen8-Oct-07 20:33 
GeneralRe: pointer and array Pin
KASR18-Oct-07 20:35
KASR18-Oct-07 20:35 
QuestionA problem about scrolling Edit controls in a dialogue Pin
today422008-Oct-07 16:14
today422008-Oct-07 16:14 
QuestionIntegration of my unit testing tool with Visual Studio 2005 IDE Pin
Kamyar Souri8-Oct-07 16:08
Kamyar Souri8-Oct-07 16:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.