|
zhangguoliming wrote: handle = FindFirstFile(path, &fd);
better use Direct Api PathFileExist
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
hi all, can you all please provide me some information about the functions CapCreateCameraWindow() for capturing the image obtained from the web cam..
|
|
|
|
|
I've never heard of CapCreateCameraWindow() but if you're referring to Video for Windows there's
lots of info here: Windows Multimedia Video Capture[^]
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
Hi --
I'm building a GUI application in Visual C++ 2003 using the drag-and-drop Windows Forms toolbox. Does anyone know a way to build docked windows/forms (tabbed windows) into an application? I'm aiming for a look similar to the docked windows in, for example, visual studio.
Is there are way to do this within the drag-and-drop windows forms builder in visual c++, or do I have to write a lot of windows forms code?
Thanks in advance!
webHamlet
|
|
|
|
|
In MFC applications when creating my own defines - how do i know what values to use so that they wouldn`t conflict with predefined ones(I want to use them for event hadling)? The same thing about creating controls dinamicaly - how to make sure that the ID that I want to assign isn`t already in use by another control? Maybe there`s a good article about this? Any suggestions?
|
|
|
|
|
you can use <a href="http://msdn2.microsoft.com/en-us/library/ms644947.aspx">RegisterWindowMessage()</a>[<a href="http://msdn2.microsoft.com/en-us/library/ms644947.aspx" target="_blank" title="New Window">^</a>] to ensure getting a unique number for your message
|
|
|
|
|
Mr. Joseph Newcomer explains how to accomplish this in an article on his web site.
link[^]
|
|
|
|
|
For MFC, this old technical note still applies: TN020: ID Naming and Numbering Conventions[^]
For Windows messages (WM_xxx), the RegisterWindowMessage Function[^] can be used
but it's only necessary for (and recommended to only be used for) unique system-wide messages, for
communicating between applications/processes. For user defined messages in a single application,
see WM_USER Notification[^] and WM_APP Notification[^].
[edit]
How To Define Private Messages for Application Use[^]
[/edit]
Also remember that control IDs need only be unique per-window. They don't necessarily need to be
unique throughout a process.
Mark
-- modified at 14:46 Sunday 25th February, 2007
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
Forgot this one - has handy info about the automagically Visual Studio generated IDs...
TN035: Using Multiple Resource Files and Header Files with Visual C++[^]
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
Hi,
I need to create a map file in visual studio 2005 , but i can't find
the way to do so.
I know how to do it in visual studio 6.0 (thanks to Wouter Dhondtwith his great article
http://www.codeproject.com/debug/mapfile.asp[^]
can anybody help me ?
With best regards,
Eli
|
|
|
|
|
Project properties->Linker->Debugging->Generate map file
|
|
|
|
|
In project properties navigate to Configuration Properties/Linker/Debugging. There you'll
find the MAP file settings.
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
Hi,
well, i am starting c++ programmer. I want to practice to get better programmer, but i don't really know how. Before some minutes i was trying to write own small program, but then i understood, i don't know really how to do it, compiler generated different errors for my code, that had 10-15 lines. I am asking to experienced, skilled c++ programmers, how to practice best c++ programming, also i need to understand structure of header file, which i don't understand now.
Best regards,
reyyy
|
|
|
|
|
Many members on here will suggest you buy a book. But I would suggest you find a free step-by-step C++ tutorial online.
As for your problem with the header files. In C/C++ there are two types of files. The .cpp holds the code, the .h is what joins all the files together. When you add a header file, you are really telling the compiler which code file you want to use.
|
|
|
|
|
I was reading online c++ book, but now i need practical part.
|
|
|
|
|
Personally, I still feel learning C++ should start with a quick intro to C since understanding Win32 comes much easier. Also, if you end up using CString, it's nice to have some background in printf (or it's many variations).
Don't spend too much time on C but getting a book like Schildt's "C++ The Complete Reference (Fourth Edition)" will help in the basics since he spends a good portion of the book on C, later C++, and he describes the differences and what is common to both. He avoids Windows programming so it avoids those distractions that cause the Attention Deficit that occurs when touching a page in MSDN or Wikipedia with all those shiny links ("What did I come here for again?")
For the first month or two, you should reserve yourself to command line programs (as painful as that sounds) so you focus on the language(s) and some basic libraries before jumping into the deep end of the pool. You should start with C programs without header files so it's not a major source of distraction for the first few days. Once C becomes boring, then you know your ready to learn OOP and C++.
The single most important thing to learn, is that C or C++ cannot let you use something like a function, variable, class, library, etc... if you haven't told the compiler about it. This is easier to conceptualize in a program written in a single .c or .cpp file since it's basically being parsed top down. As your programs become bigger, you will be forced to use function declarations. This is when the concept of using header files starts to make sense and becomes appreciated. This is also usually where you realize you are ready to start learning OOP and C++.
Resist the temptation to jump into GUI based programs for about another month or at least until you built some polymorphic classes. This is where you will likely start contemplating STL, GUI based programming, COM, etc...
Thats just my opinion, but I hope that helps you piece together a roadmap of where you are going.
Good Luck.
|
|
|
|
|
I agree with WalderMort buy buy a book but maybe this site will helpfuls for you www.cplusplus.com
|
|
|
|
|
First of all:
Do NOT learn C. C supports things you should never do in C++, and learning C first will encourage you to do C++ badly
Next - buy a book and work through it. I used 'teach yourself C++ in 24 hours', it was an excellent beginner book.
Finally, if you write a program of 15 lines and it doesn't compile and you don't know why, post it here, we'd be happy to offer advice on it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I read this Article about "Overlay"
I was trying to create an overlay which works above 3D applications (eg. games like Halo, Warcraft 3, etc), but I couldn't set the right parameters to direct draw.
can anyone rewrite the overlay class, that it is working always over all other applications?
|
|
|
|
|
Sorry, I don't pay for code. I only do it as hobby.
but does anyone have a free information, how to do this?
|
|
|
|
|
Get a life, dude.
Let us not listen to those who think we ought to be angry with our enemies, and who believe this to be great and manly. Nothing is so praiseworthy, nothing so clearly shows a great and noble soul, as clemency and readiness to forgive.
- Marcus Tullius Cicero
|
|
|
|
|
So your hobby is trying to get others to rewrite code for you, for free?
Cool
-- modified at 14:35 Tuesday 27th February, 2007
Added a 'B'
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Mark Salsbery wrote: So your hoby is trying to get others to rewrite code for you, for free?
Well asked!
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Hello,
I have a dialog application and I would like start hided that why I used in OnWindowPosChanging(WINDOWPOS* lpwndpos) :
void CGMMWS1800Dlg::OnWindowPosChanging(WINDOWPOS* lpwndpos)
{
if(!m_visible)
lpwndpos->flags &= ~SWP_SHOWWINDOW;
CDialog::OnWindowPosChanging(lpwndpos);
// TODO: Add your message handler code here
}
My problem is that this function is never called. In IniDialog I change the size with a MoveWindow().
I do not understand why this function is never called.
Waht can I check to fix my problem.
Thank you for help me
AutreChien
|
|
|
|
|
If you want the window to be created hidden then how about not creating it with the WS_VISIBLE
style?
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|