|
Books are one of those things that are highly opinionated. You can ask a dozen people what their favorite is and you'll get 12 different answers. Everyone dis/likes a book for a different reason. I started programming in C and C++ with the help of Schildt and Petzold. Some folks shy away from those authors for various reasons. If you have a book in mind, check out amazon.com for customer reviews.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
LINK : warning LNK4089: all references to "SHELL32.dll" discarded by /OPT:REF
I keep getting this but don't know where to fix it. A search on google seemed to suggest I just need to take this out of project settings but i can't find it at all, I assume on the Link tab?
Any ideas?
|
|
|
|
|
This is not a problem. This is telling you that even though you are linking with the import library for SHELL32, you are not actually using any thing from the SHELL32 DLL (either by not explicitly calling something from the DLL, or code that did optimized out).
The result of this is that even though you linked with that DLL's import library, the executable will not require implicit (load-time) loading of that DLL.
Remove SHELL32.lib from your libraries, that should resolve the warning.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
-- modified at 12:17 Tuesday 14th February, 2006
|
|
|
|
|
James R. Twine wrote: Remove SHELL32.lib from your libraries, that should resolve the warning.
If he is using MFC, then shell32.lib is linked in dynamicly via a #pragma comment(lib, "shell32.lib") statement in afx.h. It can not be removed from from the library list without modifying the MFC sources.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
I am using MFC for a dialog app. Can't find the pragma comment, or indeed afx.h, I have StdAfx.h included in my project though
|
|
|
|
|
As I said, it is not a "real" problem. In this case, you may have to deal with the warning...
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
thanks! no problem, I just wanted to make sure I wasn't brushing something under the carpet that would lead to problems later
|
|
|
|
|
Good morning .. .
I know I can use CString::FormatMessage to format strings when localizating my application ( see this[^] )
Is there an equivalent in STL or for standard C++ or is that too OS/Toolkit oriented to have a unified solution ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
all i know of is sprintf.
~Nitron.
ññòòïðïðB A start
|
|
|
|
|
CString/CStringT::FormatMessage(...) wraps the standard FormatMessage(...) function.
This function uses a writable character buffer to format the string into. I do not know of a "proper" way to get writable access to the internal buffer in a basic_string object (data() returns a const pointer to the data).
I would suggest that you allocate a temporary buffer, format into it, and then assign the contents of that buffer to the STL string:
TCHAR caBuffer[ 1024 + 1 ];<br />
<br />
::FormatMessage( ... caBuffer ... );<br />
caBuffer[ 1024 ] = _T( '\0' );<br />
ssYourSTLString = caBuffer;
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
no,no ( but thanks for the info ... )
I was wondering if there was a standard STL/C++ way to deal with such an issue ? if the STL group or C++ standard had such concerns or if it's too closelly tied to the OS/Toolkits.
M.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Maximilien wrote: no,no
"no, no" about what?
Anyway, yes; the FormatMessage(...) is not a "standard" function, like how one may consider printf(...) , a standard function - it is a Windows platform function, so not something one would expect to be handled by standard C++ or STL.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I was writing to myself ... I did not clearly explain what I seeking...
sorry ...
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I am busy writing up an article for CP that just what you are asking for. I expect to have it ready for posting in a couple of days. If you send me your email address I can send you the demo code that I have ready so far. Then you can test it for me;P
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
In case you can't wait for the reply from PJ Arends.
Try this
http://www.codeproject.com/vcpp/stl/ostringstream.asp
(by Christian Graus)
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
RemoveDirectory(LPCTSTR lpPathName);
is used for where the path must specify an empty directory, but i want to remove a directory and also the files and folders that are in the specified folder , how can do that?
as per MSDN
BOOL RemoveDirectory(LPCTSTR lpPathName);
lpPathName
[in] Pointer to a null-terminated string that specifies the path of the directory to be removed. The path must specify an empty directory, and the calling process must have delete access to the directory.
Regards.
|
|
|
|
|
Use SHFileOperation() .
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Would like to give me an example in what way it can be used for above said purpose
Regards.
|
|
|
|
|
Do you mean other than what Googling would show you?
SHFILEOPSTRUCT s = {0};
s.wFunc = FO_DELETE;
s.pFrom = "c:\\somedir\\anotherdir\\*.*\0";
SHFileOperation(&s);
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
|
Recursively iterate child directories and files, deleting the files first, and then deleting the empty directories left behind. Use DeleteFile to get rid of the files. See FindFirstFile, FindNextFile, and FindClose. Don't forget to ignore the '.' and '..' files while iterating all files within a directory.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
hai.. this is kiran...
I request all respectd peoples,pl give code or guideline regarding WAVEFILETOTEXT file in either SDK or MFC.
HAPPY VALEN
THANKU FOR ONE AND ALL.
|
|
|
|
|
i don't understand...
how would you convert a wave file (which basically describes a signal) into text file (which is for beeing read)... ?
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
i guess that basically needs speech recognition. when you are able to recognize a speech, then what's the problem converting them to text?
VuNic
|
|
|
|
|
Hi ,
I am having problem sending CString data more than 255 character length to my Database Table through CRecordset class.
I hav tried this thing both on SQL Server field(of type varchar (700) and also on ntext type) and MS Access field(of Text type).
I m creating my CRecordset class through wizard pointing to database table with ODBC.
CString ppp;
ppp="somevalue"
tstRs->m_res = ppp;
now if ppp is less than 255 it works fine but if its more than 255 characters I get exception .
does anybody know whats wrong ? and how to send a string more than 255 using CRecordset ????
Thanks in advance.
ZINC
|
|
|
|