|
I should have included "initialize" in my search.
On one hand it really doesn't add anything.
On the other, it can standardize initialization methods. An int can be initialized in the same manner as an array. That is of little significance, but often consistency adds more than is immediately apparent.
Thanks for taking the time to reply.
Thank you for your time
If you work with telemetry, please check this bulletin board: www.irigbb.com
|
|
|
|
|
Hi,
Yes. This is the new direct list initialization available in C++11.
Best Wishes,
-David Delaune
|
|
|
|
|
Thank you for your reply.
|
|
|
|
|
Friends, how to compress speex ogg packets into a *. Oog file?(can make music player play the files)
please!
|
|
|
|
|
I am getting the errors related to WiX Toolset while compiling one of the applications of C++ in VS2005.
The error message shows that:
"WiX Toolset compiler has encountered a problem and needs to close".
I googled for the related information and tried by installing the 2007 version of Toolset compiler wix38.exe. But still not able to resolve the issue.
Please let me know how to rectify the error..
|
|
|
|
|
Without any more detail no one can guess what is wrong. You would be better posting your query on a forum dedicated to this product, since it has nothing to do with C++ per se.
|
|
|
|
|
Why the generated *. Ogg cannot play?
|
|
|
|
|
|
I am watching a video where B. Stroustrup talks about c++ - link-> (31:23) ()[^]
I have trouble understanding the RAII slide:
http://www.upload.ee/image/4090006/raii.png
1) Why doesn't he catch the exception?
2) I keep reading that when constructor throws, the destructor of an object is never called.
Regards
|
|
|
|
|
1) In a real program he most likely catches it in the code that tries to create the object.
2) If the constructor throws an exception then the object is not created so there is no destructor to call.
3) Why not ask Stroustrup?
|
|
|
|
|
1) Why should he?
2) That's fine: if the constructor cannot open the file then the destructor fclose call doesn't make sense.
Veni, vidi, vici.
|
|
|
|
|
Why doesn't he use the handle?
It's for illustration purposes only.
|
|
|
|
|
Where can I update the edit field to reflect changes of the file name to save?
I have customized my save file dialog and use CFileDlgEventHandler. There i need to set a different filename.
In the file save dialog I select a filename from existing files, e.g. blah.tif. After clicking a custom checkbox I need to set e.g. blah_C1.tif. I can get and set the filename inside the handler:
CComQIPtr<ifiledialog> pDlg = pfdc;
pDlg->GetFileName(...) and pDlg->SetFileName(...) work,
but after clicking 'Save' I get the filename previously selected (blah.tif) and not the changed one.
Anyone out there with a tip to update the edit control behind the scenes?
|
|
|
|
|
Have you tried overriding the CFileDialog class (MFC)? ...that should be easier to accomplish using MFC. In order to change the text, you just need to get the control ID (use Spy++ if you can't find documentation as to the ID) and set the new text using SetWindowText()[^].
|
|
|
|
|
I use the new Vista/W7 style COM dialogs, which use a different interface (not MFC). Hmm, obviously wrong forum (...as always...). I'll pass it to COM forum.
The problem is that there must be another control above the edit control (checkbox), which holds the filename, too. The interface does not offer a function to set the filename of the checkbox. I can set the filename of the edit, but it is not passed through, when hitting OK.
|
|
|
|
|
jung-kreidler wrote: Vista/W7 style COM dialogs
You can still use MFC if you wanted to....
...but anywho, yeah, I couldn't help you with COM.
|
|
|
|
|
Hi All,
i download opensourcecode to unzip a folder from below path
------http://www.winimage.com/zLibDll/minizip.html-------
->How to get the Minizip package and then 1.1 with zip64 support
i want to unzip a folder to another location.
Lets say if the zip file is at
C:\\temp\\aaa.zip
i want to unzip aaa.zip at C:\\temp\\abcd\\aaa
once i download the files from the above link i get Unzip.h file and use unzOpen() function. but unfortunately, its not working as per my expectation.
is there any body who can help me ?
below is my code :
***************************************************************
HRESULT UnZipFile(CAtlString srcPath, CAtlString tgtPath,CAtlString& errorMessage)
{
HRESULT hr=NOERROR;
CAtlString message;
INT result=0;
unzFile pZipFile=unzOpen((CAtlStringA)tgtPath);
if(pZipFile==NULL)
{
hr=E_FAIL;
message.Format(_T("Failed to open a zip file.\r\n%s"), tgtPath);
errorMessage=message;
}
return hr;
}
*****************************************************************
Kind regards,
Praveer
|
|
|
|
|
Hello,
Did you check what this E_FAIL is returning ?
Regards,
Gopi.
|
|
|
|
|
Quote: its not working as per my expectation
What are your expectations and what is the observed behaviour?
Veni, vidi, vici.
|
|
|
|
|
Hi,
the expected behavior is program should unzip the folder
|
|
|
|
|
How so if you don't even use the source path in your code?
P.S.:
More to the point, you don't call any functions to actually unzip anything! Unzopen fails, because it expects the zip file name/path, but you are passing to it the target path, which presumably is a directory, not a file at all. NMo wonder it doesn't work!
Moreover, unzOpen only provides a handle to the zip file that lets you access the individual files contained within, you need to use variuous other functions to walk over the list of files, find their relative path, and extract it to the target location.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
Member 4201820 wrote: i want to unzip aaa.zip at C:\\temp\\abcd\\aaa Does that folder exist? If not, will unzOpen() create it? What is the value of tgtPath ? Have you tried sending an email to info@winimage.com?
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Need to pass data from the sound wave convert ogg
|
|
|
|
|
|
I need to implement a recording function, using MFC to do and send the recording file to the Android mobile phone, all I need will be wav convert ogg, recording and use speex technology, but I never used, not used.
All programs ape to friends, please tell me what you know, it is better for examples of MFC recording convert ogg.Thank you!
renxiaoyao
|
|
|
|