|
I need some new eyes on this one, it's driving me mad
I am trying to use Bob Mottram's classes.
Everything compiles from the download
http://prdownloads.sourceforge.net/rodney/facedetect.zip?download[^]
But when I imported the files into my project I receive
Fatal Error C1010
unexpected end of file while looking for precompiled header directive
classimage.cpp<br />
C:\Backup2\carl2\classimage.cpp(573) : fatal error C1010: unexpected end of file while looking for precompiled header directive<br />
I have OpenCV hooked up correctly and imported all the files neccesary, I believe any ideas? Thanks
Later, JoeSox www.joeswammi.com www.humanaiproject.org
|
|
|
|
|
|
Michael Dunn wrote:
See the FAQ
Thanks Michael! That worked, of course. You helped stop me from chasing my tail! I miss the easy details sometimes.
But It gave me these 2 warnings
classimage.cpp<br />
Generating Code...<br />
Linking...<br />
Creating library Release/carl2.lib and object Release/carl2.exp<br />
carl2.exp : warning LNK4070: /OUT:facedetect.exe directive in .EXP differs from output filename "Release/carl2.exe"; ignoring directive<br />
Release/carl2.exe : warning LNK4086: entrypoint "_WinMainCRTStartup" is not __stdcall with 12 bytes of arguments; image may not run
What does this mean to you? I think I know what the first means but the second?
Later, JoeSox www.joeswammi.com www.humanaiproject.org
|
|
|
|
|
Well, I took out a .def file that was originally made for the exporting of the functions since it was originally a .dll,
; facedetect.def : Declares the module parameters for the DLL.<br />
<br />
LIBRARY "facedetect"<br />
DESCRIPTION 'facedetect Windows Dynamic Link Library'<br />
<br />
EXPORTS<br />
RCobj_InitFaceDetect<br />
RCobj_detectfaces<br />
RCobj_getObject<br />
RCobj_setBorder<br />
RCobj_detectfeatures<br />
RCobj_trackface
that got rid of the warnings but now the main app's dialogbox doesn't appear upon execution, hhmmm.
Later, JoeSox www.joeswammi.com www.humanaiproject.org
|
|
|
|
|
|
please include"stdafx.h" in source file and header file,
or turn using precompilerd header off in program setting.
if you turn on using precompiled header, vc will compile the source code
beginning at stdafx.h
hope this helps to you.
dupengfei
|
|
|
|
|
Hi All,
Is there any way we can check if a certain directory has been modified????
thanks
Dilshad
|
|
|
|
|
|
Another solution is FindCloseChangeNotification() and FindFirstChangeNotification().
Kuphryn
|
|
|
|
|
Thank you Micheal and Kuphryn for your help. The code works perfectly.
Thanks
|
|
|
|
|
I have a problem with CBitmaps. I want to copy one bitmap into another, which wouldn’t be a problem if I didn’t use multithreading. My situation is this:
I made a program which calculates the Mandelbrot fractal. I have a bitmap in which the picture is saved and which is used to make it display in the window. The function calculating the fractal creates a temporary bitmap and after it has finished, I want to copy the temporary image to the main image which is used to display but I receive either an assertion error or the bitmap becomes blank (white).
The problem only occurs when I run the function in a separate thread but if I don’t use multithreading, all works fine…
I tried a lot of things (for example using the BitBlt-function or working with pointers to the bitmaps) but none really helps. The weird thing is, that even if I get the assertion error, the program displays the bitmap correctly (only on some comps!). I gave it to a friend to test it (he has the same OS as me, Win2000 Professional) but it didn’t show the image (only a white window). It also seems to work correctly under WinXP.
I’m running out of ideas, so please give me some suggestions what to do
|
|
|
|
|
I don't know the exact deatils but you might want to try pDC->SelectObject(&bm); It may need a device context to do what you want it to do. Threads share memory space within a process, so I don't see how that would affect it.
|
|
|
|
|
hi!
When you saved the temp file , I think you didnot make the properly bitmap header which is a struct "BITMAPINFO". so it displayed blank picture.
good luck
dupengfei
|
|
|
|
|
I presume, you are having problems with multi-threading. 'A thread is supposed to access only those objects which it has created'. If you are trying to copy the new bitmap from the processing thread( not the main thread ) to the Bitmap object created by your main thread, then you have a problem. A workaround would be, to use user-defined windows messages after you are finished with your processing, and thereby notifying your main thread, to copy the newly created bitmap to the original one.
Hope this helps!!!
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
I thought of what you mentioned but I found another way to get the program nearly working as I want. I use the PeekMessage-function in the calculation function. This works properly but if you click in the menu, the calculation will stop until you leave it. But I'm statisfied how it works now.
And of course thanks to all who posted suggestions
|
|
|
|
|
Hi all,
i have a DTP control. i want to enter hours, and minutes and not show the seconds at all..... how can i do that?
thanks in advanced
Yaron
|
|
|
|
|
|
Hi,
I have a tree view control in a dialog-based app (non-MFC) and I want to use VK_RETURN and VK_ESCAPE to send the TVM_ENDEDITLABELNOW message to end label editing. This is fairly difficult, because the dialog traps all key messages (I think).
There is an article on MSDN that covers the basics of how to solve this here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;130691
Unfortunately I'm relatively new to coding C++, and I don't know how to go about implementing the advice given in that article.
From the article:
"To work around this problem, subclass the edit control in response to the TVN_BEGINLABELEDIT notification that is sent by the tree view control when the tree view is about to start label editing for an item. To obtain the edit control's window handle, send the tree view control a TVM_GETEDITCONTROL message.
The subclass procedure should handle the WM_GETDLGCODE message by returning DLGC_WANTALLKEYS. This allows the tree view's subclass procedure to handle ESC and ENTER keystrokes."
Could someone explain to me how to subclass the tree view control in this way to get this working, or point me to some examples (non-MFC)?
Many thanks to anyone who can help,
KB
|
|
|
|
|
Take a look at the SetWindowLong function in the Microsoft SDK documentation. This function will allow you to set a new wndproc (GWL_WNDPROC) which is what is meant by subclassing. When you change the wndproc all messages will come to your new wndproc...messages you do not handle should be sent to the original wndproc. You should probably be able to find actual example code by searching msdn as well as information regarding subclassing...there is an article called 'Safe subclassing in Win32' that may get you started
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/msdn_subclas3.asp
|
|
|
|
|
I want to develop a WLL. For that i need Word Developers Kit. It seems like it no longer available from Microsoft Site/Press... Can any one please help me to get the kit ( The files need to develop a WLL)...
As Word 97 cannot support the COM Add-Ins, i need to develop a WLL. I want my AddIn to work with Word 97 also.
Can u please help me?
Thanx in advance...
Mahesh
|
|
|
|
|
hello
I have writen a winsock client in visual c++,my aim is to connect to a irc channel so i can chat using my own irc client.
before i can join a channel i must register with the irc server,i understand to do this i must first send the following commands (USER & NICK)both theese commands take parameters and i dont know how to write them to the server.my winsock send(); & recv(); functions are working corectly so i must be sending the login data incorrectly.
if any 1 could help me with this subject i would apreciate it.
CString login1;
login1 = "USER chris";
send(Socket,login1,strlen(login1),0);
CString login2;
login2 = "NICK thes3cr3t1";
send(Socket,login2,strlen(login2),0);
here is how im trying to send the login data i have no idia if it is correct i have read the irc rfc and i think im sending the correct data also im unsure of how to seperate the command USER from the Parameter chris.
ahh well thanks
thes3cr3t:(1
|
|
|
|
|
This is how I do it:
CString NickCommand = "NICK " + m_Nick + "\r\n";
CString UserCommand = "USER " + m_Nick + " 0 * :MN\r\n";
Send(NickCommand, NickCommand.GetLength());
Send(UserCommand, UserCommand.GetLength());
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
thank you for your fast response,i have edited your code to suit my app and its definatley getting better,however now i am reciving an error message saying im not giving enough parameters for NICK
CString m_Nick;
CString NickCommand = "NICK " + m_Nick + "\r\n";
CString UserCommand = "USER " + m_Nick + " 0 * :MN\r\n";
send(Socket,NickCommand,strlen(NickCommand),0);
send(Socket,UserCommand,strlen(UserCommand),0);
any further assistance with this would be great thank you!;)
|
|
|
|
|
Where does the error occur? What line? Also make sure m_Nick is not empty, this would make no sense.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
your right thank you very much,just as i got a e-mail notifying me that u left another message in the forum i was editing my last post to inform you that i have sorted the problem.and yes as you said m_Nick was empty,sorry for that little inconvinience my mistake.
you have been a great help!
regards chris
|
|
|
|