|
I want to hook the main thread of the application. But I'm not sure that call GetCurrentThreadID() in the context of a DLL will get me the desired thread.
In fact I tried that API, but the result is still the same.
Thank you!
|
|
|
|
|
Hi, I wrote an ActiveX in Visual Basic 6 that have a form with the purpose to act like a pop-up menu and to be used with any language. The form contains a WebBrowser. I have two situations:
1. When the form is shown in a modal way it works fine in both VB and VC++;
2. When the form is shown in a non modal way it only works in VB, the VC++ test app doesn't show the form and when the test app is closed the error message appears: "The instruction at 0x43dd085d referenced the memory at 0x00000138. The memory cannot be read" (translated from brazilian portuguese). A form with no WebBrowser doesn't crash, but doesn't show the form anyway!
The objective is make the form appears like a pop-up menu, so the modal way of showing the form forces the user to select an option or close the form like closing a window, pressing the close button, doens't allowing a click outside the activex form.
How can it works in a non modal way to any language?
Thanks, best regards!
modified on Tuesday, June 30, 2009 3:24 PM
|
|
|
|
|
Hi,
May i know why we need to use only 72 in the below function
lfHeight = -MulDiv(PointSize, GetDeviceCaps(hDC, LOGPIXELSY), 72);
I had a look in msdn where it was not explained...
|
|
|
|
|
one point = 1/72 of an inch
|
|
|
|
|
if u don"t mind can u be a little more clear...
|
|
|
|
|
GetDeviceCaps(hDC, LOGPIXELSY) gives you the number of pixels per inch for the device. (pixels/inch)
there are 72 points in an inch. (points/inch)
the other variable is points.
so (points * (pixels / inch)) / (points / inch) = pixels = height of text.
|
|
|
|
|
Are you asking What is a point?[^] Usually we express the size of the font in points. See the link.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
kumar sanghvi wrote: if u don"t mind can u be a little more clear...
Point (typography)[^]
Best Wishes,
-David Delaune
|
|
|
|
|
I created a Deployment applicaton via the Wizard to deplay my Visual Studio 2005 .Net application. The application uses several ActiveX controls. I have included them and registered them in the target PC.
However when I run the application having installed it on the target PC the hour-glass is visable for a few seonds then reverts back the the default cursor.
Are they any way of finding out the reason for this - I am toally blind to the problem. I did try and run from a DOS window, but still nothing.
On the deveopment PC the Installer works OK.
Regards,
Andy.
grahamfff
|
|
|
|
|
Grahamfff wrote: However when I run the application having installed it on the target PC the hour-glass is visable for a few seonds then reverts back the the default cursor.
I had very similar issues when I was testing a dialog based application which was using ActiveX controls that were not registered on the target platform. Are you absolutely sure that all your ActiveX controls are registered properly in the target system ?
|
|
|
|
|
Hi
I made some modification to MDI Application. The View's "OnDraw" will never be called.
How can I fix it?
Best regards,
|
|
|
|
|
Two wild guesses:
1. Invalidate () is never called, so no message to redraw the view is sent.
2. OnDraw () is being overridden by a derived class.
Showing the modifications you made might help with diagnosing the problem.
|
|
|
|
|
Besides. CView::OnDraw() is called by OnPaint() as a result of WM_PAINT message for screen painting in addition to OnPrint() for printing. You should be beware of this if you've done modification to WM_PAINT handler, too.
Standard paint routine is below.
void CView::OnPaint()
{
CPaintDC dc(this);
OnPrepareDC(&dc);
OnDraw(&dc);
}
|
|
|
|
|
I did not modify OnPaitn().
Best,
|
|
|
|
|
OnDraw() won't be called also for some view classes which require special drawing (like CFormView, CHtmlView, CCtrlView) although they are descendant of CView.
You need to give more info, as Alan said also.
|
|
|
|
|
I am having issues writing a C++ .dll.
When using MSVC++ 2003 the following line;
#include <iostream>
gives me a few errors
OraclePingC++ error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)
and
OraclePingC++ error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)
When I comment out the #include line, the errors go away. I've tried to play with the linker settings with my properties, but I'm not making progres..
|
|
|
|
|
JaeBeam wrote: When I comment out the #include line, the errors go away.
So then what's the problem?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
DavidCrow wrote: So then what's the problem?
It is "not working".
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh R Subramanian wrote: It is "not working".
It's not working, plz send me codez, urgentz plz plz.
FFY
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]
|
|
|
|
|
Now I understand. The low vote is because I missed the important information.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
This is just supposition, but did you do this in debug mode? I see that it's trying to call malloc and free with debug mode... try in release. see what happens. but i've definitely never seen this happen before
|
|
|
|
|
In your compiler settings look for the C/C++ Code generation section and change the Runtime library to Multi-Threaded-Debug /MTd
Best Wishes,
-David Delaune
|
|
|
|
|
It appears I already have my my Runtime library to Multi-Threaded-Debug (/MTd)
Here is the complete command line, cut and pasted from my projects properties:
/Od /AI "D:\Source Code\Cardacc v5.0.xx Customs\OracleTest\OraclePingC++\Debug" /D "WIN32" /D "_DEBUG" /D "_WINDLL" /D "_MBCS" /FD /EHsc /MTd /GS /Yu"stdafx.h" /Fp"Debug/OraclePingC++.pch" /Fo"Debug/" /Fd"Debug/vc70.pdb" /W3 /nologo /c /Zi /clr /TP /FU "c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorlib.dll" /FU "c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll" /FU "c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
When I try to build the dll in Release mode, I receive a ton of LNK2001 and 2019 errors.
|
|
|
|
|
JaeBeam wrote: c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorlib.dll
Is your project suppose to be using Managed C++ because you have the /clr flag set.
Best Wishes,
-David Delaune
|
|
|
|
|
Sometime the order that you #include header files will cause stuff like this to happen because one header expects another to be included first. Try changing the order of your #include s.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|