To add a button to the large toolbar in POV-Win 3.1g:
This applies only to the official version - I have not tried any others
Remember to mark your changes with a special sequence of characters in comments so that you can find your changes later (esp. in code)(I use "Pabs changed - ...") or simply bookmark them, the former is better so that if you distribute your files others can see your changes. Remember not to delete anything - just comment it out.
BITMAP DISCARDABLE "
<your directory>"
")#define
<symbol> <number>" to pvengine.rh and ensure the header for the rc script has this symbol and it has the right value (type "=
<number>" after the symbol in the ID property of the image in MSVC++)BMP_TOOL
" by conventions used (apparently) by the POV-TeamCM_
" by conventions used (apparently) by the POV-TeamCM_FIRST
maintools
( toolbarStruct []
) and insert a line as follows before the line that is "0, 0, 0x00, NULL
""blah blah"
and be shorter than the button's image= HWND create_toolbar (HWND hwndParent)
)ImageList_Create
and add 1 to the 5th (last) parameter16
in an newly downloaded copy of the POV-Win 3.1g source )BOOL handle_main_command (WPARAM wParam, LPARAM lParam)
) find " switch (LOWORD (wParam))
"and add " case
< symbol defined in #4> :
<yourbody>" below it
For the auxiliary tool-bar:
Do everything the same except (note that this may not work - I have not tried it)
In 1 use images of size 14×14
In 7 use auxtools
instead
In 8 find the 2nd call to ImageList_Create
(5th parameter should be 8 in unchanged source.)
Install the Win32 GIMP on a locked down system:
This is no longer needed since the new GIMP 1.2.3 installer puts all files in the same directory.
This was a quick hack to allow you to install the GIMP on locked down systems.
Locked down systems might include university computer lab machines/work machines/etc
If you can create a directory under C:\Program Files\Common Files\ (or its equivalent) and create files in that dir you don't need this.
You will need a hex editor (try frhed), or a text editor that preserves all bytes (notepad WILL NOT - it removes 0x00 bytes) (try thegun)
Your chosen editor will need to be able to find and (preferably) replace data
Kill Crosswinds ad window on page loadup
For sites that popup ads from http://www.popuptraffic.com/ this will probably also work if you replace 'jW4Los9wh' with 'cool'
You should use some popup window remover as such a method is more general
Just insert the following script into the <head> of each html file on your site:
<script language="JavaScript" type="text/javascript"> <!-- w = window.open('', 'jW4Los9wh'); w.close(); // --> </script>
Also if you have a free V3 redirect url (eg http://pabs.zip.to) you can add the following to the end of your favicon url and it will prevent the advert from loading and on CSS capable browsers it will hide the link back to V3.
"><style type='text/css'><!--h1 { display: none !important;}--></style><!--
Also wrt geocities use the following
<script type="text/javascript"> window.document = new Object(); // prevents geocities from having access to the document to write ads window.onerror = null; // avoids errors </script>
HOWTO convert CF_DIB to a .bmp file
Simple - paste into M$ Paint & do File\Save
The harder way:
Note: all WORDs & DWORDs are little-endian
According to the M$DN CF_DIB consists of a BITMAPINFO structure followed by the bits
According to the M$DN .bmp files consist of a BITMAPFILEHEADER structure, a BITMAPINFOHEADER structure, a RGBQUAD structure array and a Color-index array
The BITMAPINFO structure consists of a BITMAPINFOHEADER structure plus a RGBQUAD structure array so they are almost equivalent
.'. We only need to add a BITMAPFILEHEADER structure
from the M$DN:
struct BITMAPFILEHEADER{ WORD bfType; //Specifies the file type. It must be BM. DWORD bfSize; //Specifies the size, in bytes, of the bitmap file. WORD bfReserved1; //Reserved; must be zero. WORD bfReserved2; //Reserved; must be zero. DWORD bfOffBits; //Specifies the offset, in bytes, from the BITMAPFILEHEADER structure to the bitmap bits. }
bfType = 'BM' = 0x4d42
bfSize = sizeof(BITMAPFILEHEADER)+sizeof(CF_DIB)= 14+sizeof(CF_DIB)
bfReserved1 = 0x0000
bfReserved2 = 0x0000
bfOffBits = sizeof(BITMAPFILEHEADER)+sizeof(BITMAPINFOHEADER)+sizeof(RGBQUAD array)
this is a bit harder
sizeof(BITMAPFILEHEADER) is 14 always for the current structure
but sizeof(BITMAPINFOHEADER) can differ depending on the version since BITMAPINFOHEADER can be replaced with newer versions, which are longer, but the size is always specified in the 1st DWORD:
struct BITMAPINFOHEADER{ DWORD biSize; //Specifies the number of bytes required by the structure. ... struct BITMAPV4HEADER{ DWORD bV4Size; //Specifies the number of bytes required by the structure. Applications should use this member to determine which bitmap information header structure is being used. ... struct BITMAPV5HEADER{ DWORD bV5Size; //Specifies the number of bytes required by the structure. Applications should use this member to determine which bitmap information header structure is being used. ...
So this means we need to read the first DWORD after the BITMAPFILEHEADER or the dword at offset 14 (<DWORD:14>)
and sizeof(RGBQUAD array) differs depending on how many colours are present
the BITMAP<xxx>HEADER:
struct BITMAPINFOHEADER{ DWORD biSize; LONG biWidth; LONG biHeight; WORD biPlanes; WORD biBitCount; ...
An extract from the BITMAPINFOHEADER documentation:
biBitCount specifies the number of bits per pixel. The biBitCount member of the BITMAPINFOHEADER structure determines the number of bits that define each pixel and the maximum number of colors in the bitmap. This member must be one of the following values.
1 The bitmap is monochrome, and the bmiColors member contains two entries...
4 The bitmap has a maximum of 16 colors, and the bmiColors member contains up to 16 entries...
8 The bitmap has a maximum of 256 colors, and the bmiColors member contains up to 256 entries...
16 The bitmap has a maximum of 2^16 colors...
24 The bitmap has a maximum of 2^24 colors...
32 The bitmap has a maximum of 2^32 colors...
so the number of RGBQUADs in the array = 2^biBitCount = 2^<DWORD:28>
and each RGBQUAD is 4 bytes so sizeof(RGBQUAD array) = 4*2^<DWORD:28>
.'. bfOffBits = 14 + <DWORD:14> + 4*2^<DWORD:28>
To recap:
If you have M$ Paint you can probably get away with entering anything instead of calculating the correct bfOffBits and then using File\Save As to calculate the correct bfOffBits, but that would be pointless since you could have just pasted into M$ Paint.
More tutorials in the process...
Go to top