📄 iconinfo.java
字号:
/*
* ICONINFO.java
*
* Created on 14. M鋜z 2007, 12:44
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package org.xvolks.jnative.misc.basicStructures;
import org.xvolks.jnative.exceptions.NativeException;
import org.xvolks.jnative.pointers.Pointer;
import org.xvolks.jnative.pointers.memory.MemoryBlockFactory;
import org.xvolks.jnative.util.Gdi32;
/**
*
* @author osthop
*/
public class ICONINFO extends AbstractBasicData<ICONINFO> {
/*
BOOL fIcon;
DWORD xHotspot;
DWORD yHotspot;
HBITMAP hbmMask;
HBITMAP hbmColor;
*/
/** Creates a new instance of ICONINFO */
public ICONINFO() {
super(null);
try {
createPointer();
} catch (NativeException e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
public void dispose() throws NativeException, IllegalAccessException {
Gdi32.DeleteObject(getBitmapMask());
Gdi32.DeleteObject(getBitmapColor());
getPointer().dispose();
}
public boolean isIcon() throws NativeException {
return (pointer.getAsByte(0) != 0);
}
public int getBitmapMask() throws NativeException {
return pointer.getAsInt(12);
}
public int getBitmapColor() throws NativeException {
return pointer.getAsInt(16);
}
public Pointer createPointer() throws NativeException {
pointer = new Pointer(MemoryBlockFactory.createMemoryBlock(getSizeOf()));
return pointer;
}
public int getSizeOf() {
return 20;
}
public ICONINFO getValueFromPointer() {
return this;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -