Click here to Skip to main content
15,916,042 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Setting problem in preprocessor macro? Pin
amitmistry_petlad 18-Mar-07 20:28
amitmistry_petlad 18-Mar-07 20:28 
GeneralRe: Setting problem in preprocessor macro? Pin
PJ Arends18-Mar-07 20:32
professionalPJ Arends18-Mar-07 20:32 
GeneralRe: Setting problem in preprocessor macro? Pin
amitmistry_petlad 18-Mar-07 20:37
amitmistry_petlad 18-Mar-07 20:37 
GeneralRe: Setting problem in preprocessor macro? Pin
PJ Arends18-Mar-07 20:52
professionalPJ Arends18-Mar-07 20:52 
QuestionRe: Setting problem in preprocessor macro? Pin
David Crow19-Mar-07 2:37
David Crow19-Mar-07 2:37 
Questionlocate file in NTFS Pin
ppp00118-Mar-07 16:38
ppp00118-Mar-07 16:38 
AnswerRe: locate file in NTFS Pin
Stephen Hewitt18-Mar-07 17:03
Stephen Hewitt18-Mar-07 17:03 
QuestionWallpaper ???? Pin
Tran Ngoc Minh18-Mar-07 15:37
Tran Ngoc Minh18-Mar-07 15:37 
Hello Everyone!
I have seen article(of JasonD'Oh! | :doh: D'Oh! | :doh: D'Oh! | :doh: ) :"WallpaperQ :A Wallpaper Management Tool " .I wrote a program by Win32(in VC++6).My simple program include: a button "OK" and a button "Exit"(in dialog "Test Wallpaper").In button "OK",i wrote code as follows :
//at WM_INITDIALOG event
pIActiveDesktop = NULL;
HRESULT hr = CoCreateInstance(CLSID_ActiveDesktop,
NULL, CLSCTX_INPROC_SERVER, IID_IActiveDesktop,
(void**) &pIActiveDesktop);
if (FAILED(hr)) pIActiveDesktop = NULL;
//in button "OK"
if(pIActiveDesktop == NULL)
{.......
SystemParametersInfo(...,"image.bmp",..);
.......
}
else
{..............
pIActiveDesktop->SetDesktopItemOptions
(&compOptions, 0);
............
pIActiveDesktop->SetWallpaperOptions
(&wpOptions, 0);
// Set the wallpaper image.
pIActiveDesktop->SetWallpaper(T2CW
("image.jpg") , 0);
// Apply all changes.
pIActiveDesktop->ApplyChanges(AD_APPLY_ALL);
}
My program only run the first case(pIActiveDesktop=NULL)(i.e it only set to Desktop Wallpapers ".bmp").I (very)want to try the second case but not succeed (i hide the first case,when i click "OK", a error occur"memory can't read ").
Please help me how to "IActiveDesktop is available"
Thanks !

QuestionHow to do new CArray??? Pin
Greg Ellis18-Mar-07 9:39
Greg Ellis18-Mar-07 9:39 
AnswerRe: How to do new CArray??? Pin
PJ Arends18-Mar-07 10:04
professionalPJ Arends18-Mar-07 10:04 
GeneralRe: How to do new CArray??? Pin
Greg Ellis18-Mar-07 10:15
Greg Ellis18-Mar-07 10:15 
GeneralRe: How to do new CArray??? Pin
PJ Arends18-Mar-07 10:30
professionalPJ Arends18-Mar-07 10:30 
GeneralRe: How to do new CArray??? Pin
Greg Ellis18-Mar-07 10:34
Greg Ellis18-Mar-07 10:34 
GeneralRe: How to do new CArray??? Pin
PJ Arends18-Mar-07 10:40
professionalPJ Arends18-Mar-07 10:40 
AnswerRe: How to do new CArray??? Pin
Christian Graus18-Mar-07 10:31
protectorChristian Graus18-Mar-07 10:31 
AnswerRe: How to do new CArray??? Pin
Michael Dunn18-Mar-07 11:11
sitebuilderMichael Dunn18-Mar-07 11:11 
QuestionCopy constructor question (am I doing something stupid here?) Pin
Sean Wcisel18-Mar-07 9:24
Sean Wcisel18-Mar-07 9:24 
AnswerRe: Copy constructor question (am I doing something stupid here?) Pin
PJ Arends18-Mar-07 9:52
professionalPJ Arends18-Mar-07 9:52 
GeneralRe: Copy constructor question (am I doing something stupid here?) Pin
Sean Wcisel18-Mar-07 10:12
Sean Wcisel18-Mar-07 10:12 
GeneralRe: Copy constructor question (am I doing something stupid here?) Pin
PJ Arends18-Mar-07 10:37
professionalPJ Arends18-Mar-07 10:37 
GeneralRe: Copy constructor question (am I doing something stupid here?) Pin
Sean Wcisel18-Mar-07 10:55
Sean Wcisel18-Mar-07 10:55 
AnswerRe: Copy constructor question (am I doing something stupid here?) Pin
Michael Dunn18-Mar-07 11:16
sitebuilderMichael Dunn18-Mar-07 11:16 
GeneralRe: Copy constructor question (am I doing something stupid here?) Pin
Sean Wcisel18-Mar-07 12:25
Sean Wcisel18-Mar-07 12:25 
QuestionRe: Copy constructor question (am I doing something stupid here?) Pin
PJ Arends18-Mar-07 12:37
professionalPJ Arends18-Mar-07 12:37 
AnswerRe: Copy constructor question (am I doing something stupid here?) Pin
Sean Wcisel18-Mar-07 15:40
Sean Wcisel18-Mar-07 15:40 

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.