Source code name:News in the lower right corner of QQ
Source code Author:Deng xuebin)
Development Environment:Visual Studio 2005
Source code description:Win32 (SDK) development, self-painting implementation, supports a variety of skin styles. No other interface library is required.
The disadvantage in the United States is that the line spacing cannot be adjusted. In the GDI operation, there is no ready-made function to be adjusted. You need to calculate it by yourself, so this is left for you to complete.
// Set the skin (Bitmap resource name, title bar text color) bool cnewswindow: setskin (lpctstr lpskinbitmapname, colorref captioncolor = 0x000000); // create a window bool cnewswindow :: create (maid, int nwidth = 250, int nheight = 180); bool cnewswindow: Create (maid, lptstr lpwindowname, int nwidth, int nheight ); // set the news title, content, and link bool cnewswindow: setnews (maid, lptstr lpnewstitle, lptstr lpnewscontent, lptstr lpnewsurl); // display window void cnewswindow: Show (); // set as the main window. After the main window is destroyed, the message loop void cnewswindow: setmainwindow (bool bmainwindow = true) will exit. // you can disable the function automatically. If the function is true, after clicking the link, the window automatically closes void cnewswindow: setautoclose (bool bautoclose = true );
Download source code:Mininews.zip