|
If i right understand your question
it can be done creating button using
CreateWindow(WC_BUTTON ...) and then setting its WndProc
to your own defined using
<br />
LONG DefWndProc=SetWindowLong(hWndButton,GWL_WNDPROC,lpfnYourOwnWndProc);<br />
you should also call default button process using pointer returned by SetWindowLong() at return of your own WndProc.
|
|
|
|
|
Aaaah, this is exactly what I needed.
Thanks alot!
|
|
|
|
|
An alternative to providing a new wndproc for the button, the button control sends a BN_CLICKED message through a WM_COMMAND to the parent window when the button is click. You'll be able to listen out for that. I find that easier (depending on the circumstances) than providing a new wndproc for the button.
Phil
|
|
|
|
|
Hi
I just upgraded from Visual C++ 6 to .NET, and I can't find an option to set the paths for includes and libs, where is it gone? I need to include the boost regex directory into my project.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
It's hidden a little bit.
Go to the Tools/Options.
Here in a tree on the left go to Projects and you'll see VC++ Directories.
You're in then!
hope this helps
|
|
|
|
|
Ah, this was really a tricky one.
Thanks a lot!
modified 12-Sep-18 21:01pm.
|
|
|
|
|
hello iv been trying all day to register the login details for my irc client that i coded with winsock in vc++,here's the code im executing it all compiles nicley but it just wont register with irc, please help
CString m_User;
CString m_Nick;
CString m_Channel;
CString m_Pass;
m_Pass = " secretpass ";
m_Nick = " chris";
m_User = " chris na www.baka-baka.com:chris shread";
m_Channel = " projectx ";
CString PassCommand = "PASS" + m_Pass + "\r\n";
CString NickCommand = "NICK" + m_Nick + "\r\n";
CString UserCommand = "USER" + m_User + "\r\n";
CString JoinCommand = "JOIN" + m_Channel + "\r\n";
send(Socket,PassCommand,strlen(PassCommand),0);
send(Socket,NickCommand,strlen(NickCommand),0);
send(Socket,UserCommand,strlen(UserCommand),0);
send(Socket,JoinCommand,strlen(JoinCommand),0);
it replys saying i have to register b4 i can join??
well iv tried registering as u can c but no joy
thank you all!
|
|
|
|
|
Could someone tell me how to do a memory dump in XP. Tried the old DOS method, but it's not supported.
Thanks, Paul
|
|
|
|
|
|
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
|
|
|
|