|
Paul Conrad wrote: Why? Do you have a moving scale of what to charge based on if it is homework or take home test?
Because his question was originally posted in the lounge, and I wanted to know what the appropriate flame response should be.
Marc
|
|
|
|
|
Marc Clifton wrote: wanted to know what the appropriate flame response should be
Pick a flame, any flame
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I see your problem. You can't do that with a basic binary tree. You need to switch to an advanced binary tree.
Gary Kirkham
Forever Forgiven and Alive in the Spirit
He is no fool who gives what he cannot keep to gain what he cannot lose. - Jim Elliot
Me blog, You read
|
|
|
|
|
I'm not even sure an advanced tree would work. He might need a segmented octal tree with a U’u root.
|
|
|
|
|
Here's the text that appeared above the window where you posted this message. I'm moving it to the C++ forum, where it belongs. Please use the right forums.
Rules: The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. Do not post programming questions (use the programming forums for that) and please don't post ads.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
maybe change the < by a> ?
|
|
|
|
|
|
It seems simple, in principle: ou have just to reconvert back each byte (two hexadecima digits) of your multiple records and chain them in a single binary file.
What are you afraid about?
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.
|
|
|
|
|
You're using ODBC directly? If so, it's fairly easy to do reading/writing of BLOB fields.
These are the only functions needed I believe, most of which you're probably already using if
you're using ODBC:
SQLAllocHandle()
(optional) SQLSetStmtAttr() to set synchronous/asynchronous and other statement attributes
(optional) SQLBindParameter() depending on the query
SQLExecDirect()
SQLFetch()
SQLGetData() / SQLPutData()
(optional) SQLParamData() depending on the query
SQLFreeHandle()
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
Is there any code out there that shows how to make the first colomns of a list control
static. That is when a horizontal scroll is made, the first columns of the control stays
in view. I searched the net for some info, but could not find any.
tia.
|
|
|
|
|
No, you'll need something like a grid control to do that.
|
|
|
|
|
paper67 wrote: Is there any code out there that shows how to make the first colomns of a list control
static.
By Design ListCtrl doesn't provide you thsi property but you can achieve same by writing your algo after subclassing the ListControl to make First Item Always Fixed User Scroll. it is pretty much easy if you use GridControl!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief
|
|
|
|
|
See if the Extras section of this article is of any help.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
What about two CListCtrl overlapped? In the first one the parts that you dont want to loose, in the other the rest. The only problem is you have to keep the CListCtrl scroll sincronized (for the other direction).
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
I`m trying to create dialog for collecting customer information in an MFC application. The dialog contains a radio button to switch between customer type (private or company) when user changes the customer type I need some controls on the dialog to disapear and others to become visible... What would be your suggestions in getting this done?
|
|
|
|
|
you can make a control invisible by using:
this->GetDlgItem(IDC_XXXXX)->ShowWindow(SW_HIDE);
and visible by:
<br />
this->GetDlgItem(IDC_XXXXX)->ShowWindow(SW_SHOW);
where IDC_XXXXX is the ID of the control.
|
|
|
|
|
Also you can use ON_BN_CLICKED to get notifications when the user clicks a radio button.
In response to the notification(s) you can check if a radio button is "checked" using
CButton::GetCheck() or the BM_GETCHECK message.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
You can use of ShowWindow but Can you say how many controls you have on the forum?
|
|
|
|
|
Dear all
I add one library file (atapid.lib)to my project and compile it. but I get following error
atapid.lib(tapireq.obj) : fatal error LNK1202:
"D:\...\Debug\vc60.pdb" is missing debugging information for referencing module Error executing link.exe.
How can I overcome to this problem.
Regards
Monhi
|
|
|
|
|
Try rebuilding the entire application. i.e. Make a Full Recompile.
vc60.pdb is the 'Program Database' file and will be recreated when you will compile the app.
|
|
|
|
|
I am trying to understand how it is possible to transfer a binary file (CFile) through an open CSocket connection that uses CArchive/CSocketFile. Bellow is a sample of my actual code. The socket transfer is working because before transfering the file itself, I am serializing other objects. They are correctly received. But the CFile.serialize() method leads to the reception of an empty file.
Server part :
m_pFile = new CSocketFile(this);
m_pArchiveIn = new CArchive(m_pFile,CArchive::load);
m_pArchiveOut = new CArchive(m_pFile,CArchive::store);
...
CString strFileName = "C:\Toto.exe";
CFile sourceFile;
sourceFile.Open( strFileName, CFile::modeRead | CFile::typeBinary, &fe );
sourceFile.Serialize(*(m_pArchiveOut));
m_pSocket->m_pArchiveOut->Flush();
Client part :
m_pFile = new CSocketFile(this);
m_pArchiveIn = new CArchive(m_pFile,CArchive::load);
m_pArchiveOut = new CArchive(m_pFile,CArchive::store);
...
CString strFileName = "C:\Toto.exe";
CFile destFile;
destFile.Open( strFileName, CFile::modeCreate | CFile::modeWrite | CFile::typeBinary, &fe );
destFile.Serialize(*(m_pArchiveIn));
Any help would be appreciate. Thanks.
Guillaume.
|
|
|
|
|
It looks to me (and I could very well be wrong) that you're just serializing a CFile object,
not the contents of the file.
I would think you need to read chunks of bytes from the file and write them to the archive object
instead (read bytes from the archive and write to a file on the receiving end).
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Mark
Thanks for your answer.
This anyway sounds strange for me : when I am serializing an object like a CString or a CObList (using the .serialize method), it sends the content of the object. My first thought was that it should be the same for a CFile. What would be the goal of having a CFile object without content ? Strange ...
I will do it myself chunking the file or using the TransferFile API.
Thanks again.
Guillaume.
|
|
|
|
|
glemaire wrote: What would be the goal of having a CFile object without content ?
CFile is just a C++ wrapper around a file handle and provides methods for accessing the file
using the handle. Similar to the way a CWnd wraps an HWND and provides methods to access a window
through that HWND. The actual window data represented by the handle is in the system, not in your
CWnd object.
Hope that makes sense
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I'm using WinInet APIs in async mode to upload files to server using HTTP protocol and "POST" request. As a matter of fact, I'm trying to simulate HTML form (multipart data) submit button.
I can successfully send file, but I have problem with making progress bar while uploading.
Here is code I'm using for sending:
while (dwReadLength != 0)
{
DWORD dwBytesSent = 0;
dwReadLength = fileLocal.Read(pBuffer, dwChunkLength);
if (dwReadLength != 0)
{
if (!InternetWriteFile(hInternetFile, pBuffer, dwReadLength, &dwBytesWritten))
{
if (::GetLastError() != ERROR_IO_PENDING)
{
strError.Format("CFileHostingHttpUpload::UploadFile::InternetWriteFile(2) = %d",
::GetLastError());
return FALSE;
}
WaitForSingleObject(hAsyncOp, INFINITE);
}
dwTotalRead+=dwBytesWritten;
pbUpload->SetPos(((double)dwTotalRead/dwTotalRequestLength)*100);
}
}
The problem is that my progress bar gets fully "progressed" in about 1-2 seconds, but file uploading is far slower (25kb/s upload speed). When I track transfer with net sniffer tool I can see that it takes about 10 seconds to upload 256 kb file, but progress bar gets fill almost instantly. I've tried about 6-7 different upload "loops" but all of them are giving almost same result.
InternetStatusCallback gives me this:
<br />
11:49:19 - Connected to server.<br />
11:49:19 - Sending request ...<br />
11:49:19 - Request sent: 186 bytes<br />
11:49:19 - Request complete.<br />
11:49:19 - Sending request ...<br />
11:49:19 - Request sent: 86 bytes<br />
11:49:19 - Sending request ...<br />
11:49:19 - Request sent: 4096 bytes<br />
...<br />
... (a lot of same status until the end of upload, no need to paste them all :))<br />
...<br />
11:49:19 - Sending request ...<br />
11:49:19 - Request sent: 4096 bytes<br />
11:49:19 - Sending request ...<br />
11:49:19 - Request sent: 4096 bytes<br />
11:49:19 - Request complete.<br />
11:49:19 - Sending request ...<br />
11:49:19 - Request sent: 802 bytes<br />
11:49:19 - Sending request ...<br />
11:49:19 - Request sent: 16 bytes<br />
11:49:19 - Receiving response ...<br />
11:49:29 - Response received: 1024 bytes<br />
11:49:29 - <br />
11:49:29 - Request complete.<br />
Does anybody have any kind of solution?
Best Regards and have a nice day!
|
|
|
|