Hi there I've learned c# for 3 years and now I want to write code for windows with c++ like RAT and key logger and generally for windows . But I don't know where should i start learning and I don't know what should I learn to . I searched in udemy for c++ programming tutorial but it just has about basic tools programming like oop or array and etc ...
Programming Windows with MFC, Second Edition (1999)
https://www.amazon.com/gp/product/1572316950/
There has been a lot of changes to the Win32 API structure since Petzold's book was published, you will have to tweak some of the example code to get them to compile.
For me that was a good learning experience, trying to figure out what was outdated and needed to be fixed.
@Grey Wolf, I looked at the lesson you linked, and it is lacking a lot of details. It says to download another tutorial's source, but when you try the link is deader than a dodo.
FurryGuy, I'm not overly surprised that the links for downloading source for sample applications are broken...they keep moving things around. :0)
As to 'it is lacking a lot of details'...it's a suggestion for additional resources to help someone getting started, I personally didn't like Forger's (at least the last time I looked at it), I'm a Petzold man...but I'm not sure how much I would recommend it for a beginner over something maybe less detailed but more 'modern'.
Petzold and his C/C++ approach to Win32 is really outdated. 1998 is the publication date of his 5th edition, his 6th edition is all C# and windows 8.
Your link probably worked great when Visual Studio 2010 was the latest MS offering.
MS has newer tutorials, primarily geared to using Visual Studio 2017.
The "Create a C++ console app" tutorial is more in-depth, including how to debug within the IDE.
https://docs.microsoft.com/en-us/cpp/get-started/tutorial-console-cpp?view=vs-2017
For those who want to know how to create a GUI app there is
https://docs.microsoft.com/en-us/cpp/windows/walkthrough-creating-windows-desktop-applications-cpp?view=vs-2017
There are other walkthrough tutorials available (VS2017):
Walkthrough: Creating a Standard C++ Program
https://docs.microsoft.com/en-us/cpp/windows/walkthrough-creating-a-standard-cpp-program-cpp?view=vs-2017
(which includes how to compile a native C++ program on the command line using VS 2017)
https://docs.microsoft.com/en-us/cpp/build/walkthrough-compiling-a-native-cpp-program-on-the-command-line?view=vs-2017
Walkthrough: Creating and Using a Static Library (C++)
https://docs.microsoft.com/en-us/cpp/windows/walkthrough-creating-and-using-a-static-library-cpp?view=vs-2017
Walkthrough: Create and use your own Dynamic Link Library (C++)
https://docs.microsoft.com/en-us/cpp/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp?view=vs-2017
And let's not forget the importance of debugging:
https://devblogs.microsoft.com/visualstudio/introduction-to-debugging/
FYI, VS2109 is already available in release candidate status, full release expected April 2nd.
"Get Started with Win32 and C++" is where you get to from following current links on Microsoft dev and doc sites, they obviously think it is still relevant.
The reason I point people to Microsoft docs site is because of all the good walkthrough/tutorials that they can discover there...but you have to start somewhere.
When I say I'm a Petzold man...I learned from the 3rd edition when it was new...and still bought the 4th, 5th, and 6th editions.
there is code chaper by chaper on Github to download revised code.
there was even C++ version of the code on github somewhere but can't find it any more.
I've looked, a lot, and like you I can't find any updated code for the 5th edition either. That puts recommending the 5th edition for beginning Windows programmers not high on my list.
If it were easily found I would withdraw my conditional non-approval of his 5th Edition for beginners to learn using C/C++ for Windows programming.
+=======+
Updated code for the 5th edition has been found! Updated to work with Visual Studio 2017 Community. A few moments ago tested one of the updated examples that crashed and burned on execution with the original 1998 code and now after being revised it works! (The environment strings example in chapter 9)
https://github.com/recombinant/petzold-pw5e
When using the revised and updated code I recommend 100,000% learning how to program Windows desktop apps using Petzold's book.
Most of the code worked without the need for updating, just a few aspects of how Petzold used the Win32 API caused VS2017 (and 2015) heartburn.
I even wrote a rant about the problem the original 5th edition code had with VS2015. Though I was completely wrong about the problem was using malloc/calloc.
http://www.cplusplus.com/forum/lounge/186935/