|
Madan Chauhan wrote: WriteFile(hBatFile,csRunCommands,csRunCommands.GetLength()*2,&dwReturnVal,NULL);
Why are you using a hard-coded 2 rather than sizeof(TCHAR) ?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi there,
i am currently working on a Shell Namespace extension. In order to provide it with different Icons for my different elements, i use some image-lists to store the images. Since for every folder i browse there might be several newly created images necessary, i want to delete the lists and fill them up new. But as soon as i add the call to CImageList::DeleteImageList(), the DLL cant be registered anymore.
I guess i am missing some fundamental knowledge about how to use MFC. If it helps discoverig my fault, i can also state that every time i want to open a contextmenu or pop up a dialog, i have to add the line:
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
to the calling method because otherwise they dont show.
Due to the fact that i am pretty new to MFC-programming i bet there must be some configuration-stuff that i have to do initially to solve my problems.
can anyone help me out?
thanks in advance,
Gernot
|
|
|
|
|
Maybe its also interesting, that i dont even get an error-dialog, when i try to regsvr32 my DLL, but it just doesnt register. Visual studio says
"1>Project : error PRJ0019: A tool returned an error code from "Performing Post-Build Event...""
when i try to register in Post-Build-Routine.
|
|
|
|
|
Meanwhile i dependencywalked out what is it, that fails while trying to register:
"LoadLibraryExW("C:\projekte\Namespace Extension\MyProject\Debug\MyPlugin.dll", 0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned NULL. Error: Das System hat keinen Meldungstext fr die Meldungsnummer 0x%1 in der Meldungsdatei %2 gefunden (317)."
The text means something like "the system doesnt provide a text for this error".
Unfortunately, this doesnt help me alot. Has anyone had a similar problem or any idea that might help me out? im really stuck here!
|
|
|
|
|
CImageList::DeleteImageList() calls AfxImageList_Destroy() but in doing some quick searches, I don't see the source for AfxImageList_Destroy() in my VC8 install dir. That is weird.
|
|
|
|
|
Yes, youre right. I cant find it, too.
And it seems to be exactly that call, that doesnt work anyhow. I dont know what else to do. Is there any other possibility of cleaning that up? My extension works so far, but every time i open a folder, i get more and more GDI-Objects for the explorer.exe.
|
|
|
|
|
Dear All
which Event is fired when in a multi Property page Tab control,we change from one tab to another one.
Regards
Monhi
|
|
|
|
|
TCN_SELCHANGE
Regards,
Rane
|
|
|
|
|
If this is a property sheet (not just a tab control that you're managing yourself), handle PSN_KILLACTIVE and PSN_SETACTIVE .
|
|
|
|
|
Hi All,
I created and started a thread using AfxBeginThread().
I need to kill this thread from out side of the thread,
on any event like button click.
If I can use a global variable, and according to that i can kill it in the thread.
But is it a good way of doing?
Please clarify.
Regards,
Sunil Kumar
|
|
|
|
|
(IMHO) It is a viable approach.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
do a PeekMessage() and PumpMessage() in a loop, and once the loop exits do a CloseHandle().
|
|
|
|
|
In an around Mumbai, we reply to the person who asks a question. Not to someone who's standing next to him.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Rajesh R Subramanian wrote: In an around Mumbai, we reply to the person who asks a question. Not to someone who's standing next to him. Smile
Oh you Indians, yet not experiencing MTTP ( M essage T unneling T hrough P ersons)!!!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
sunilkumar.d wrote: If I can use a global variable, and according to that i can kill it in the thread.
Remember to use the volatile keyword.
|
|
|
|
|
yeah naveen, i forgot to use volatile.
Thanks for the info.
Regards,
Sunil Kumar
|
|
|
|
|
Here is a classic article, that discusses several aspects on the topic: Worker Threads[^]
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Beware. Trolls all around. Maybe they're LHC 's side-products.
(No need to say balncing occurred )
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Among all the other things, now LHC can be blamed too.
BTW, thanks for the vote.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Events are often a better way to go since the thread may be waiting for something. (Having threads simply run in a loop with a sleep timer is very bad programming.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I think this[^] is helpful for you.
|
|
|
|
|
Hi,
I have used two button controls and i want to make the lower border invisible and keep the upper and side border lines visible.
Can any one tell me how.
Please help me.
Thanks in advance
Dhiraj
|
|
|
|
|
Buttons one over the other?
Regards,
Rane
|
|
|
|
|
No the two buttons are not one another over. They are apart. Its just that I want to make the lower border invisible and and the two side border and upper border visible.
|
|
|
|
|
Place an empty static text over the border(s) that you want to hide and the other borders will still be visible..
Regards,
Rane
|
|
|
|