首页
社区
课程
招聘
[ZT]Region Creator 1.1
发表于: 2006-6-5 15:16 3621

[ZT]Region Creator 1.1

2006-6-5 15:16
3621
FROM:www.sunhine2k.de

Region Creator 1.1:
------------------------------
This little application scans an image for a chosen transparent color and save this region to file.

Features:
---------
* supports bmp, png, gif and jpeg files
* choose transparent color from image or type in the RGB values
* preview of region
* Save region as a rgn file or as a C source file

New in Version 1.1:
-------------------
* Option to save the region to a C source file. So you don't have to include a rgn file to your resource
  or as a file anymore. Just include the generated header file to your project and call one single function
  on startup. That's it :-)
* Possibility to use another layout by specifying the argument -newGUI on the RegionCreator commandline.
  Well that's not a real feature but I was playing around how to subclass a window and that's the result.
* Some little bugfixes and 'beauty changes'
* More errorhandling

What to do with the saved rgn file?
-----------------------------------
Part 1 : Rgn File
=================
  In the subdirectory 'RgnFileTest' you find an example how to use the rgn file in your application.

  The CSunRegion class makes it easy to use:
  1. create an instance of this class, you have just to supply your window handle:
        for example: CSunRegion* region = new CSunRegion(hwnd);
  
  2a) to load your rgn file and assign it to your window, use the LoadFromFile function:
        for example: region->LoadFromFile("myregion.rgn");
  
  2b) if you have included your rgn file as a resource, use the LoadFromRes function:
        for example: region->LoadFromRes(MAKEINTRESOURCE(IDR_CUSTOM1), "CUSTOM");

  3. after you have called one of these two Load functions, you can immediately delete your class instance if you want.
        for example: delete region;

Part 2 : Source file
====================
  In the subdirectory 'SourceTest'you find an example how to use the source file in your application.

  Just copy the generated header & source file to your project directory and include them, eg:
  #include "filename.h"

  After the window you want the region apply to was created, call the function CreateRgnWindow:
  Syntax of function : bool CreateRgnWindow(HWND hwnd, BOOL bTitlebar, BOOL bResize);
  where
        hwnd : handle to the window
        bTitlebar : true means the titlebar is shown as normal; false means that the titlebar will not be shown.
        bResize : true means that the window will be resized to the dimension of the region. So when you give
                  false here, you're responsible that your window is big enough for the region.

Known bugs/limitations:
-----------------------
* the imagebox is sometimes not drawn correctly, especially the scrollbars. (but there are there!)
* scanning large images can take much time
* saving the regiob as a source file is just acceptable for really small regions! Use better rgn files!

Thanks to :
-----------
* James Brown for his fantastic tutorials for Win32 and System Coding. Visit his site: www.catch22.net
* Michael Chourdakis for his article @ codeguru how to load JPG/GIF/BMP files to a HBITMAP object using plain API
  -> http://www.codeguru.com/cpp/g-m/bitmap/article.php/c4935/

Copyright etc. :
----------------
Feel free to use my source or parts of it. But please mention my name and/or my website. Also I would be
happy if you drop me a line when you use something from my stuff so I can see where my source lands :-)

Sunshine, 2005

http://www.sunshine2k.de/

[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)

收藏
免费 1
支持
分享
最新回复 (8)
雪    币: 2506
活跃值: (1030)
能力值: (RANK:990 )
在线值:
发帖
回帖
粉丝
2
这个工具不错,对写程序界面有帮助。感谢林版!
2006-6-5 15:59
0
雪    币: 247
活跃值: (18)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
感谢哦
2006-6-5 17:51
0
雪    币: 0
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
4
那里可以下载啊?
2006-6-6 15:48
0
雪    币: 97697
活跃值: (200834)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
5
最初由 muicx 发布
那里可以下载啊?


http://www.sunshine2k.de/
2006-6-6 16:42
0
雪    币: 247
活跃值: (18)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
感谢林版,已经发布汉化补丁了
2006-6-6 18:00
0
雪    币: 264
活跃值: (30)
能力值: ( LV12,RANK:250 )
在线值:
发帖
回帖
粉丝
7
我去了网站但是下载不了,斑竹能上传一份吗?期待您的回复。谢谢
2006-6-9 19:00
0
雪    币: 97697
活跃值: (200834)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
8
最初由 kangaroo 发布
我去了网站但是下载不了,斑竹能上传一份吗?期待您的回复。谢谢


http://www.sunshine2k.de/

可以下载.你再试试.
2006-6-9 20:08
0
雪    币: 264
活跃值: (30)
能力值: ( LV12,RANK:250 )
在线值:
发帖
回帖
粉丝
9

http://www.sunshine2k.de/

可以下载.你再试试.

不知道为什么我这边下载不了,其实论坛中还有一个朋友上传了一个和你差不多的工具,可惜的是该工具没有相应的cpp和h文件
http://bbs.pediy.com/showthread.php?s=&threadid=25170
2006-6-10 17:32
0
游客
登录 | 注册 方可回帖
返回
//