|
Jnewg5 wrote:
Thanks - I am aware of that, but I am falling in line with the adage that "Programmers are lazy."
As a lazy programmer myself, I find using the VS.NET menu easier and quicker, but then again it is very rare that I need to debug an app built by VS6. Only got one supported product using it now.
Michael
CP Blog [^]
|
|
|
|
|
As a lazy programmer myself, i made a small utility that runs in the background, when i press CTRL + F1 it automatically attaches the application i preconfigure it with into the debugger of my choice.
This utility also records some macros and send some keystrokes.
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Papa wrote:
i made a small utility that runs in the background, when i press CTRL + F1 it automatically attaches the application i preconfigure it with into the debugger of my choice.
This utility also records some macros and send some keystrokes.
Cool. Have you posted it as an article? Sounds like it might be a useful tool for your fellow CPians. I don't debug many running processes, so it probably wouldn't save me much time but it might help some others.
Michael
CP Blog [^]
|
|
|
|
|
Not yet.
I guess i will in the near future, but i know it can make my daily tasks easier, cos in order to test our system, we should enter a username password, so just imagine the number of times you enter those
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I want to open and edit a Microsoft Access 2000 (mdb) file by using the CDatabase and CRecordset classes in Microsoft Visual C++ 6.0.
I open the database using the following command:
db.Open(_T(""), FALSE, FALSE, "ODBC;DSN=MY_DSN");
Now I want to open the table "MyTable" from the database, how should I do this?
I tried the following code, but it threw me an exception at file "dbcore.cpp" at line 66.
CRecordset rs(&db);
rs.Open(CRecordset::dynaset,"MyTable",CRecordset::none);
Does anyone know why this error occured and how can I open that table correctly?
Thanks in advance
|
|
|
|
|
Hello everyone,
I'm still struggling with my classes hierarchy. Now, what I have is pure abstract interfaces classes and correspondent to them objects classes, which are actually hidden inside dll.
API.h
<br />
class __declspec(dllexport/dllimport) CxID {<br />
public:<br />
static const int GetID();<br />
private:<br />
static int iID;<br />
};<br />
class IxA {<br />
virtual int GetA() = 0;<br />
};<br />
class IxB_Only {<br />
virtual int GetB() = 0;<br />
};<br />
class IxB: public IxA, public IxB_Only {<br />
};<br />
<br />
extern __declspec(dllexport/dllimport) IxB *GetObject();
DLL.h
<br />
#include "API.h"<br />
class CxA: public CxID, public IxA {<br />
public:<br />
int GetA() { return 0xAA; }<br />
private:<br />
ID m_ID;<br />
};<br />
class CxB: public CxA, public IxB_Only {<br />
int GetB() { return 0xBB; }<br />
};<br />
DLL.cpp
<br />
CxB *g_pObj;<br />
BOOL APIENTRY DllMain(...) {<br />
...<br />
case DLL_PROCESS_ATTACH:<br />
g_pObj = new CxB();<br />
break;<br />
...<br />
}<br />
<br />
__declspec(dllexport/dllimport) IxB *GetObject() {<br />
return (IxB*)g_pObj;<br />
};<br />
Now, in application:
<br />
IxB *pObj = GetObj();<br />
So, what I want to achive by doing that is to be able to cast B object, which is hidded in dll and not known to user, to public ifaces iB and iA.
But, I have a problem. (Sorry for such long introduction)
When I debug my app I see this:
pObj
|--[CxB]
| |--CxA
| | |--IxA __vfptr with good address and fuctions
| |--IxB_Only __vfptr with good address and functions
|--IxA __vfptr with good address and functions
|--IxB_Only __vfptr with... 0xcdcdcdcd and error CXX0030: expression cannot be evaluated
It's obvious when I do pObj->GetB() I get "Access violation".
I have no idea what is wrong. It must work, I know it. But I can't see the flaw.
Please, plase, plase, somebody, any clue?
Thanks in advance.
|
|
|
|
|
Is it possible that the problem lies within your constructors ?
|
|
|
|
|
Hail Darkbyte,
No, simply because I don't have anything in C-tors except zeroing a couple of integers.
Thanks for the answer though.
|
|
|
|
|
Salam From Hafiz
Serial Port Communication is my
interresting topic,I want to
work at it if some one know
about it tell me to create
(establish) serial connection
thanks From Hafiz
|
|
|
|
|
Hain buddy,
just Search CSerialPort Class in Codeproject,that will really help you in you cause.
khuda hafiz
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Check out MSDN.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp
Kuphryn
|
|
|
|
|
I am doing realtime video manipulation software... so far, I am capturing frame from a camera, saving it to a disk and then retriveing it, converting to array of integers, and then do the manipulation.
Here I get about 2fps which is not acceptable.
Is there way to grab a frame and point where the image is the RAM and change pixels there?
in VC++ or VB6
thanks
|
|
|
|
|
More information on what you are using would help people answer the question.
The solution depends on how you are grabbing the image.
I have used Imagenation and National Instruments frame grabber cards - both of these come with sample applications in VC++ / VB, which let you allocate frame buffers in main memory, capture images to these buffers, access and process the image, and display the frame.
|
|
|
|
|
thanks for the reply...
I want to be able to use WDM (i think it's called that way) so I can use any camera. Currently I am using it with video in on Elsa Erasor 3 graphic card and with some cheap webcams...
I'm not sure how that really works but in my head I am supposed to find out address of the frame buffer in memory and take each captured pixel, change RGB value and put it back...
|
|
|
|
|
Sorry - my experience was using drivers which came with grabber cards, not WDM drivers. I wish I could help you!
|
|
|
|
|
thanks anyway...
Ive foung cFrameGrabber ehich is supposed to be a warper for AviCap which manipulates image directly in memory... the example application is so huge and complicated and maybe only 2fps faster then in Visual Basic with saving to file...
I guess I will wait a few years till computers gets stronger
|
|
|
|
|
Well the printing is dangerous task i do not know why in MFC. I am in fix for this problem.
Problem Statement:
1.0 If i am using default mapping mode i.e. MM_TEXT or explicitly mentioning
mapping mode as MM_TEXT here then circle is drawn on view. But on the
Print Previewing the image turns out to be microscopic.
2.0 If i am using mapping mode MM_LOENGLISH, then on menu item clicking it
draws but on OnDraw it doesnot shows again. and every thing is
blank. Even in print preview.
I had attaching sample code and application on the codeguru forum which illustrates the problem.
http://www.codeguru.com/forum/showthread.php?t=304420
Leave your mark wherever you go
|
|
|
|
|
Salam
If any One Know about Dialog Box Controlls Send me (easy,Begginners) Information Or Programms
|
|
|
|
|
You'll have to be a bit more specific about which controls but there are lots ot tutorials for beginnners here[^]
Michael
CP Blog [^]
|
|
|
|
|
The VMR-based sample code is completely valid.
The VMR-7 Filter is only supported in Windows XP, however, the VMR-9 (Video Mixing Renderer Filter 9) is available in all platforms supported by DirectX 9. So, go ahead and use the VMR-based sample code in the documentation. Just refer to the VMR-9 reference for correct interfaces/function calls.
Because VMR-9 is not the default renderer, you must manually add it to the end of the filter chain by using IFilterGraph::AddFilter method. This means that you cannot use any pre-configured rendering functions, but must build and connect the entire filter graph yourself. This is a tad more difficult, but have no fear, the DirectX C++ documentation has examples to building complex filter graphs, too.
For a quick link, here's a topic you should search for in the DirectX C++ documentation "Building a VMR-9 Filter Graph". It can be found from "DirectShow -> Using DirectShow -> Using the Video Mixing Renderer -> Building a VMR-9 Filter Graph".
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Antti,
I guess I misunderstood the symptoms. I suspect that either the display or the capture card device driver, or both, are not supporting VMR-9. I am having a lot of difficulty locating drivers for the hardware with support for DirectX 9.0 and VMR, so do you know of a pre-DirectX 7.0 way of doing this efficiently... Perhaps by performing the drawing of the overlay filter with the application in some way?
|
|
|
|
|
The final option on this scenario is to use the Overlay Mixer Filter and a Video Renderer. These two filters must again be added and connected manually.
The steps required to use them:
1. Create a filter graph object, and query for IGraphBuilder and IFilterGraph interfaces on the object
2. Add a source file filter using IGraphBuilder::AddSourceFilter and save the IBaseFilter pointer
3. Create the Overlay Mixer Filter object (CLSID_OverlayMixer) and query for it's IBaseFilter interface. Add this filter into the filter chain using IFilterGraph::AddFilter
4. Create the Video Renderer object (CLSID_VideoRenderer), repeating the steps in #3.
Now it's time to connect the filter chain pins. Firstly, on the source filter's IBaseFilter interface, call IBaseFilter::EnumPins to get an enumeration of the available pins. See the DirectX C++ Documentation with topic "Enumerating Pins" to get sample code on how to enumerate available pins. Get the first pin and save the IPin interface pointer.
Next, get the Overlay Mixer Filter object's IBaseFilter interface, and query for the pin at ID 0. Get this pin's IPin interface. Now, you use the Filter Graph object's IFilterGraph::Connect to connect these two pins. If any extra pins are required to connect these two, they are added and connected automatically. If the connection fails, query for the next pin in the source filter, and again attempt to connect. When a suitable configuration is found, the method will succeed. Remember to release all unnecessary IPin pointers, and the enumeration pointers when done.
Repeat the steps to connect the Overlay Mixer Filter's output (MEDIATYPE_Overlay) into the Video Renderer Filter's input. The reason why you cannot directly connect from the source filter into the Video Renderer is the fact that the Overlay Mixer Filter would be skipped. Hence the dual-step process.
When done, you need to configure the Video Renderer Filter to display the video in a correct window. For this purpose, query for IVideoWindow interface on the Filter Graph object. Now the filter graph is ready to run, so query for IMediaControl interface and issue IMediaControl::Run . The video is displayed in the window you specified.
If you want to test whether using a certain filter chain will work, you can use the GraphEdit tool that ships with DirectX SDK. This tool allows you to build even complex filter graphs that support video, audio or both. It even allows you to create a video capture graph if necessary.
Unfortunately I don't have any prepared source code. If you need any, let me know and I'll see to it if I can fathom up some simple example for you.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Additionally, if you need to add an image overlay (e.g. a logo) to the video, see this link[^].
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
I am stuck in a Windows 98 environment with a Direct X capture card. I need to overlay graphics onto the video stream at screen-resolution as the video is being previewed to the display. Because I am stuck with Win98, all the VMR-based sample code that comes with DirectX 9.0 SDK is useless to me.
Can anybody give me any advice / sample code on how to achieve this?
Thank you,
Pieter Smith
|
|
|
|
|
If you spy Calc.exe on Windows 2003 you find that all of the buttons are BS_PUSHBUTTON style. But the text on the buttons is coloured. How is this possible.
My understanding is that to add any colour to a button you need to make it owner draw and handle the CTLCOLOR_BTN message.
Alternatively, is the source code for calc.exe available ? And, where can I get hold of it.
Many thanks
Jonathan
jonathanappswing at hotmail dot com
|
|
|
|