Something has changed in the program code and I do not see it. Two
buttons are placed next to a dropdown listbox to allow adding or
deleting items selected in the listbox. The button sizes are set to 20x20,
yet when displayed the buttons and assigned images have been resized to 28x28.
Why is this button being resized to 28x28? (!)
Below is the code used to create the composition window and the
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, NULLHANDLE, IDW_COMPWIN,
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,
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)