|
Thankyou. Do you know how i add a filter to IFilterGraph if i only know the name of the filter?
-Rune Svendsen
|
|
|
|
|
Using VC6 it was easily possible to create a MFC-VC6 appl. and link MFC statically. The apps only depended on Kernel32.dll, User32.dll,...
Doing the same with VC7 or even converting such a project from VC6 to VC7 results in additional dependencies to SHLWAPI.dll, OELAUT.dll and OLEACC.dll.
How can I remove the dependencies to these DLLs, even linking with /opt:ref /opt:noicf doesn't help.
Any idea on howto make VC7 work like VC6 in this aspect is very much appreciated.
Rainer
|
|
|
|
|
Rainer
i too have noticed those dependencies, but don't think shlwapi and oleaut create particular problems
as far as oleacc.dll i suggest you to check out:
http://www.codeproject.com/cpp/oleaccproxy.asp[^]
basically an oleproxy or, better, a delayed loading dll, seems to be a recommended practice
maybe you could use this way also with the other 2 dlls
hope this helps
best regards
|
|
|
|
|
This helps
thank you
Rainer
|
|
|
|
|
How can I draw a transparent Icon without using DrawIcon function. I don’t want to use DrawIcon because it didn’t limit the width and height of the Icon in the DC. So I need a method that can draw a transparent icon within certain width and height.
Thank you
|
|
|
|
|
This is just a shot in the dark but have you checked out the functions in CImageList? Or if you are not using MFC then the corresponding ImageList_XXX functions?
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
I tried CimageList::DrawIndirect but it does not clip the icon, it draws it according to the width and height values passed in the parameter, so if I passed a smaller height the icon will be shrank to fit this height. What I need is to clip the icon according to the height and width I need.
Thank You
|
|
|
|
|
DrawIconEx accepts size arguments. I don't know if they use that to stretch the icon or to clip it. You could also try using the DrawState function. It draws an icon as a specified location and in a particular size.
Software Zen: delete this;
|
|
|
|
|
DrawIconEx does not clip the icon, it draws it according to the width and height values passed in the parameter, so if I passed a smaller height the icon will be shrank to fit this height. What I need is to clip the icon according to the height and width I need. DrawState does not clip the icon as well, it draw it all although I need it to be half drawn.
Thank You
|
|
|
|
|
You could do the following:
- Create a bitmap the same size as the icon, using
CreateCompatibleBitmap . - Create a memory device context compatible with the final destination DC using
CreateCompatibleDC . - Select the bitmap from step 1 into the memory device context.
- BitBlt from the final destination DC to the memory device context. This copies the background from the destination into the memory DC.
- Draw the icon into the memory DC using
DrawIcon . The icon has now been drawn (including transparency) onto the background, in the memory DC's bitmap. - BitBlt from the memory DC to the final destination DC, setting the destination size to clip the image as desired.
I know this seems somewhat laborious, but this should do the trick. Good luck.
Software Zen: delete this;
|
|
|
|
|
This solved my problem.
Thank you
|
|
|
|
|
and with cximage[^]?
The CxImage::Draw( ) method has a pClipRect parameter to limit the painting region.
|
|
|
|
|
How can I position a window to the bottom of a MDI client window, but above any statusbars/toolbars it has down there?
I got it done up to the part about client window, but the status/toolbars... no idea
I'm using MFC.
|
|
|
|
|
Hmmm. Using the MDI client window as a starting point, enumerate the client's child windows using EnumChildWindows , find the position of the free space within the client area from the positions of the child windows (which should include status and tool bars).
Software Zen: delete this;
|
|
|
|
|
QUESTION 1:
How do I deallocate the memory for input/output BSTRs from a VB client? ASP client? I cannot call SysFreeAlloc(...) from anywhere except in a C++ client.
Here's the idl for the method exposed by the interface:
[id(1), helpstring("method GenQuery")] HRESULT GenQuery([in] BSTR bstrParam, [out, retval] BSTR * bstrSQL);
QUESTION 2:
Do I need to Destroy my COM server object/instance? It's an inprocess dll-Apartment(both) ATL COM server.
Here's code for a VB client:
Private Sub btnQueryGen_Click()
Dim objQueryGen As QUERYGENALPHALib.QueryGenerator
Set objQueryGen = New QueryGenerator
Dim strSQL As String
strSQL = objQueryGen.GenQuery(Me.txtParam.Text)
Me.txtSQLQuery.Text = strSQL
'I cant objQueryGen = Nothing (runtime error 438: Object does not support this method or property)
End Sub
QUESTION 3 - destroy COM server?
What about from ASP?
norm
|
|
|
|
|
VB and VBScript handle all of that for you, AFAIK.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
what do u mean? what do u mean that VB.NET will handle all that...?
and what's "AFAIK"
norm
|
|
|
|
|
All scripting languages will do this for you. And yes, both VB and VB.NET will also. It helps however to clear the reference to your COM object after it has been used but you must use the Set keyword there also:
<br />
Set myObject = Nothing<br />
AFAIK : As Far As I Know
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Syntactically, is the keywork "Set" redundant, u think?
norm
|
|
|
|
|
No, VB requires it.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
hi, just built a simple COM object/server with ATL. It's inprocess-Apartment(both) server. Client is a simple VB application for testing purposes.
what's the better way of testing a COM server? ActiveX controller? Any good tutorial?
THanks!
norm
|
|
|
|
|
I do this every day at work, my components are called from VBScript, which means that if I attach the debugger to dllhost, I can debug them in VC++. I need to make sure the debug version is registered first, of course.
If they are run from a C++ app, the app itself is where the dll is run, so I attach to that. I presume VB would be the same.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
thanks, how exactly can i do that? any good tutorial?
norm
|
|
|
|
|
Project/Debug/Attach To Process. That's all there is to it, VC will proceed to debug the process you point it to, and then you just load up the files from your COM component and set some breakpoints.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
I usually test this way: A VB Project1.exe, with a Form1 and a Command1 button
If I want to test multi-threaded issues, I do the same with a C# client.
My latest article:
SQL Server DO's and DONT's[^]
|
|
|
|