|
What Steve said. Is VS2005, open the project settings and in the General section make sure the Minimize CRT Use is ATL is set to No.
|
|
|
|
|
That was it. Many thanks.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I'm using VS2005 Standard
I'm completely new to WTL, and have downloaded 8.0.6034 from sourceforge. How do I "install" the app wizard stuff? The installer appears to be a javascript file, but when I try to load it in IE, nothing happens. The documentation doesn't appear to say how to run these setup files.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Close Visual Studio and just double-click the "setup80.js" script.
|
|
|
|
|
Many thanks.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I don't know if this applies to 8.0, but it did to 7.x: If you want to use the ATL (& MFC)-implementation of CString, then make sure to include atlstr.h just after atlbase.h (at the very least before any of the wtl-includes). WTL has its own CString-implementation, which it'll enable if ATL::CString isn't present by the time of inclusion. This can create all kinds of bizarre type mismatches if you include atlstr.h after WTL.
--
-= Proudly Made on Earth =-
|
|
|
|
|
I want to create a child(?) window on a form that overlaps the non-client area of the main window. Similar to the Office 2007 application button (see http://images.tomshardware.com/2006/03/10/office_2007_beta_2_02.jpg).
I have tried setting the window style to WS_POPUP, but the window is still clipped to the client area of the frame. The only way I can get around this is to use a screen DC, but that doesn's seem like the right thing to do (and I have to manually determine when the window shoudl be visible so I don't draw over other windows.
Any hints would be greatly appreciated.
|
|
|
|
|
i developed an ActiveX control with ATL,vs2005
When I try to open my ActiveX Control with Dependency Walker in client machine
i got the following error:
"Failed to load due to a mismatched machine type with one or more of the dependent modules"
It need "CoreDll.dll".
I saw below article on MSDN to troubleshoot the issue
http://msdn2.microsoft.com/en-us/library/aa459142.aspx
but it looks like it is all about Windows CE and .Net compact framework. I am using Windows XP SP2.
Any help is appreciated.
|
|
|
|
|
Instead of client m/c, use dependency walker on development m/c to detect all dependencies, and ship them along with activex.
|
|
|
|
|
use dependency walker on development m/c
"atl80.dll" and "msvcr80.dll" are needed ,i ship them along with the activex ,but it can not work.
|
|
|
|
|
Hi all,I want to use bho to catch the message of mouse right click.It seems there exists one way:
Using ATL.I followed MSDN:rewrite SetSite,and then assign FindConnectionPoint,then advise,at last catch events to invoke,the following is example codes in invoke():
switch (dispidMember)
{
case DISPID_HTMLELEMENTEVENTS_ONCLICK:
CComPtr< IDispatch > pDisp;
IHTMLDocument2*pHTMLDoc;
mWebBrowser2->get_Document(&pDisp);
if (pDisp!=NULL)
{
pDisp->QueryInterface(IID_IHTMLDocument2, (void**)&pHTMLDoc);
pHTMLDoc->elementFromPoint(myPoint.x,myPoint.y,&pElement);
}
...
}
But,how can I know myPoint,where can I get it?
|
|
|
|
|
pDispParams parameter of IDispatch::Invoke would have that infromation.
|
|
|
|
|
I have the same question.
Could you pls let me know how to get the point from DISPPARAMS* pDispParams
|
|
|
|
|
I not created any object in my program, but I found memory leak. Why?
I wonder whether the stl in VC6.0 can be available.
The source code is as follow. If you run it in VC6.0, you may find the memory leak prompt in output box. Why?
// TestMemLeak.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <stdio.h>
#include <vector>
#include "srmcritsec.h"
#define _CRTDBG_MAP_ALLOC
#include<stdlib.h>
#include<crtdbg.h>
typedef struct ipqam
{
char szName[50];
char szIpAddr[50];
char szDistrictName[50];
char szNote[255];
}IPQAM;
typedef struct freqpoint
{
char szName[50];
// added by yangyi,2006-8-23
int32 Modulate;
int32 Freq;
int32 Symbolrate;
char szNote[255];
}FREQPOINT;
/*
****************************************************************
struct : interfreqpoint
****************************************************************
*/
typedef struct interfreqpoint
{
FREQPOINT freqpoint;
// CSrmCritSec sec;
interfreqpoint();
interfreqpoint(const interfreqpoint & obj);
~interfreqpoint();
interfreqpoint & operator=(const interfreqpoint & obj);
}INTERFREQPOINT;
interfreqpoint::~interfreqpoint()
{
}
/*
function : constructor
*/
interfreqpoint::interfreqpoint(const interfreqpoint & obj)
{
*this = obj;
}
/*
function : constructor
*/
interfreqpoint::interfreqpoint()
{
this->freqpoint.Freq = 0;
this->freqpoint.Modulate = 0;
this->freqpoint.Symbolrate = 0;
this->freqpoint.szName[0] = 0;
this->freqpoint.szNote[0] = 0;
}
/*
function : overload =
*/
interfreqpoint & interfreqpoint::operator=(const interfreqpoint & obj)
{
strcpy(freqpoint.szName,obj.freqpoint.szName);
strcpy(freqpoint.szNote,obj.freqpoint.szNote);
freqpoint.Freq = obj.freqpoint.Freq;
freqpoint.Modulate = obj.freqpoint.Modulate;
freqpoint.Symbolrate = obj.freqpoint.Symbolrate;
return * this;
}
/*
****************************************************************
struct : interipqam
****************************************************************
*/
typedef struct interipqam
{
IPQAM qam;
std::vector<interfreqpoint> freqpointarray;
// CSrmCritSec sec;
interipqam(const interipqam & obj);
interipqam();
~interipqam();
interipqam & operator=(const interipqam & obj);
}INTERIPQAM;
interipqam::interipqam(const interipqam & obj)
{
*this = obj;
}
interipqam::~interipqam()
{
freqpointarray.clear();
}
interipqam::interipqam()
{
qam.szDistrictName[0] = 0;
qam.szIpAddr[0] = 0;
qam.szName[0] = 0;
qam.szNote[0] = 0;
}
interipqam & interipqam::operator=(const interipqam & obj)
{
INTERFREQPOINT objFp;
int32 nCnt = obj.freqpointarray.size(),nLoop = 0;
strcpy(qam.szDistrictName,obj.qam.szDistrictName);
strcpy(qam.szIpAddr,obj.qam.szIpAddr);
strcpy(qam.szNote,obj.qam.szNote);
strcpy(qam.szName,obj.qam.szName);
freqpointarray.clear();
for(nLoop = 0;nLoop < nCnt; nLoop++)
{
objFp = obj.freqpointarray.at(nLoop);
freqpointarray.push_back(objFp);
}
return *this;
}
int main(int argc, char* argv[])
{
_CrtDumpMemoryLeaks();
printf("Hello World!\n");
return 0;
}
yangyi
|
|
|
|
|
The source code is as follows.
#include "stdafx.h"
#include <stdio.h>
#include <vector>
#define _CRTDBG_MAP_ALLOC
#include<stdlib.h>
#include<crtdbg.h>
typedef struct ipqam
{
char szName[50];
char szIpAddr[50];
char szDistrictName[50];
char szNote[255];
}IPQAM;
typedef struct freqpoint
{
char szName[50];
// added by yangyi,2006-8-23
int Modulate;
int Freq;
int Symbolrate;
char szNote[255];
}FREQPOINT;
/*
****************************************************************
struct : interfreqpoint
****************************************************************
*/
typedef struct interfreqpoint
{
FREQPOINT freqpoint;
// CSrmCritSec sec;
interfreqpoint();
interfreqpoint(const interfreqpoint & obj);
~interfreqpoint();
interfreqpoint & operator=(const interfreqpoint & obj);
}INTERFREQPOINT;
interfreqpoint::~interfreqpoint()
{
}
/*
function : constructor
*/
interfreqpoint::interfreqpoint(const interfreqpoint & obj)
{
*this = obj;
}
/*
function : constructor
*/
interfreqpoint::interfreqpoint()
{
this->freqpoint.Freq = 0;
this->freqpoint.Modulate = 0;
this->freqpoint.Symbolrate = 0;
this->freqpoint.szName[0] = 0;
this->freqpoint.szNote[0] = 0;
}
/*
function : overload =
*/
interfreqpoint & interfreqpoint::operator=(const interfreqpoint & obj)
{
strcpy(freqpoint.szName,obj.freqpoint.szName);
strcpy(freqpoint.szNote,obj.freqpoint.szNote);
freqpoint.Freq = obj.freqpoint.Freq;
freqpoint.Modulate = obj.freqpoint.Modulate;
freqpoint.Symbolrate = obj.freqpoint.Symbolrate;
return * this;
}
/*
****************************************************************
struct : interipqam
****************************************************************
*/
typedef struct interipqam
{
IPQAM qam;
std::vector<interfreqpoint> freqpointarray;
// CSrmCritSec sec;
interipqam(const interipqam & obj);
interipqam();
~interipqam();
interipqam & operator=(const interipqam & obj);
}INTERIPQAM;
interipqam::interipqam(const interipqam & obj)
{
*this = obj;
}
interipqam::~interipqam()
{
freqpointarray.clear();
}
interipqam::interipqam()
{
qam.szDistrictName[0] = 0;
qam.szIpAddr[0] = 0;
qam.szName[0] = 0;
qam.szNote[0] = 0;
}
interipqam & interipqam::operator=(const interipqam & obj)
{
INTERFREQPOINT objFp;
int nCnt = obj.freqpointarray.size(),nLoop = 0;
strcpy(qam.szDistrictName,obj.qam.szDistrictName);
strcpy(qam.szIpAddr,obj.qam.szIpAddr);
strcpy(qam.szNote,obj.qam.szNote);
strcpy(qam.szName,obj.qam.szName);
freqpointarray.clear();
for(nLoop = 0;nLoop < nCnt; nLoop++)
{
objFp = obj.freqpointarray.at(nLoop);
freqpointarray.push_back(objFp);
}
return *this;
}
int main(int argc, char* argv[])
{
_CrtDumpMemoryLeaks();
printf("Hello World!\n");
return 0;
}
yangyi
|
|
|
|
|
If you hide the for loop in InterIpqam::opertator=(),and then you rebuild and debug it, you maynot find the memory leak prompt in output box. Why?
I am very puzzled.
yangyi
|
|
|
|
|
- When you post code, can you (please) use a setting where your
#include angle brackets don't get converted to tags - the "Ignore HTML tags in this message (good for code snippets)" checkbox should be checked - There will be no memory leaks in the code you've posted - it doesn't actually use any of your
struct s - I added some code to instantiate some
interipqam items and assign them - there were no memory leaks that I could see. I think you can be reasonably confident that std::vector works as advertised, at least as far as allocating memory goes.
|
|
|
|
|
Firstly, thanks for your answer.
Secondly, let me go on with my question.
Of course, I know it not creat any objects, so it doesn't have any memory leak.
But in vc's output when you debug it, you may find memory leak prompt info.
I copy the prompt info here.
Detected memory leaks!
Dumping objects ->
{42} normal block at 0x00441F70, 33 bytes long.
Data: < C > 00 43 00 CD CD CD CD CD CD CD CD CD CD CD CD CD
{41} normal block at 0x00441FC0, 40 bytes long.
Data: < |L > 14 7C 4C 10 16 00 00 00 00 00 00 00 00 00 00 00
Object dump complete.
So I wonder why?Can u tell me the cause? Thanks
yangyi
|
|
|
|
|
I didn't have any memory leak information when I ran your code. However, to find the source of those leaks, you could try using _CrtSetBreakAlloc to get the runtime to break when the relevant memory allocation is performed. Looking at your text, you need to look for allocations 41 and 42 (the numbers inside the curly brackets).
However, I think you'll find those allocations are made by the C runtime library *before* your code is ever called (I compiled a console application with the line int* a = new int; and that was allocation number 88), so they aren't allocations you need to worry about, because the runtime library clears them *after* your code exits.
|
|
|
|
|
my code:
<code>CComQIPtr<IHTMLDOMNode>pRootNode(lpParentDisp);
CComPtr<IDispatch> spChildren;
if(FAILED(pRootNode->get_childNodes(&spChildren)))return;
CComQIPtr<IHTMLDOMChildrenCollection> pChildColl(spChildren);
long lCount = 0;
pChildColl->get_length(&lCount);
for (long l = 0;l<lCount;l++)
{
CComPtr<IDispatch> spChild;
pChildColl->item(l,&spChild);
CComQIPtr<IHTMLDOMNode> pChild(spChild);
CComQIPtr<IHTMLElement> pElement(pChild); // I don't obtain the point
}</code>
please somebody help me ! thanks........
-- modified at 22:14 Thursday 7th December, 2006
I'm a good man!
-- modified at 22:15 Thursday 7th December, 2006
|
|
|
|
|
Hi,
I've created a com object in ATL ( still learning ). However, somethimes you get to see such nice online installers.
Someone goes to a specific page, gets the error that he needs some files installed on his computer. then in iexplore, a nice goldbar kicks in wich automaticly sends you the nessesary files on accept. even better, they totally install and register themselfs. So how can i create this? i'm using apache 2.* on a debian linux server ( sorry, trying to jump to winserv 2003 any time now )
|
|
|
|
|
1 .write a inf file like this sample:
; Sample INF file for AVJumbee.dll
[version]
; version signature (same for both NT and Win95) do not remove
signature="$Chicago$"
AdvancedINF=2.0
[Add.Code]
AsiaViewFTPCtrl.dll=AsiaViewFTPCtrl.dll /// com dll
; needed DLL
[AsiaViewFTPCtrl.dll]
file-win32-x86=thiscab
clsid={42FD5C77-532D-4BB0-A284-F0D8FB124049} // com guid
FileVersion=1,00,0,3
RegisterServer=yes
; end of INF file
2 download CabArc.Exe file
3 run cmd:CABARC -s 6144 n AsiaViewFTPCtrl.CAB AsiaViewFTPCtrl.dll AsiaViewFTPCtrl.INF //make a .CAB file
4 codesign2005 tools
5 put the sign cab file to web
hi
|
|
|
|
|
thanks, gonna test it asap
|
|
|
|
|
I used CWindow::Create() to build a new POPUP window in VC++6.0/WTL. I wanted to
make the window behave like a dialog without using a dialog resource template. By behave like a dialog, I mean the running process suspends until the dialog window returns/closed.
Can you please help me with that? Thanks.
|
|
|
|
|