|
Superman, I am stuck between using EnumWindows and a hook. I have tried both. Here are my problems with both. I was avoiding to use hook because i am not as provicient yet to use, however if I can get it going with what I have so far, It will save me frustrations in the future. The reason I am avoiding it is I for now is I only need it to get my window captions and window positions of all windows open based on classname. I am way behind in this. If you can help with either I will appreciate it.
Hook Problem.
The Dll compiles fine. Not sure how to test it yet on its own.
User Inteface that goes with the hook compiles fine own its own and runs fine. However when I compile and run it with the header files included for the hook dll. I get a run time execution error. I changed the project to make it as a dependency when compiling. When I do that the user app is looking for a hookdll.lib file which I believe is for the dll's export which I can't find and not sure what options to change, even though I have the __desc(....dllexport) in there. So I am stuck there.
EnumWindows Problem.
I am using trying to use it when the user clicks the command button in the user application.
This is what I have so far and cant compile once i have this in the app.
void CUserAppDlg::OnBnClickedButton1()
{
::EnumWindows(MyEnumProc, 0);
}
Not sure How to declare this. Getting compile errors on this too.
I have it in the app's header file in the public section as
BOOL CALLBACK MyEnumProc(HWND hWnd, LPARAM lParam);
the following is in the app's.cpp
BOOL CALLBACK MyEnumProc(HWND hWnd, LPARAM lParam)
{
char title[500];
GetWindowText(hWnd, title, sizeof(title));
return true;
}
I sincerely appreciate all the help you have provided me with.
once again thanks a million.
|
|
|
|
|
It looks fine to me.
What is the error that you're getting?
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Appreciate your help a lot.
When I use EnumWindows.
error C3867: 'CUserAppDlg::MyEnumProc': function call missing argument list; use '&CUserAppDlg::MyEnumProc'
When I use the hook without the dependency compiles and header included.
This is with the hook in the userapp: The application failed to initialize properly (0xc0000005).
Without the hook in the user app and no EnumWindows: the UserApp is fine.
DeBug Question:
When I am debugging my app. The debuger states that no sorce code found when it reaches the above error. Could this error be caused by one of the Header files I am using. e.g. or <regex.hpp> because if it is all I am using are the standard header files nothing fancy.
Thanks a million.
|
|
|
|
|
Well. I might have resolved this doing the following. Not sure where I went wrong with the first one.
I created a new userapp. Without inserting any codes compiled it to make sure it works. Well it worked.
Created a DLL project in the same solution as I had before this time instead of changing and entering anything. Compiled it and set the dependencies.
After setting the dependencies it compiled not asking for any lib files.
I changed the dll code to pop up a message and ran my user app. It worked fine.
So I have a template to work with. So If any errors I get will be my own.
Thanks again for all the help.
|
|
|
|
|
Hi,
I starting a worker thread using a CwinThread object
In response to User info from a Dialog Box
After the thread a has retrieved the info what is the best way to notify the app/MainFame window
Save the main window object after creating it e.g CMainFrame were is CMainFrame
is the main CFrameWnd object and do a SendMessage to that object
Or save the Main Thread from CWinapp and PostMessage to that thread
Since the thread isn't really part of Dialog Window I guess can't do a CWnd::GetaParent
to get the main Cwnd object ???
I am just a MFC rookie so... any suggestion are welcome
|
|
|
|
|
MFC has a function called AfxGetMainWnd to get the main window object.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Does this work if you call it from code in a DLL loaded by an MFC app?
|
|
|
|
|
I dont know if you're question is refering to _Superman_ answer However in Win32 all DLL's are mapped into the same address space
so does that mean a process an only have one main window ?????
I guess I am internals rookie too as I work as a MainFrame programmer
|
|
|
|
|
Yes, this works on a process basis.
So you can call it from the EXE itself or any of its loaded DLLs.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hello
I have created a child window with the following
CMDIChildWnd::Create(NULL, "FrameName",WS_VISIBLE | WS_CHILD |
WS_MINIMIZEBOX | WS_MAXIMIZEBOX| WS_SYSMENU |WS_VSCROLL | WS_HSCROLL , CRect(0,0,50,50), this, NULL))
the window is created but when the window is maximized the minimize,restore and close buttons are not active
How do I make them active
Prithaa
|
|
|
|
|
in this algorithm i confuse with comparison with dictionary words?
modified on Monday, March 16, 2009 10:46 AM
|
|
|
|
|
lokesh143.surana wrote: I need help to implement Conflation Algorithm....?
Are you unsure about needing help?
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]
|
|
|
|
|
|
|
Hi to all,
I am creating a DirectShow filter, that will only read the RGB pixel (32 bit) from MPEG-2 input video source.
I am connecting it after MPEG-2 Video Decoder as follows,
MPEG-2 Video Decoder --> My Custom Filter --> Video Renderer
I am receiving video size from My Custom Filter is 720x480, but actual video size if 720x576.
Code within CheckInputType(const CMediaType *mtIn) & CheckTransform(const CMediaType *mtIn, const CMediaType *mtOut) functions looks as follows,
<br />
if (IsEqualGUID(*mtIn->Type(), MEDIATYPE_Video))<br />
if (IsEqualGUID(*mtIn->Subtype(), MEDIASUBTYPE_RGB32))<br />
{<br />
VIDEOINFOHEADER *pvi = (VIDEOINFOHEADER *)mtIn->Format();<br />
return (pvi->bmiHeader.biBitCount == 32);<br />
}<br />
Is there anything I have to change/add?
Even any solution with RGB 24 bit is also fine.
I appreciate any and all comments and suggestions.
Thanks & Regards,
Aniket A. Salunkhe
|
|
|
|
|
Hi! Did you use GraphEdit to see what inputs-outputs your filter gets?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Hi,
First I am conecting as MPEG-2 Video Decoder --> My Custom Filter --> Video Renderer & run the graph
Input Pin Properties of My Custom Filter
Major Type : Video
Sub Type : RGB32
Format : RGB 720x480, 32 bits
Output Pin Properties of My Custom Filter
Major Type : Video
Sub Type : RGB32
Format : RGB 720x480, 32 bits
And in output I get video cropped at bottom
---------------------------
Then I am conecting as MPEG-2 Video Decoder --> Video Renderer & run the graph
Input Pin Properties of Video Renderer
Major Type : Video
Sub Type : DXVA_ModeMPEG2_A
Format : NV12 704x576, 12 bits
Aspect Ration: 4x3
Interlace format: Interleaved Bob Only
proper video output
---------------------------
After that I am conecting as MPEG-2 Video Decoder --> My Custom Filter --> Video Renderer (again) & run the graph
Input Pin Properties of My Custom Filter
Major Type : Video
Sub Type : RGB32
Format : RGB 704x576, 32 bits
Output Pin Properties of My Custom Filter
Major Type : Video
Sub Type : RGB32
Format : RGB 704x576, 32 bits
And in output I get am getting proper video
|
|
|
|
|
Hmm, strange, and it's not just the height, if you check the width it also varies between 704 and 720. Try experimenting with a different filter to see how it behaves, for example try putting a color space converter filter between the renderer and the decompressor and see what formats that gets, maybe it can help finding out something...also try logging out what formats the mpg decompressor tries to feed your filter...currently i have no exact idea what the problem could be.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Thanks for reply.
Custom Filter with RGB24, a Color Space Converter filter gets added between custom filter & video renderer.
While with RGB32, it is directly connecting to video renderer.
I am using Elecard Video Decoder.
Code-o-mat wrote: experimenting with a different filter to see how it behaves
I tried with different video deocders, but i m getting more issues with other deocders, like inverted video, green video, etc
|
|
|
|
|
Hi All,
I'm savitri here. I'm doing FingerPrint project. In this project i want to store fingerprint in database and retrieve that fingerprint for comparision.I created one table called "Images" with 2 fields called ID(AutoNumber)and Image(OLE Object). While inserting fingerprint i'm writing SQL statement like this.
BYTE* buffer=new BYTE[1632];
buffer=m_RegTemplate.pbData;//m_RegTemplate is DATA_BLOB Type.
"INSERT INTO Images(Image) VALUES('"+buffer+"')";
I'm not getting how to retrieve the fingerprint from the database table. i want to save that retrieved fingerprint into m_RegTemplate.pbData for comparision.
Please tell me how to solve this problem and Give me some hints.
Thanks in Advance
Regards,
Savitri P
|
|
|
|
|
You posted your question only 1 hour ago. This is a forum, not a chat. If you can't wait, then go on rentacoder and pay somebody to do the job for you.
|
|
|
|
|
lol
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
what format is your image? If you're storing a bitmap file, you have to first insert the correct header information & then the raw data (i forget how many bytes the header is, but it's more than a few)
Might check out "serializable" interfaces too
|
|
|
|
|
Hi All,
It is fingerprint template. I'm using DATA_BLOB Data type to store the image from the device.I'm not getting how to retrieve the stored image from the database. When i'm trying to retrieve the image from record set.that format is recset.GetFieldValue("Image",buffer);//buffer is of CDBVariant type.I want to assign the buffer value to another BYTE* variable. But i'm not getting how to do this? So please give me any hints to solve this problem. I'm also searching the solution and trying for all the options.
Thanks in Advance.
Regards,
Savitri.
|
|
|
|
|
Hi,
I am using a message box API as :
MessageBox(NULL, bstrMessage, bstrTitle, MB_OK | MB_HELP | MB_ICONEXCLAMATION);
This work fine in english...
But in italian OS it is displaying "?" in the caption of "Help" button.
How do we change it to display a correct string in place of "?".?
|
|
|
|