|
RegisterClass[^] is a Windows API, and is used internally by AfxRegisterClass and
AfxRegisterWndClass.
The documentation for AfxRegisterClass and AfxRegisterWndClass (in the remarks section) describes
their usage:
AfxRegisterClass[^]
AfxRegisterWndClass[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
http://msdn2.microsoft.com/en-us/library/ms786690.aspx
It says :
Include Qedit.h. This header file is not compatible with Microsoft® Direct3D® headers later than version 7.
My application must do both VMR9 rendering and sample grabbing.
But there are many problems when i include d3d9.h+vmr9.h with qedit.h at the same time , it gives lots of errors when trying to build
how can i use vmr9 filter and samplegrabber filter at the same time ?
|
|
|
|
|
|
Thanks but what about audio streams ?
And what about processing imag , will it only give image or can it give chance of processing image buffer just in sample-grabber ?
|
|
|
|
|
Well this is unfortunate, but based on messing with this and searching for an answer...
It looks like the only workaround is to separate VMR-related and SampleGrabber-related code into
two different source modules. The two modules will need to include a different set of header
files (which means including them in a pre-compiled header won't work).
Another alternative is to make your own custom grabber filter. The Grabber Filter Sample in the
DirectShow SDK implements one that already works. You'd want to change the names and GUIDs to
your own to differentiate it from the SDK sample filter.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello,
What exactly is dlg subclass ?.I went through the docs of CWnd::SubclassDlgItem but did niot understand.
Is it regarding message handling routines when the windows controls are placed on a dialog?
How does subclassing help?
Prithaa
|
|
|
|
|
prithaa wrote: What exactly is dlg subclass ?.
In general, a subclass is this.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
To understand window subclassing and how the MFC framework subclasses windows, you should have a
good understanding of the fundamentals of Windows programming: Windowing[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello,
What is the relationship between subclassed dialog item and
DLGTEMPLATE d;
d.cdit
One of the demo code given for "Dynamic creation of Dialogs" saya
if a dialogitem is subclassed only then it can be added to to d.cdit.
This part of subclassed dialog item is what I did not understand.
Thanks for all your replies and cooperation.
Prithaa
|
|
|
|
|
prithaa wrote: What is the relationship between subclassed dialog item and
DLGTEMPLATE d;
d.cdit
None that I know of. The template is used for dialog creation.
Once a dialog and its items (controls) have been created then you can subclass them.
prithaa wrote: One of the demo code given for "Dynamic creation of Dialogs" saya
if a dialogitem is subclassed only then it can be added to to d.cdit.
That doesn't make sense. Do you have a link to that? Is it the MFC DLGTEMPL Sample?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Go that way, really fast. If something gets in your way, turn."
|
|
|
|
|
Hello ,
Thanks,for all your support.
I have understood almost everyting about the dialogs with your help.
One last question about subclass.
You said that
Once a dialog and its items (controls) have been created then you can subclass them.
What does the above statement mean?
I was referring to Dynamic Dialog Class by Marcel
Thanks
Prithaa
|
|
|
|
|
prithaa wrote: You said that
Once a dialog and its items (controls) have been created then you can subclass them.
In order to subclass a window (or control) it needs to have an HWND. That means the window has to
exist (be created) before you can subclass it.
Reminder/Note: In MFC, windows are created in two steps -
1) A C++ object (CWnd) is created
2) A window object (HWND) is created
To attach an MFC C++ object (CWnd) to a control in a dynamically created dialog (which already
has a valid HWND), you need to force the subclass to occur (usually this is done by the MFC DDE
mechanism), which is what you use CWnd::SubclassDlgItem() for. Once MFC has the control
subclassed, it can pass messages through the message map mechanism as usual.
You don't HAVE to subclass the controls of the dynamically created dialog. You only need to do
it if you need to associate them with an MFC object or provide special message handling beyond
what the control already does.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Go that way, really fast. If something gets in your way, turn."
|
|
|
|
|
I wrote a code (written as a SDI) that connects to DB (via ODBC) and does some work and views the results on a form.
But I need to add this to a bigger MDI project. How can I add it?
I thought of two ways :
1- directly add the DB project to the main project(which I don't know how)
2-create .lib out of the database project abd include it. But I don't know how make a .lib that contains CRecordset and Form View ...
Any idea?
Thanks a lot....
|
|
|
|
|
in my program, i need to hold infinite value in a string.
it is very easy for normal value, ie.
char*psz="33.33" is a string which holds value 33.33, because we can use atof() function to get the value 33.33 from "33.33".
but, how to hold infinite value in a string?
following is my test:
//----------------------------
CString cs;
double db1=1/sin(0);
cs.Format("%f",db1);
double db2=atof(cs);
//-------------------------
cs is displayed as "1.#INF00"
value of db2 is 1.00
we can explain why atof("1.#INF00") is 1.00 for code above.
but how to hold the infinite value db1 in a string "..." so that its value can be re-generated by atof("...") function?
|
|
|
|
|
Why not use cs.GetBuffer(),ReleaseBuffer() ? and then use atof()?
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
|
GetBuffer retrieves a pointer to buffer and when use of GetBuffer you must use of ReleaseBuffer and atof for convert of string to double.
Does this your answer?
|
|
|
|
|
you are making fun to yourself.
next time, read post first before writing down your funny reply.
|
|
|
|
|
I remember that most your replys got low vote like here[^] do you know why?
|
|
|
|
|
includeh10 wrote: but how to hold the infinite value db1 in a string...
Use gcvt() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Why the following piece of code that simply reads the current pos & size of the CEdit control makes the control to change its size regardless that no changes of top,left,bottom,right values are made ?
pEditSearch = (CEdit*) pPage->GetDlgItem(IDC_EDITSEARCH);
pEditSearch->GetClientRect (&rectChild);
pEditSearch->SetWindowPos (NULL,rectChild.top, rectChild.left, rectChild.right, rectChild.bottom ,SWP_NOMOVE | SWP_NOZORDER | SWP_SHOWWINDOW);
This piece of code is used in a left pane view (using a CSplitterWnd class) and my goal is to change the right border of the CEdit control accordingly of the pane size (just like a .CHM help file with am index).
Regards,
sdancer75
|
|
|
|
|
sdancer75 wrote: ...regardless that no changes of top,left,bottom,right values are made ?
The "change" comes in the form of client vs. screen coordinates.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Maybe try this (changes in red):
pEditSearch = (CEdit*) pPage->GetDlgItem(IDC_EDITSEARCH);
pEditSearch->GetWindow Rect (&rectChild);
ScreenToClient(&rectChild);
pEditSearch->SetWindowPos (NULL,rectChild.left, rectChild.top, rectChild.Width(), rectChild.Height() ,SWP_NOMOVE | SWP_NOZORDER | SWP_SHOWWINDOW);
Note SetWindowPos takes x,y,cx,cy - not y1,x1,x2,y2, like you were passing!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Ok I traced the error with your help Mark.
1. Totaly wrong parameters to SetWindowPost
2. It worked only with the GetWindowRect & ScreenToClient and not with GetClientRect ( I am curious why not???).
The combination of GetWindowRect / ScreenToClient should give the GetClientRect position, Am I wrong ?
Regards,
sdancer75
|
|
|
|
|
Did you use of ScreenToClient on your code it converts screen coordinates to client coordinates.
|
|
|
|