|
Normally you must have a Create method supplied with your ActiveX (where you can specify the name, style, position, ...).
So first, create your object, then call the Create method.
Hope this helps!
|
|
|
|
|
Hi world...
I'm using DirectDraw with GDI to show image from a frame grabber inside a window (not fullscreen mode). I work with a DMA from the frame grabber to a video surface memory (get with DirectDraw). Then I use the GDI function StretchDIBits(...) to display this image inside a window.
Now, I want to zoom or unzoom this image. At this time I do that by changing arguments of the StretchDIBits(...) function. For example:
StretchDIBits(pDC->GetSafeHdc(),
0, 0, MAX_WIDTH * coef, MAX_HEIGHT * coef,
0, 0, MAX_WIDTH, MAX_HEIGHT,
Desc_ddsd.lpSurface, pBMPinfo, DIB_RGB_COLORS, SRCCOPY);
where coef is a coeficient for the zoom (if coef > 1) or unzoom (if coef < 1).
The unzoom is quickly enough but when the zoom is very slow. I can understand why (the zoom adds new pixels but not the unzoom)!
My question is : how to improve the zoom performances. I want a quick zoom. Does there exist another function? another technique?
Thanks in advance for your help...
Hello World!!!
from Raphaël
|
|
|
|
|
Anyone ever seen the following problem and if so how do I fix it !
I have a visual studio workspace which contains all my DLL projects. For each project I have defined a post build step which just copies the DLL to my Windows directory. The problem is that sometimes the file is copied but visual studio does not think that the step has completed and sits and waits for it to complete. This prevents me from pressing 'Stop build' and carrying on working. I have to kill the instance of visual studio from task manager, re-open the workspace and build again.
Any ideas why this happens ?
Users.
Can't live with 'em, can't kill em!
|
|
|
|
|
Id the DLL in the windows directory in use when the post build step is performed. I do this for my DLL projects all the time, and it only ever fails (but does not lock up) when the DLL is in use.
My post build step looks like:
copy debug\filename.dll ..\Executable\debug
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
Sorry no real solution. But I have seen this behaviour before when trying to compile multiple projects at once. Some times its a matter of dependencies. If one project depends on anoughter then make sure it first one is compiled first. Of course once in a great while it occurs when only one project is involed and all I can do is kill the instance and restart Visual Studio.
Trust in the code Luke. Yea right!
|
|
|
|
|
I am using the style SS_LEFTNOWORDWRAP with a static edit box to left align the text with no wrapping, now I want to use a style that right align the text with no wrapping putting into consideration that the SS_RIGHT style align the text to the right but with wrapping. I don’t want the right aligned text to be wrapped and there is no such style SS_RIGHTNOWORDWRAP, how can I solve it??
|
|
|
|
|
I'm not sure if I'm in the proper area but I am trying to debug a problem I having. Its in a COM object I have developed and the its causing an exception after the COM object closes. The exception is in OLE32.dll, I would like to see more information. I installed symbols for windows 2000 onto my system but VC++ doesn't seem to be able to find them? How can I make VC++ 6.0 find the symbols for these system DLL's?
|
|
|
|
|
If you installed them in the correct place, VC6 shouldn't have a problem finding them (I could swear I remember having working symbols by default on 2K). However, on XP, VC6 did not find the symbols, but I found a way to make it find them. There's a registry key that you can edit. Make sure VC6 is closed when you edit it though:
HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Build System\Components\Platforms\Win32 (x86)\Directories
In that key you can create a string value named "Pdb Dirs" (if it's not already there). Put in that string value the names of the director[y][ies] where your symbols are. Each directory should be separated by a semicolon.
Chris Richardson
You can stash and you can seize
In dreams begin, responsibilities U2 - Acrobat[^]
Stop being PC and accounting for everyone and his momma's timeframe. Just enjoy your - Rohit Sinha in the content-challenged thread
|
|
|
|
|
Hi everybody !
I have an app that use a class derived from CStatic. This is used to show several informations. I want in fact to print my information in a rectangle and that the text fit exactly in it without being deformed. By "fit exactly" I mean that the text must be completely in the rectangle but using the font as big as possible.
How can I know the Font size to use ??
Thanks
|
|
|
|
|
DrawText/DT_CALCRECT
(has But? http://www.codeguru.com/forum/showthread.php?s=&threadid=237321)
t!
|
|
|
|
|
In fact using this, it uses the current font & font size and just calculate the size of the rectangle of the text (doesn't draw the text).
I tried something like begin from font size 1 and increasing the font size till the resulting rectangle becomes larger in one direction of the desired rectangle. The problem is that this method is somewhat heavy: I have several controls like this and I refresh them quite often.
|
|
|
|
|
You could pick an arbitrary point size, get the rectangle with the relevant text. Then work out how much
you need to shrink / magnify it by and jump straight to that size.
eg.
CFont f = FontMake (12pt);
dc.SelectFont (f);
dc.DrawText ("hello", &rcText, DT_CALCRECT);
pt = min (pt * rcClient.Width / rcText.Width, pt * rcClient.Helght / rcText.Height)
f = FontMaks (pt)
dc.SelectFont (f);
dc.DrawText ("hello", etc).
If this is not exact enough, it will give you a better starting point than 1pt.
Iain.
|
|
|
|
|
Thanks!
Yes could be a better solution
|
|
|
|
|
I want to have an option in my aplication which lets this program to be run at startup time.
I have no idea how to even start writing this.
Is any api responsible for this or maybe I have to put something in registers?
One more question: All systems win 95 -2002, XP use the same method?
Waiting for your answers
|
|
|
|
|
You can add a command to start your app to the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\
Pavel
Sonork 100.15206
|
|
|
|
|
You can also use the same key in HKEY_CURRENT_USER
HKCU\Software\Microsoft\Windows\CurrentVersion\Run - for current user only, don't need admin access on Win2k/XP to change.
Pavel
Sonork 100.15206
|
|
|
|
|
Thank you very much
Take care
|
|
|
|
|
Hi all gurus!
I'm a C# junior progr but dont know anything about C or Visual C ( funny isn't? ).
Well, i must do aplication just to execute a DTS in a Labeled Server. No fancy error message things. Just execute, since this apl will be trigged by a job. I've search the web for some info about this, but only came with http://sqldev.net/dts/ExecutePackage.htm, but i cant override the fatal error C1083: Cannot open type library file: 'C:\MSSQL7\BINN\dtspkg.dll': Error loading type library/DLL. I've register this dll again and checked the rll. But the error continue. I'm using w2k logged as Adm.
<br />
#define STRICT <br />
#define WIN32_LEAN_AND_MEAN <br />
#define INC_OLE2 <br />
#define UNICODE <br />
#define _UNICODE <br />
<br />
#include <windows.h> <br />
#include <stdio.h> <br />
#include <tchar.h><br />
#include <comdef.h>
#include "execpkg.h"<br />
<br />
#import "C:\MSSQL7\BINN\dtspkg.dll" \<br />
no_namespace rename("EOF", "EndOfFile") <br />
<br />
INT _tmain(INT argc, TCHAR* argv[], TCHAR* envp)<br />
{<br />
HRESULT hr;<br />
if SUCCEEDED(hr = OleInitialize(NULL) )<br />
{<br />
try<br />
{<br />
HRESULT hr;<br />
_Package2Ptr spPackage;<br />
if (SUCCEEDED(spPackage.CreateInstance(__uuidof(Package2))))<br />
{<br />
try<br />
{<br />
_variant_t v;
hr = spPackage->LoadFromSQLServer(<br />
_T("(local)"),
_T(""),
_T(""),
DTSSQLStgFlag_UseTrustedConnection, <br />
_T(""),
_T(""),
_T(""),
_T("Teste"),
&v);
hr = spPackage->Execute();<br />
hr = spPackage->UnInitialize();<br />
}<br />
catch(_com_error pCE)<br />
{<br />
spPackage.Release();
}<br />
}<br />
}<br />
catch(_com_error pCE)<br />
{<br />
<br />
}<br />
<br />
OleUninitialize();<br />
}<br />
return (0);<br />
}<br />
I need some help, please.
Tks all
J.Portugal
|
|
|
|
|
It sounds like the file "C:\MSSQL7\BINN\dtspkg.dll" does not exists.
Are you sure it's there?
Hmmm, binn, shouldn't it be bin with just a single "n"?
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Tks Anders, but i already checked that...
The path is Ok... i even trow a wrong path just for checking and the error message are diferent:
fatal error C1083: Cannot open type library file: 'C:\MSSQL7\BIN\dtspkg.dll': No such file or directory
Any ideias?
J.Portugal
|
|
|
|
|
Ok...i've used the system comand DTSRun insted.
Tks all
J.Portugal
|
|
|
|
|
I need to read the default browser of the system and spawn it's instance. How can do that ? Right now my application is reading the IE registry keys to know it's path and spawning it.
But i need to support all browsers, atleast IE / Netscape / Mozilla ?
How can do it ?
Thanks and regards.
Vikram
|
|
|
|
|
If you have a html page you are wanting to fire up in a browser (I'm guessing you don't want a
blank page) then you can just use good old ShellExecute. To get a blank page, you *might*
be able to use "about:blank" for the file to "open".
Iain.
|
|
|
|
|
Another solution is to view the registry and determine what HTML is linked to. In your problem, edit that registry key.
Kuphryn
|
|
|
|
|
Thanks for the replies.
Anyway, got the path of the browser using API FindExecutable()passing the path of a .html/.htm file.
thanks & regards
Vikram
|
|
|
|