|
And I did not show you how to do a conversion, rather I suggested to do a conversion as a way to solve your problem. Please understand my answer!
Push Framework - now released !
http://www.pushframework.com
|
|
|
|
|
If you have a subsclassed CEdit control, you could limit the allowed input to the standard ASCII characters. That way any text retrieved even though UNICODE would still all be in the ASCII range.
Some clever stuff may have to be done to handle copy/paste etc but I would think such a method would be workable.
If you vote me down, my score will only get lower
|
|
|
|
|
when i am using CdaoDataBase in main application and close it ,it works success
but when i used cdaodatabase class in thread and close database and after that close application. it gives error. daocore.cpp line 40
m_Daoworkspace.release();
|
|
|
|
|
Shivanand Gupta wrote: it gives error.
Are we somehow supposed to guess what that error is? Have you put a breakpoint on line 40 of daocore.cpp and used the debugger to look at the code?
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
i have check by breakpoint. error occur when we close the application where CdaoDatabase class used in thread .
|
|
|
|
|
Shivanand Gupta wrote: error occur...
What error?
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
when we close application then applicationn perform this line of code (daocore.cpp file)
// Clean up engine object if necessary
if (pDaoState->m_pDAODBEngine != NULL)
{
pDaoState->m_pDAODBEngine->Release(); //error ouccr in this line
pDaoState->m_pDAODBEngine = NULL;
}
|
|
|
|
|
Shivanand Gupta wrote: pDaoState->m_pDAODBEngine->Release(); //error ouccr in this line
Ok, but what's the error? Is it an assertion, an exception, or something else?
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi,
i have done to change edit control backgtound & text color when it is enable, with the help of onstlcolor,
but my edit control is disable then i try to change color but color is not changing
|
|
|
|
|
When an edit control is disabled, it acts like a static control.
So in OnCtlColor method, check nCtlColor parameter for CTLCOLOR_STATIC .
|
|
|
|
|
I have a swf. How can I read swf version in MFC?
I can read my exe version using
CString Version::getFileVersion(LPCTSTR file)
{
CString version;
VS_FIXEDFILEINFO *pVerInfo = NULL;
DWORD dwTemp, dwSize, dwHandle = 0;
BYTE *pData = NULL;
UINT uLen;
try {
dwSize = GetFileVersionInfoSize((LPTSTR) file, &dwTemp);
if (dwSize == 0) throw 1;
pData = new BYTE[dwSize];
if (pData == NULL) throw 1;
if (!GetFileVersionInfo((LPTSTR) file, dwHandle, dwSize, pData))
throw 1;
if (!VerQueryValue(pData, _T("\\"), (void **) &pVerInfo, &uLen))
throw 1;
DWORD verMS = pVerInfo->dwFileVersionMS;
DWORD verLS = pVerInfo->dwFileVersionLS;
int ver[4];
ver[0] = HIWORD(verMS);
ver[1] = LOWORD(verMS);
ver[2] = HIWORD(verLS);
ver[3] = LOWORD(verLS);
if (ver[2] != 0 || ver[3] != 0)
{
version.Format(_T("%d.%d.%d.%d"), ver[0], ver[1], ver[2], ver[3]);
}
else if (ver[0] != 0 || ver[1] != 0)
{
version.Format(_T("%d.%d"), ver[0], ver[1]);
}
delete pData;
return version;
}
catch(...) {
return _T("");
}
}
|
|
|
|
|
So what exactly is the problem you are seeing? Does the code you've shown work? If not, what is it (not) doing?
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
That function works with exe file format. SWF's file format is different from that.
See here [^]
***** Dumping SWF File Information *****
----- Reading the file header -----
FWS
File version 3
File size 741
Movie width 550
Movie height 400
Frame rate 12
Frame count 10
I guess after getting this link I will be able to fetch the version. Now going to try this.
|
|
|
|
|
Have you tried something like:
struct header
{
char sig1;
char sig2;
char sig3;
char ver;
};
void main( void )
{
FILE *pFile;
pFile = fopen("c:\\i386\\intro.swf", "rb");
if (pFile != NULL)
{
header h;
fread(&h, sizeof(header), 1, pFile);
fclose(pFile);
}
}
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
hi,
how do i move files and directories with its children, in a directory, in to another directory, in another drive?
the MoveFileEx function, moves directories in same drive. but different drive ...?
please help me.
Zo.Naderi-Iran
|
|
|
|
|
zon_cpp wrote: MoveFileEx function, moves directories in same drive. but different drive ...?
Are you sure? The following sentence in MoveFileEx documentation[^]:
If a file is moved across volumes, MoveFileEx does not move the security descriptor with the file. The file is assigned the default security descriptor in the destination directory.
make me think you actually can.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
i tested MoveFileEx function. it can not move directory in different drive, with LastError = 5
Zo.Naderi-Iran
|
|
|
|
|
That's 'access denied' maybe your application hasn't the rights to access the source/destination folder.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
no,
thank you.
i found my solution:
it is SHFiliOperation function.
Zo.Naderi-Iran
|
|
|
|
|
thank you all.
i found my solution:
it is SHFiliOperation function.
SHFILEOPSTRUCT SHDirOp;
ZeroMemory(&SHDirOp, sizeof(SHFILEOPSTRUCT));
SHDirOp.hwnd = NULL;
SHDirOp.wFunc = FO_COPY;
SHDirOp.pFrom = "D:\\SourceDir\0";
SHDirOp.pTo = "C:\\DesDir\0";
SHDirOp.fFlags = FOF_MULTIDESTFILES|FOF_NOCONFIRMMKDIR|FOF_NOCONFIRMATION;
if (SHFileOperation(&SHDirOp) == 0)
AfxMessagBo("success");
Zo.Naderi-Iran
|
|
|
|
|
Hello everyone.
My MFC application is developed in Vista, VS 2008.
But when I install it in XP and run it, there are no icons showing at all.
Tested in Win 7 and Vista-all working fine.
If anybody has any idea how to manage this problem, please, help.
Thanks.
|
|
|
|
|
Are you talking about icons in a compiled resource file? What size/color depth do your icons have?
|
|
|
|
|
Thank you for your reply!
Yes. In compiled resource.
I made a Setup file and installed it both in XP and 7.
As I said, in 7 it is working fine.
Icon size: 32x32
color depth: 4 bit.
It's a standard XP system icon. I have copied it from a XP machine.
|
|
|
|
|
HI,
I had opened an existing console project and i was unable to add a new file to source files folder. i got the following error.
Microsoft (R) Developer Studio has encountered a problem and needs to close. We are sorry for the inconvenience.
HOw to resolve this error.
kindly reply
thnks in adv.
|
|
|
|
|
Maybe you need to re-install Visual Studio.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|