|
|
Hi All,
Is there any way to generate DTD of XML file using VC++?
Any APIs?
Thanks.
--------------------------------------
Sorry, if u have read weird question..
|
|
|
|
|
|
|
|
I would be inclined to use:
void CMyClass::OnUnload()
{
CInternetSession m_Inet;
CFtpConnection* pConnection = NULL;
try
{
pConnection = m_Inet.GetFtpConnection(sServer, m_sUsername, m_sPassword));
...
}
catch (CInternetException e)
{
TCHAR szCause[255];
e.GetErrorMessage(szCause, sizeof(szCause));
AfxMessageBox(szCause, MB_ICONERROR);
}
if (pConnection != NULL)
pConnection->Close();
delete pConnection;
}
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
(Thanks for your answer.)
"CInternetSession m_Inet;" is declared as a class member but not initialized.
The "AfxMessageBox()" declared in the "catch" statement is not displayed.
The "GetFtpConnection()" function displays the following error messsage:
"220 NET+OS 6.3 FTP server ready"
"530 Not logged in"
and then it makes my function exit.
When I set some breakpoints with VS6, the debugger does not stop on them.
The end of my function is never reached!
Any more ideas, please?
Pascal
Thanks and regards
Pascal
|
|
|
|
|
Pascal Pinchauret-Lamothe wrote: "CInternetSession m_Inet;" is declared as a class member
Which would seem problematic since you also have one declared in the OnUnload() method.
Pascal Pinchauret-Lamothe wrote: The "GetFtpConnection()" function displays the following error messsage:
Where? In a window, or at a command prompt?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
i have to create windows explorer style mfc application. like file right click and windows right click how to do this. i am having a listcontrol to display files.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Do you want to show popup menu on the listctrl
|
|
|
|
|
Your answer was provided (twice) here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all,
I have an application which shows map of a city. The picture is stored as EMF. The application has zoom in and zoom out facility.
I need to hide detailed texts and lines when zoom out to small, for better clarity of the city map. The text and lines will have different sizes. The small sized objects need to be hidden.
I am trying to use EnumEnhMetaFile for this purpose. But I dont know how to identify the size of text and lines in the EnhMetaFileProc with the current size of the image.
Could anybody help me?
Thank you.
- NS -
|
|
|
|
|
NS17 wrote: I need to hide detailed texts and lines when zoom out to small, for better clarity of the city map.
i might be wrong, but i don't think you can do conditional drawing inside EMFs. at least, you can't save the condition - of course you can draw based on whatever logic you want, you just can't save the app logic along with the GDI commands.
|
|
|
|
|
Ofcourse I did some logic inside my app for this. Let me show some code snippet that I did experimentally.
int CALLBACK EnhMetaFileProc( ...... )
{
static bool bTextout = true;
if( lpEMFR->iType == EMR_SELECTOBJECT )
{
PEMRSELECTOBJECT p = (PEMRSELECTOBJECT)lpEMFR;
LOGFONT lf = { 0 };
if( sizeof(lf) == ::GetObject( lpHTable->objectHandle[p->ihObject], sizeof( lf ), &lf ))
{
if( lf.lfHeight >= -35 )
bTextout = false;
else
bTextout = true;
}
}
if(( lpEMFR->iType == EMR_EXTTEXTOUTW ) || ( lpEMFR->iType == EMR_EXTTEXTOUTA ))
{
if( !bTextout )
return TRUE;
}
::PlayEnhMetaFileRecord( hDC, lpHTable, lpEMFR, nObj );
return TRUE;
}
My problem is that I dont know how to identify the scaling. For example, how can I identify the following inside the EnhMetaFileProc...
EnumEnhMetaFile( dc, m_hEMF, EnhMetaFileProc, 0, CRect( 0, 0, 100, 100 ));
EnumEnhMetaFile( dc, m_hEMF, EnhMetaFileProc, 0, CRect( 0, 0, 500, 500 ));
Also I am not sure whether this is the correct method to do.
I did not get any details about this yet from MSDN or from net...
- NS -
|
|
|
|
|
Hi
I have worked with some nice apps like Remind! 5.45 and Macro Toolsworks 6.31. Many crackers have reported that such apps are not easy to crack.
Any guess, how they would have implemented crack-protection. If any one has idea or experience how to implement such crack-protection.
I need to implement similar crack protection in our VC++/MFC App. The idea is to make it more dificult to crack (i.e. with some check for anti-debugging, anti-cracking and anti-softice etc.)
I truly appreciate any help/ideas/reference links.
Thanks
Ana
-- modified at 8:28 Friday 6th April, 2007
|
|
|
|
|
Hello,
Anyone can point me working a find string / replace function written in C (ANSI C).
Thanks.
|
|
|
|
|
Find a string in where?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Sorry,
I have an initial string, in which I have to find a substring and replace it with a diffrent one. Like Replace() from CString.
Thanks,
|
|
|
|
|
Check out the MFC source for CString?
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
micutzu wrote: I have an initial string, in which I have to find a substring...
Have you looked at strstr() or strchr() ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Dear friends,
I want ot change look and feel of the basic screen to XP look and feel.
Please help me.
Megha
|
|
|
|
|
Are you looking for this[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
You can create an XML file with the following content:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <br />
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"><br />
<assemblyIdentity processorArchitecture="x86" version="5.1.0.0" type="win32" name="XPLooks" /> <br />
<description>Test Application</description> <br />
<dependency><br />
<dependentAssembly><br />
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="x86" /> <br />
</dependentAssembly><br />
</dependency><br />
</assembly>
Save the file as, for example, xptheme.xml
Then go to ResourceView and import this file. In Custom Resource Type, fill in "24" in Resource type. Finally, set the ID to "1".
-Houari
|
|
|
|
|
Hi,
I need to handle del key for a dialog based appliation.what should I do??
I did as shown below .
void C3DColorCardDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
AfxMessageBox(_T("C3DColorCardDlg OnKeyDown"));
if (nChar == VK_DELETE)
{
}
CEFCBaseDialog::OnKeyDown(nChar, nRepCnt, nFlags);
}
The problem is I am not getting the Message box on pressing a char or Del key.
Any Suggestions would be helpful.
Thanks
Satya
-- modified at 6:28 Friday 6th April, 2007
Today is a gift, that's why it is called the present.
|
|
|
|