Win32 - Pixmap & buttons

BlitzMax Forums/MaxGUI Module/Win32 - Pixmap & buttons

degac(Posted 2009) [#1]
There is a reason why we can't have on BUTTON_PUSH|BUTTON_CHECK pixmaps?

I checked the source code (win32MaxGUIex)
Method SetPixmap(pixmap:TPixmap,pFlags)
		
		Local tmpWindowStyle = GetWindowLongW(_hwnd,GWL_STYLE)
		
		If (pFlags & GADGETPIXMAP_ICON)' And ((_style = BUTTON_PUSH) Or (_style = BUTTON_CANCEL)) Then
			
			'To remove an image from a button, a handle-list of -1 should be passed.
			If _buttonImageList[0] >= 0 Then ImageList_Destroy(_buttonImageList[0]);_buttonImageList[0] = -1
			If pixmap Then _buttonImageList[0] = BuildImageList( pixmap )
			
			If (pFlags & GADGETPIXMAP_NOTEXT) Then
				_buttonImageList[5] = BUTTON_IMAGELIST_ALIGN_CENTER
			Else
				_buttonImageList[5] = BUTTON_IMAGELIST_ALIGN_LEFT
			EndIf


and commented the following line before AND

If (pFlags & GADGETPIXMAP_ICON)' And ((_style = BUTTON_PUSH) Or (_style = BUTTON_CANCEL)) Then



Here an image



jsp(Posted 2009) [#2]
IIRC it was not available because it was not cross platform.