Converting from CString to other string types
This example demonstrates how to convert from a CString to the other string types. // convert_from_cstring.cpp // compile with: /clr /link comsuppw.lib #include <iostream> #include...
View ArticleConverting from basic_string to other strings
This example demonstrates how to convert from a basic_string to the other string types // convert_from_basic_string.cpp // compile with: /clr /link comsuppw.lib #include <iostream> #include...
View ArticleConverting from System::String to other string types
This example demonstrates how to convert from a System.String to the other string types // convert_from_system_string.cpp // compile with: /clr /link comsuppw.lib #include <iostream> #include...
View ArticleWhat are TCHAR, WCHAR, LPSTR, LPWSTR, LPCTSTR (etc.)?
Many C++ Windows programmers get confused over what bizarre identifiers like TCHAR,LPCTSTR are. In this article, I would attempt by best to clear out the fog....
View ArticleHow to Get the List of Drives in a Computer?
To support drives on a computer, the Win32 library provides the GetLogicalDrives() function of Microsoft Window. Its syntax is: DWORD WINAPI GetLogicalDrives(void); When this method is called, it...
View ArticleCreating and Using a Dynamic Link Library
In this walkthrough, you will create a dynamic link library (DLL) containing useful routines that can be used by other applications. Using DLLs is a great way to reuse code. Rather than re-implementing...
View ArticleCreating and Using a Static Library
In this walkthrough, you will create a static library (LIB) containing useful routines that can be used by other applications. Using static libraries is a great way to reuse code. Rather than...
View ArticleMouse Events and Keyboard Events in MFC
This program illustrates An MFC App/Win Program that draws characters, responds to mouse — implemention file (msgnew.cpp) // msgnew.cpp // An MFC, App/Windows program that processes mouse and keyboard...
View ArticleBitblt() and Stretchblt() in MFC
A Windows application that illustrates Bitblt() and Stretchblt() /* bitmap1.h header file */ #define IDM_SHOW 1 /* menu item ID numbers */ #define IDM_QUIT 10 LRESULT...
View ArticleHow to register a service and start it programatically from C++?
As we all know to register a service from cmd .Now let’s check how to achieve this from a cpp program to register the service and start.Here we used the same regsvr32 for registering it.The following...
View Article