|
Hi.
I have two classes derived from CObject. They are leaking memory somehow.
What's wrong?
Memory Leaks!
0 bytes in 0 Free Blocks.
273 bytes in 6 Normal Blocks.
0 bytes in 0 CRT Blocks.
0 bytes in 0 Ignore Blocks.
268 bytes in 3 Client Blocks.
Largest number used: 3260 bytes.
Total allocations: 4732 bytes.
EXPLORER.DLL Terminating!
DLG.DLL Terminating!
WEB.DLL Terminating!
The thread 0xEB4 has exited with code 0 (0x0).
<br />
<br />
class CModulExplorer : public CObject<br />
{<br />
DECLARE_SERIAL(CModulExplorer)<br />
public:<br />
CModulExplorer();<br />
virtual ~CModulExplorer();<br />
virtual void Serialize(CArchive& ar);<br />
<br />
HICON hSIcon;<br />
HICON hLIcon;<br />
BOOL bSystemFolder;<br />
CString sDefaultName;<br />
CString sNodeName;<br />
CString sPath;<br />
};<br />
<br />
class CModulWeb : public CObject<br />
{ <br />
DECLARE_SERIAL(CModulWeb)<br />
public: <br />
CModulWeb();<br />
virtual ~CModulWeb();<br />
virtual void Serialize(CArchive& ar);<br />
<br />
enum NavigationStyle {WNS_BLANK = 1014, WNS_LAST = 1015, WNS_DEFAULT = 1016};<br />
<br />
HICON hSIcon;<br />
HICON hLIcon;<br />
NavigationStyle ns;<br />
CString sDefaultName;<br />
CString sUrl;<br />
CString sNodeName;<br />
};<br />
<br />
class CMainFrame : public CMDIFrameWnd<br />
{<br />
DECLARE_DYNAMIC(CMainFrame)<br />
public:<br />
CMainFrame();<br />
<br />
public:<br />
CModulExplorer *m_pExplorerCls;<br />
CModulWeb *m_pWebCls;<br />
...<br />
}<br />
<br />
<br />
<br />
IMPLEMENT_SERIAL(CModulExplorer, CObject, 0)<br />
IMPLEMENT_SERIAL(CModulWeb, CObject, 0)<br />
<br />
<br />
CModulExplorer::CModulExplorer()<br />
{<br />
}<br />
<br />
CModulExplorer::~CModulExplorer()<br />
{<br />
}<br />
<br />
void CModulExplorer::Serialize(CArchive& ar)<br />
{<br />
}<br />
<br />
<br />
CModulWeb::CModulWeb()<br />
{<br />
}<br />
<br />
CModulWeb::~CModulWeb()<br />
{<br />
}<br />
<br />
void CModulWeb::Serialize(CArchive& ar)<br />
{<br />
}<br />
<br />
<br />
CMainFrame::CMainFrame()<br />
{<br />
CRuntimeClass* pClass = NULL;<br />
<br />
pClass = RUNTIME_CLASS(CModulExplorer);<br />
m_pExplorerCls = (CModulExplorer*)pClass->CreateObject();<br />
<br />
pClass = RUNTIME_CLASS(CModulWeb);<br />
m_pWebCls = (CModulWeb*)pClass->CreateObject(); <br />
}<br />
<br />
CMainFrame::~CMainFrame()<br />
{<br />
delete m_pExplorerCls;<br />
delete m_pWebCls;<br />
}<br />
|
|
|
|
|
I have found that some ADO methods (Update, Delete)
doesn't work with tables having high number of fields.
Is this problem real ??
How can I manage big tables with ADO ?
Tanks a lot !
|
|
|
|
|
Huh!?
Can't be...
What error do you get? Or what doesn't work exactly?
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
The 80004005 error is generated and the string in the exception is: "Query too complex"
This assertion is generated when I try to update an
existing record or to remove it.
Instead, when I try to add a new record and when I fill
it, or when I browse the big table, none exception is
generated !!!
I really don't know how to solve this problem !!!
|
|
|
|
|
Hm... don't know what i9t can be...
Are you sure that your SQL query is correct?
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
Rickard is right. You usually get this error when your SQL statement is wrong but you say that this doesn't happen when you add a new record, so there could be some other reasons. For instance:
1. Make table names and column names shorter.
2. Reduce the number of columns in the table.
// Afterall I realized that even my comment lines have bugs
|
|
|
|
|
Hi,
I have two (or more) sets of icons that I want to use together to form a combination of icons. My icons have transparency, so I want to be able to draw one on top of the other, so that the one on the bottom shows through the transparent areas of the top.
Btw, I want to be able to draw this on any dialog.
Thanks in advance.
|
|
|
|
|
See DrawIcon or DrawIconEx in the doc.
|
|
|
|
|
I have a problem using the WST utility.
I followed all the steps in creation of the exe and linking the wst.lib file to the linker.
i have my .wsp generated files in the c:\wst dir
but the moment i run the command
c:\wst:> wstune /o myfile.wsp
it gives me an error
wstune : using "myfile.wsp"
what could be the problem
can anyone give me the solution.
thanking you
|
|
|
|
|
Hy everybody!
a little question...
I'm creating a invisible window (with create function), but when I do it my current app window loses his focus...
How can I create the window in the way that my current window don't loses his focus?
thanks all!
Cheers!
Ricky
|
|
|
|
|
One solution is to simply focus the parent window right after calling creating the child window.
kuphryn
|
|
|
|
|
For example I have a dialog based project with tab control.
And there is some amount of dialog resources.
When I change tabs I need to include (embed) and switch those dialogs inside the main dialog.
I dig into ICQ dlls and found that they are using the same trick in dialog with tabs.
|
|
|
|
|
If it is possible use the property sheet, it's easier to maintain and to work with...
|
|
|
|
|
|
Hey all,
I'm working on a project and need to better understand and restrictions Microsoft has on the redistribution of these DLLs. As I understand it, they ship as part of W2K, but work on 98/ME as well. There are a few technical articles that outline how to use them for enumerating network adaptors and completing other SNMP tasks, but I can't find anything about restrictions on their use.
Anyone have any experience with them?
WSNMP32.DLL
MGMTAPI.DLL
MIB.BIN
David
|
|
|
|
|
The windows 98 resource kit has an install for the MS SNMP Agent buried in here[^]
There is an snmpzp.exe file available here[^] for win95.
Also check KB139462.
|
|
|
|
|
Does anyone know anything about the UNZDLL.DLL? I am trying to find a way to extract archived .zip, .tgz, .tar files from within my application. There are dozens of commercial tools for this, all at a reasonable price (I guess). I just want to make sure that I'm not missing something obvious / easy before I go buying something.
I also found some MFC source that wraps the UNZDLL.DLL exported functions.
Thanks,
Dave
|
|
|
|
|
|
Help!
I create a propertysheet on a view. when the program runs the sheet show at once. I want to change the size of the propertysheet.
But I fail. Please help!
Your help are greatly appreciated.
davidwu
|
|
|
|
|
you have to handle the WM_SIZE message of the property sheet parent.
There you have to do:
<br />
void CDialogThatresizesThePS::OnSize(UINT nType, int cx, int cy) <br />
{<br />
CDialog::OnSize(nType, cx, cy);<br />
<br />
ResizePS(this->m_rectPS);<br />
ResizeTabCtrl(this->m_rectPS);<br />
ResizeActivePage();<br />
}<br />
<br />
void CDialogThatresizesThePS::ResizePS(CRect rectPS)<br />
{<br />
this->m_PS->SetWindowPos(NULL, rectPS.left, rectPS.top, rectPS.Width(), rectPS.Height(), SWP_NOZORDER | SWP_NOACTIVATE);<br />
}<br />
<br />
void CDialogThatresizesThePS::ResizeTabCtrl(CRect rectTabCtrl)<br />
{<br />
CTabCtrl *pTabCtrl = this->m_PS->GetTabControl();<br />
<br />
if (pTabCtrl != NULL)<br />
{<br />
pTabCtrl->ModifyStyle(0, TCS_MULTILINE);<br />
<br />
pTabCtrl->SetWindowPos(NULL, 0, 0, rectTabCtrl.Width() - 6, rectTabCtrl.Height() - 10, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);<br />
}<br />
}<br />
<br />
void CDialogThatresizesThePS::ResizeActivePage()<br />
{<br />
CRect rectTabCtrl;<br />
<br />
CPropertyPage *pPage = this->m_PS->GetActivePage();<br />
<br />
CTabCtrl *pTabCtrl = this->m_PS->GetTabControl();<br />
<br />
if (pTabCtrl != NULL)<br />
{<br />
pTabCtrl->GetClientRect(&rectTabCtrl);<br />
<br />
rectTabCtrl.right -= 6;<br />
rectTabCtrl.bottom -= 22;<br />
<br />
if (pPage != NULL)<br />
{<br />
pPage->SetWindowPos(NULL, 0, 0, rectTabCtrl.Width() - 2, rectTabCtrl.Height() - 4, SWP_NOMOVE | SWP_NOZORDER);<br />
}<br />
}<br />
}<br />
I've derived a PS and I've placed that code there, in this way is easy to resize it...
but I hope that using this piece of code you'll be able to resize the property sheet and that after having resized it you will arrange it in order to make it more useful to you.
Hope this helps.
|
|
|
|
|
Hello,
My Win32 app is calling a procedure stored inside a Dll, using LoadLibrary and GetProcAddress. Most of the time everything works okay.
The dll is written in Fortran. The method being called opens a file, reads in data, performs calculations and outputs results in another file.
Occasionally the calculations cause a Floating-Point Exception to occur. I don't have access to the Fortran src so I've being trying to catch the exception in the C++ calling code, using C++ exception handling but it doesn't catch.
My questions are:
1) is this possible? (can an exception being thrown by a dll linked dynamically at run time be caught? - I could try creating an import library if that's possible.)
2) can anybody give me any clues?
Thanks,
John
|
|
|
|
|
I think you need to look at the Win32 Structured Exemption Handling (SEH). I'm sure you'll find articles here on SEH and of course on MSDN.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Thanks,
Got the answer in Handling Exceptions, Part 17 in MSDN by using a 'Translator Function' to bind SEH to the more friendly C++ Exception handling mechanism.
Work's perfectly!
John
|
|
|
|
|
I'm using CADORecordset class by Carlos Antollini.
I'm not able to delete a record in the recordset
or to change its content.
When I try these operations it generates an
exception and says "Query is too complex".
Can someone help me ???
Thanks a lot
|
|
|
|
|
I think the MFC idea od passinf just the CPritInfo* for OnPreparePrinting is bad because we cannot print anything any where,especially like in my case where I need to measure the diagram and span it across the pages and inform the user the equired number of pages.I just cannot do it.Attaching/Fromhandle ing of the dc from pOnfo->m_Pd->m_pd.hDC asserts false. I have to use the inelegant m_bContinuePrinting to check the pages during print.
Any help.
-Goran
|
|
|
|