|
Unidentified of the function and variables of this library.
cryptest\md5capi.cpp(47) : error C2065: 'HCRYPTPROV' : undeclared identifier
cryptest\md5capi.cpp(47) : error C2146: syntax error : missing ';' before identifier 'hCryptProv'
cryptest\md5capi.cpp(47) : error C2065: 'hCryptProv' : undeclared identifier
cryptest\md5capi.cpp(48) : error C2065: 'HCRYPTHASH' : undeclared identifier
cryptest\md5capi.cpp(48) : error C2146: syntax error : missing ';' before identifier 'hHash'
cryptest\md5capi.cpp(48) : error C2065: 'hHash' : undeclared identifier
cryptest\md5capi.cpp(55) : error C2065: 'CryptAcquireContext' : undeclared identifier
cryptest\md5capi.cpp(56) : error C2065: 'PROV_RSA_FULL' : undeclared identifier
cryptest\md5capi.cpp(56) : error C2065: 'CRYPT_VERIFYCONTEXT' : undeclared identifier
cryptest\md5capi.cpp(56) : error C2065: 'CRYPT_MACHINE_KEYSET' : undeclared identifier
cryptest\md5capi.cpp(59) : error C2065: 'CryptCreateHash' : undeclared identifier
cryptest\md5capi.cpp(60) : error C2065: 'CALG_MD5' : undeclared identifier
cryptest\md5capi.cpp(63) : error C2065: 'CryptHashData' : undeclared identifier
cryptest\md5capi.cpp(66) : error C2065: 'CryptGetHashParam' : undeclared identifier
cryptest\md5capi.cpp(66) : error C2065: 'HP_HASHVAL' : undeclared identifier
cryptest\md5capi.cpp(89) : error C2065: 'CryptDestroyHash' : undeclared identifier
cryptest\md5capi.cpp(90) : error C2065: 'CryptReleaseContext' : undeclared identifier
|
|
|
|
|
Looks like you have forgot to include a header file in your project. Search the header files for the definition of HCRYPTPROV, than add the #include statement to the top of your md5capi.cpp file.
|
|
|
|
|
I did not forgat include this file.
This is the first thing that i check - and its not it.
|
|
|
|
|
Did you include Wincrypt.h?
|
|
|
|
|
|
I see this program and compile it,it doesnt show any error to me Im using Vs2003
|
|
|
|
|
But i using Vs6....
Someone can help me here ?
I dont have any clue how to fix this problem.
|
|
|
|
|
See this[^] site I think its helpful for you
|
|
|
|
|
Yanshof wrote: but my compiler repeat the message "undeclared identifier".
Have you read through the message board on that article? You will need to install the latest SDK from Microsoft, Windows® Server 2003 R2 Platform SDK Full Download[^] the referenced header was not shipped with VS 6.0.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
It's hard to tell if my code is at fault or my graphics card just isn't fast enough, but I'm having some serious flickering issues. I have skinned a window (again), but this time I have enabled resizing. The skin has rounded corners, so as we all know we have to call SetWindowRgn() to create a rounded window.
Problem is, when calling this from WM_SIZE and when the size is being expanded, for a split second it appears as if the window region is moved but not expanded causing a flicker across the bottom and/or left border. This only happens when the top or left borders are being dragged.
I have noticed the same problem with the explorer windows, which are also rounded. But the window appears to rectify itself much faster than my bitmap heavy window.
Has anybody else come across a similar problem and/or managed to resolve it or reduce the flickering? Also, please try doing the same with an explorer window and let me know if you also notice a flicker.
|
|
|
|
|
A few places to look (in order!):
- Avoid erasing the background prior to redrawing - handle WM_ERASEBKGND
- Avoid changing the window region when the size hasn't changed - in WM_SIZE, store a copy of the current size, and when it's called again, check to make sure the size has actually changed before setting a new region.
- Check the speed of your drawing code. Temporarily replace it with something simple (but not too simple), like a pattern fill. If the flicker disappears, you probably need to work on optimizing your code.
every night, i kneel at the foot of my bed and thank the Great Overseeing Politicians for protecting my freedoms by reducing their number, as if they were deer in a state park. -- C hris L osinger, Online Poker Players?
|
|
|
|
|
All of the above have already been coded and none of them make a difference.
|
|
|
|
|
I want to drag and drop items from the tree control on to the explorer and vice versa.At present drag and drop operation is working fine inside the tree control.Can any one help me in this problem.
Thanks.
|
|
|
|
|
See This article^ of Michael Dunn. It might be useful to you.
2+2 = 5 (For very large values of 2)
|
|
|
|
|
ya,i have gone through it.It is good.But i am not able to implement that to a tree control.Can you help me in that.
Thanks.
|
|
|
|
|
Are you getting the drag/drop notification? Where exactly is the problem?
sig under construction
|
|
|
|
|
I am not able to use it to a tree control.Can you please tell How we can use it to the tree control.Please do help me.I am new to vc++.I am trying since 2 days.
Thanks.
|
|
|
|
|
I think you asked this question already did you see that link?
|
|
|
|
|
Hi,
I am not able to get it.It is very urgent.So,only i asked.I have gone through ur reply also.Thanks for that.
Thanks.
-- modified at 10:15 Saturday 14th October, 2006
|
|
|
|
|
why you cant get it and did you see it or no
|
|
|
|
|
ya,i saw it.What is happening is dragging and dropping occurs with in the tree control itself.But the respective folder is not dropped in the systems windows explorer.And another problem is when i drag the folder outside the application window the item is being dragged but it is not dropping there.Can you suggest me any code for the tree control to drop the item on to the explorer.(My tree control displays the explorer tree in it).Please help out in this.
Thanks.
|
|
|
|
|
Did you search on www.codeguru.com about drag and drop?
|
|
|
|
|
ya i have gone through some applications in that,but no use.Now i have decided to attach a menu to the tree items.It consists of copy and paste menu items.When i copy a tree item from tree contol and pasting it on the explorer it is working.Similaly when i copy from explorer and paste it in the tree control it is not occuring.I have written the code like this.Is there any wrong in this.
void CTreeFileCtrl::OnTreefilectrlPaste()
{
COleDataObject DataObject;
if( DataObject.AttachClipboard() )
{
DataObjectToTree(&DataObject);
}
}
void CTreeFileCtrl::OnUpdateTreefilectrlPaste(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
COleDataObject odj;
pCmdUI->Enable(FALSE);
if( odj.AttachClipboard() )
{
if( odj.IsDataAvailable( CF_HDROP ) )
{
pCmdUI->Enable(TRUE);
}
}
}
void CTreeFileCtrl::OnTreefilectrlCopy()
{
// TODO: Add your command handler code here
FileNamesToClipBoard();
}
void CTreeFileCtrl::OnUpdateTreefilectrlCopy(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
HTREEITEM hItem = GetSelectedItem();
if(hItem){
pCmdUI->Enable(TRUE);
}
else{
pCmdUI->Enable(FALSE);
}
}
void CTreeFileCtrl::FileNamesToClipBoard()
{
CDropFiles DropFiles;
if(!PrepareFileBuff(DropFiles)){
return;
}
if (OpenClipboard())
{
BeginWaitCursor();
::EmptyClipboard();
HGLOBAL hMem = ::GlobalAlloc(GMEM_ZEROINIT|GMEM_MOVEABLE|GMEM_DDESHARE, DropFiles.GetBuffSize());
memcpy( (char*)::GlobalLock(hMem), DropFiles.GetBuffer(), DropFiles.GetBuffSize() );
::SetClipboardData (CF_HDROP, hMem );
::CloseClipboard();
EndWaitCursor();
}
}
BOOL CTreeFileCtrl::PrepareFileBuff(CDropFiles &DropFiles) const
{
HTREEITEM hItem = GetSelectedItem();
if( hItem == NULL){
return FALSE;
}
else if(hItem) {
//int index = mylist.GetNextSelectedItem(pos);
DropFiles.AddFile(ItemToPath(hItem));
}
DropFiles.CreateBuffer();
return TRUE;
}
BOOL CTreeFileCtrl::DataObjectToTree(COleDataObject *const pDataObject)
{
if( pDataObject->IsDataAvailable( CF_HDROP ) )
{
STGMEDIUM StgMed;
FORMATETC fmte = { CF_HDROP,
(DVTARGETDEVICE FAR *)NULL,
DVASPECT_CONTENT,
-1,
TYMED_HGLOBAL };
if( pDataObject->GetData( CF_HDROP, &StgMed, &fmte ) )
{
HDROP hDrop= (HDROP)StgMed.hGlobal;
UINT cFiles = ::DragQueryFile(hDrop, (UINT)-1, NULL, 0);
char szFile[MAX_PATH];
CString pszFileTo=ItemToPath(GetSelectedItem());
SHFILEOPSTRUCT shfo;
WORD wFunc=FO_COPY;
//TCHAR pszTo[1024] = {0};
// TCHAR pszFrom[1024] = {0};
WORD wFlags = 0;
// wFlags |= FOF_SILENT;
ZeroMemory(&shfo, sizeof(SHFILEOPSTRUCT));
//szFileTo +="\0"
if(cFiles <= 0){
ASSERT(0);
return FALSE;
}
else
{
for( UINT count = 0; count < cFiles; count++ )
{
::DragQueryFile(hDrop, count, szFile, sizeof(szFile));
CString szFileFrom = szFile;
//szFileFrom+="\\0";
shfo.wFunc = wFunc;
shfo.fFlags = static_cast<fileop_flags>(wFlags);
shfo.pTo = pszFileTo;
shfo.pFrom = szFileFrom;
CopyFile(szFileFrom, pszFileTo,0);
SHFileOperation(&shfo);
if(shfo.fAnyOperationsAborted)
{
MessageBox("Aborted!");
return FALSE;
}
}
}
if (StgMed.pUnkForRelease){
StgMed.pUnkForRelease->Release();
}
else {
::GlobalFree(StgMed.hGlobal);
}
return TRUE;
}
}
}
Thanks.
|
|
|
|
|
I cant check you code but I see it seems it doesnt problem and I think I saw a loop(while) in your code for most a file and I think structure of your code is ok
|
|
|
|
|
i want to record the image screen behind one dialog,
when Pessing the OK button, this dialog don't disappear at once,and delay a while, sometimes my program may record this dialog's image, which covered
real image behind. why ?
here is my function:
void RecordScreen()
{
CMyDialog dlg;
if (dlg.DoModal()==IDOK)
{
//only click ok button to exit
RecordRectScreen(); //sometimes it records dlg'background
//this may cover the image screen in demand
}
}
void CMyDialog::OnOK()
{
....
BOOL aa = this->RedrawWindow(); //check aa , is true
CDialog::OnOK();
}
|
|
|
|