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

C / C++ / MFC

 
QuestionXmlReader EOF property problem Pin
Shivian8-Oct-07 20:37
Shivian8-Oct-07 20:37 
AnswerRe: XmlReader EOF property problem Pin
User 5838528-Oct-07 20:49
User 5838528-Oct-07 20:49 
GeneralRe: XmlReader EOF property problem [modified] Pin
Shivian9-Oct-07 13:27
Shivian9-Oct-07 13:27 
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 
Hello Friends,

I am trying to change the Desktop Wallpaper programatically. For that I am using IActiveDesktop Interface.But not getting success, I am not getting any compile or run time error but it fails to set the wallpaper.

I am using the following code to get the path of the current Wallpaper and to set the new Wallpaper.
But I am getting only one string each time I call the GetWallpaper(), It is a follow "C:\Documents and Settings\Administrator\My Documents\My Pictures\logo.jpg"

HRESULT hr;
int Count = 0;
IActiveDesktop *pActiveDesktop;
CoInitialize(NULL);
//Create an instance of the Active Desktop
hr = CoCreateInstance(CLSID_ActiveDesktop, NULL, CLSCTX_INPROC_SERVER,
            IID_IActiveDesktop, (void**)&pActiveDesktop);
WCHAR Wallpaper[MAX_PATH];
wcscpy(Wallpaper,L"c:\\a.bmp");
pActiveDesktop->SetWallpaper(Wallpaper,0);
pActiveDesktop->ApplyChanges(AD_APPLY_ALL |  AD_APPLY_FORCE);  //nothing Happens
pActiveDesktop->GetDesktopItemCount(&Count,0);  //Geting Zero everytime
pActiveDesktop->GetWallpaper(Wallpaper,MAX_PATH,0);


I also use the SystemParametersInfo API to do the same thing. But the problem is that it only wotks with .bmp file.

If you have any IDEA please tell me. Thnx in advance.


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 
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 

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.