📄 loadpic.h
字号:
// Load picture module - By Goofy [FreeStylers]
// version 1.1a (2002/07/14)
#ifndef __LOADPIC_H__
#define __LOADPIC_H__
#include "stdafx.h"
// What is new version 1.1a
// The repaint picture is fixed / rewritten, it is smaller and faster now. (BeginPaint)
// The Memory leaks are gone. (GetDC)
// Freeing of pictures after picture 1 are now working without giving errors.
// This will help you with showing .GIF .JPG files in
// your program (even transparant GIFS are supported).
// Make sure you included this .h file to your program
// and that you added loadpic.cpp and loadpic.h to your project.
//
// It took me like 6 hours to find some tutorial on simple showing
// GIF / JPG files from resource in your window.
// After a long search I founded a source that helped me a lot
// building this one. I mean is this simple or what
// only a Addpicture procedure to add pictures
// a RepaintPictures (that needs to be called on WM_paint)
// and a Remove Pictures (on close window)
// ##### Important Note #####
// You must use in the .RC file the
// section: BINARY for adding your pictures.
// ##### Important Note #####
void AddPicture(TCHAR* szFileName,int PositionX,int PositionY);
void AddPicture(int ResourceHandle,int PositionX,int PositionY);
// Procedure: AddPicture
//
// HWND hWnd = The handle of the window where you want to add a picture
// int ResourceHandle = The RecourceId (u can use the ALIAS u gave in .RC file)
// example: ID_BLAH
// int PositionX = The X coordinate on the window where the picture should popup :)
// int PositionY = The Y coordinate .....bleh
void RepaintPictures(HWND hWnd, HDC dcPictureRepaint);
// Procedure: RepaintPictures
//
// HWND hWnd = The window handle that needs to be repainted.
// example: when it gets Msg WM_PAINT
// HDC dcPictureRepaint = The current device context which is used for painting.
// I could use GetDC in the module, but it will slow down the
// process a lot, it is better to use on a WM_PAINT in your
// main program BeginPaint to recieve the right DC, ofcourse
// use also Endpaint to release the painting process.
//
// NOTE: BeginPaint (can only used 1 time for 1 WM_PAINT message)
// This is why I did not used it in my module.
void RemovePictures();
// Procedure: RepaintPictures
//
// HWND hWnd = The window handle frees all the pictures (on that window)
// example: when it gets Msg WM_CLOSE
// Well just rip the shit and add it to your project.
// I hope you all enjoy the simply source I wrote
// Why are all the ppl always crying it can't be done easier: here is the Prove.
// That's All Fox
// Goofy...
// [FreeStylers]
// goofy@fss-style.com
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -