Why is this button being resized to 28x28? (!)
Below is the code used to create the composition window and the
add/delete buttons.
The resource assignment in the .rc file:
BITMAP IDW_TOADD ".\\bitmaps\\addo.bmp"
The image size of "addo.bmp" is 20x20.
The main window is created with:
Global.Fcf = FCF_STANDARD | FCF_NOBYTEALIGN;
Frame = WinCreateStdWindow(HWND_DESKTOP,
0, &Global.Fcf,
"PMMailCompWin", title,
0, NULLHANDLE, IDW_COMPWIN,
&Client1);
CompWinFrame = WinSubclassWindow(Frame, CompWinFrameProc);
The button is created with:
WinCreateWindow(Client, WC_BUTTON, "",
WS_VISIBLE | BS_USERBUTTON | BS_NOPOINTERFOCUS,
0, 0, 0, 0, Client, HWND_TOP, IDW_TOADD,
NULL, NULL);
The button is sized and positioned with:
swp_options = SWP_SHOW | SWP_MOVE | SWP_SIZE;
WinSetWindowPos(Button, HWND_TOP, y_centerline - (20+20+3), EFLine+1,
20, 20, swp_options);
The width and height are *explicitly* set to 20x20. That is the size of
the bitmap image of the buttons.
The return codes indicate success all around.
I have tried setting with width and height values in WinCreateWindow(),
and removing SWP_SIZE in WinSetWindowPos(). No luck there.
--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)