|
Hai venkatmakam,
Thankx for your response, i try this link and use it the win32 openssl and install it my PC.
it is compiled without error on a win32 project , if i using the same way in windows mobile application am getting the same LNK error.
any other way is there.....
Best Regard's
Mathy's
|
|
|
|
|
SHFILEINFO sInfo;
ZeroMemory(&sInfo,sizeof(sInfo));
SHGetFileInfo(csFileType, FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(sfi), SHGFI_USEFILEATTRIBUTES | SHGFI_ICON);
if (sInfo.hIcon)
DestroyIcon(sInfo.hIcon);
the value of csFileType is .zip .bak .txt or other file type. I debug the program, the value of sInfo.iIcon is 5, 4, or 7
If use this API SHGetFileInfo, need it do any initialize operation ?
|
|
|
|
|
First thing that strike me is that your SHFILEINFO is sInfo and you pass sfi. How did you get the value of sInfo ??
I believe in LOVE AT FIRST SIGHT...
Bcoz I have loved my Mother...
even since I opened my eyes...(ICAN)
|
|
|
|
|
The sfi should be sInfo. I wrong modify it when paste the code to codeproject.
|
|
|
|
|
Hi all,
I have transferred development of an old VC++6 program on an XP machine to VS2005 on a Windows 7 64-bit machine, and the program now falls over when loading files saved on a shared network drive. I have tracked it down to a call to GetVolumeInformation() during the file open procedure when clicking on an entry in the MRU list. This works fine if I call it manually with a UNC path but not if I use a path containing the network drive letter.
Any suggestions how to overcome this so that it works with a network drive letter as well?
The network drive letter was set up manually on my machine, might it need setting up through Group Policy instead?
TIA.
|
|
|
|
|
How are you calling GetVolumeInformation() ? What does GetLastError() return?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
It returns error 3: ERROR_PATH_NOT_FOUND : The system cannot find the path specified.
I can see the mapped drive in My Computer and can browse to it.
|
|
|
|
|
AFAIK letter mapping is an individual thing, what you define as a mapping will not be available to other accounts.
I suggest you get your code to check the known drive letters; WMI class Win32_LogicalDiskToPartition would be one way to do so.
If that is the problem, you might have your code perform its own mapping.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Unfortunately the call to GetVolumeInformation() is buried in the MFC MRU handling code so I can't change it! Also I'm running it on my own machine so the mapping definitely exists.
If it is a problem between Windows 7 and SBS2003 then I might have to code my own handler...sigh.
|
|
|
|
|
How to transfer Cstring type like : 6.591E+02 to float type.
exmple :
Cstring a="6.591E+02";
float b;
and i want b=6.591E+02.I work with MFC.Thanks.
|
|
|
|
|
See atof()[^]
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
I also used atof(),but with atof() parameter in atof()function is char * but my string is Cstring.
|
|
|
|
|
If you're doing a Unicode build, you could use _ttof() and otherwise atof() will work. For example, this code will work for an MBCS build:
double df = 0;
CString str = "6.591E+02";
df = atof(str);
Hint: CString has the LPCTSTR operator defined, so the conversion will be done automatically.
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
|
That's a misuse of CString::GetBuffer() .
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
camuoi288 wrote: atof() parameter in atof()function is char * but my string is Cstring That is not correct. From MSDN:
double atof(const char *string);
Since CString has LPCTSTR operator, you can easily call atof like this:
CString str = "1.234";
double d = atof(str);
|
|
|
|
|
1.
CString a = "6.591E+02";
float b;
sscanf(a,"%E",&b);
2.
CString a = "6.591E+02";
float b;
b = atof(a);
modified on Wednesday, April 20, 2011 6:03 AM
|
|
|
|
|
Since you're using C++ I suggest using streams.
#include <sstream>
{
CString strFloat("3.5");
istringstream is(strFloat);
float myFloat;
is >> myFloat;
}
This way you can catch errors easily.
Consider the following:
float af = atof("a");
float zerof = atof("0");
Both af and zerof will be 0, since on error atof() will return 0. Using streams you can check the stream status after conversion:
{
CString strFloat("3.5");
istringstream is(strFloat);
float myFloat;
is >> myFloat;
if (is.fail())
{
}
}
|
|
|
|
|
I am writing a MFC application which should run on different operating systems with different locales.
The application is in english and when running on english OS (like Windows 7) it works perfect.
However, when running on Chinese OS (Chinese Windows 7) I see that the english font is changed and it seems somewhat wider.
This wide font causes the text on my "Static Text" controls to be too big and the text is cut.
Is there a way to avoid this or must I go over all of my dialogs and set the size of the static text controls?
Regards,
Kobi.
|
|
|
|
|
|
I also have problem with localization. Chinese,Japanese, Korean and Thai Texts are displayed as Squares only in the Form Caption(Displayed perfect inside the Form). Also this problem occurs on running the application under Windows XP. There's no problem with Windows 7. What to do to localize the form caption for any Operating System?
|
|
|
|
|
I am downloading file via FTP ,but I am unable to find the file download
status .
I am not able to call OnStatusCallback function . How can I achieve my
task.
|
|
|
|
|
|
Hi all,
I have a very basic question to ask.
when i run this line of code
char array[27] = "abcdefghijklmnopqrstuvwxyz";
AfxMessageBox(array+15);
it gives this output pqrstuvwxyz.
I am not getting why it is doing so.....
I expected it to print only p.
I know i am wrong but please anybody who can explain me this.....
|
|
|
|
|
AfxMessageBox() takes a pointer to string (terminated by '\0' character) as argument. Thus it shows the characters till the '\0' character, from the pointer you provided.
Initializing a character array with a string appends a '\0' character to the end by default.
To show 'p' only:
char msg[2];
msg[0] = *(array+15);
msg[1] = '\0';
AfxMessageBox(msg);
It is basic thing and hope it is clear now.
|
|
|
|