|
"_$h@nky_" wrote: Please help me
Already helped you no? What's new? did u check those links?
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Hi Experts,
How can I traverse System Volume Information folder?
|
|
|
|
|
You have to take ownership of the directory and its objects before you can enumerate them. That works on XP, not sure about Vista or 2003.
modified on Tuesday, September 30, 2008 11:40 AM
|
|
|
|
|
|
MPTP wrote: How Can I do that?
I don't know how to do it programmatically, try googling. From the command line you can do it like this:
cacls "[driveletter]:\system volume information" /e /g [username]:f
|
|
|
|
|
Hi All,
I have created a MFC dll with dialog box(It doesn't have any methods.only dialog box).I got sam.dll and sam.lib.Now i want to use this sam.dll to my MFC application.That is,
If i click ok button,It should show that dll dialog.I dont know how to import to my button click event.
Plz... helpme.
Thanks & Regards,
Anitha
|
|
|
|
|
|
Do you want to create Resource only DLL??
If yes you can search CP there are good articles for the same.
Regards,
Sandip.
|
|
|
|
|
Ive seen a lot of applications load icons that seem to be a higher colour rate
the standard is 32x32 16bit color
is there a way to use an icon that is 256 or truecolor
in WINAPI or MFC
cheers
From Sarriss
|
|
|
|
|
LoadImage is your friend. Two of the params specify a desired width and height (though all the icons I've come across have been square, I suppose that might not be true occasionally).
HINSTANCE hInst = AfxFindResourceHandle (MAKEINTRESOURCE(IDI_MYICON), RT_ICON);
HICON hHiRes = (HICON)::LoadImage (hInst, MAKEINTRESOURCE(IDI_MYICON), IMAGE_ICON, 256, 256, LR_DEFAULTCOLOR);
There's no error handling there, but I hope that gives you the idea. The AfxFindResourceHandle is MFC only, but if you're doing raw API, then I'm sure you have a (eg) m_hInstanceResource somewhere in your code to use.
Iain.
|
|
|
|
|
cheers Another question
Im using visual studio 2005, I add the icon which is bigger(64X64) in high res colour
and it says
Warning: Visual Studio Image Editors do not support 32bit color images. Your changes will be discarded when
saving the image.
Is that important or can i ignore that? I dont need to edit the icon just include it I wanna know if this is a cause that will stop the icon from loading?
modified on Tuesday, September 30, 2008 8:48 AM
|
|
|
|
|
You can ignore any deficiencies in the IDE, as long as the resource compiler can handle it. I doubt that it even cares about the content of the icon.
The source icon is stored in an external ico file, with just a reference in your rc file. I suspect the rc.exe treats it as an opaque blob of data. If it's bad data, LoadImage will choke at a later date.
Iain.
|
|
|
|
|
The Code you said worked pretty well
I used a variation through API
WNDCLASSEX wc;
....
wc.hIcon = static_cast<hicon>(LoadImage( hInstance,
MAKEINTRESOURCE(IDI_ICON1),
IMAGE_ICON,
255,
255,
LR_DEFAULTCOLOR));
........................................................................
wc.hIconSm = static_cast<hicon>(LoadImage( hInstance,
MAKEINTRESOURCE(IDI_ICON1),
IMAGE_ICON,
16,
16,
LR_DEFAULTCOLOR));
</hicon></hicon>
Also a note to be taken in this, I could only get images up to 255 to work not 256, it completly rejects the file if you have any 256 in there. Thought i might just mention that.
There is also an issue with alpha blend in Visual studio, some mentioned a way around that and i quote,
"If you have an icon with alpha blend, visual studio will get rid of it straight away, so to get around that,
-->Put the icon in your /res/ folder
-->import the file via your resource editor
-->close the file in the resource editor so its not in view
-->save the project
-->copy the .ico with alpha blend over the top of the one in your res folder
-->rebuild your application
-->and you should have alpha blend,
you will not be able to open the icon in resource editor againbecause it will get rid of the alpha blend again."
This is my findings in working on my initial question, i hope it helps anyone else looking for this.
|
|
|
|
|
Hi,
I am looking at a way to do zip compression in C#. Is there any free library that is as fast as winzip?
Thanks
|
|
|
|
|
Upss.. wrong forum... sorry...
|
|
|
|
|
good you saved yourself from hand of cruel c++ developer
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
|
If I can't get the answer from C# forum, I will try and download the demo project and try to see how fast does it compress the file. If it is fast, will build the COM object for it.
Thanks Hamid
|
|
|
|
|
You're welcome.
|
|
|
|
|
Hello everyone,
I want to export a function in DLL, and using extern C and __stdcall together to resolve name decoration issue -- so I need dllexport/stdcall/extern C together to define a function.
But I have played a while there is always compile error? Why? Here is my code and related compile error.
extern "C" __declspec(dllexport) __stdcall BOOL WINAPI StoreData(DWORD dw)
1>d:\visual studio 2008\projects\testdll\testdll\dllmain.cpp(78) : error C2143: syntax error : missing ';' before '__stdcall'
1>d:\visual studio 2008\projects\testdll\testdll\dllmain.cpp(78) : warning C4229: anachronism used : modifiers on data are ignored
1>d:\visual studio 2008\projects\testdll\testdll\dllmain.cpp(78) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\visual studio 2008\projects\testdll\testdll\dllmain.cpp(78) : error C2377: 'BOOL' : redefinition; typedef cannot be overloaded with any other symbol
1> c:\program files\microsoft sdks\windows\v6.0a\include\windef.h(153) : see declaration of 'BOOL'
1>d:\visual studio 2008\projects\testdll\testdll\dllmain.cpp(79) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\visual studio 2008\projects\testdll\testdll\dllmain.cpp(105) : error C2143: syntax error : missing ';' before '__stdcall'
1>d:\visual studio 2008\projects\testdll\testdll\dllmain.cpp(105) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\visual studio 2008\projects\testdll\testdll\dllmain.cpp(106) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
regards,
George
|
|
|
|
|
I don't know how __stdcall helps you in resolving name decoration issues, anyway you should use it after the return type of the function.
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]
|
|
|
|
|
Thanks CPallini,
Your solution works. But are there any MSDN documents mentioning the rule/syntax where to put __stdcall? I searched but not found.
regards,
George
|
|
|
|
|
You've to search better , from MSDN [^]:
return-type __stdcall function-name[(argument-list)]
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]
|
|
|
|
|
Thanks CPallini,
This is exactly what I am looking for.
regards,
George
|
|
|
|
|
Georges,
you have redundant declarations:
"extern "C" __declspec(dllexport) __stdcall BOOL WINAPI StoreData(DWORD dw)"
__stdcall is wrongly placed. it should be after the return type.
WINAPI is already defined for your function. remove it, and place __stdcall instead
|
|
|
|