Good point, must I say that MSDN help sucks then ComboBoxEx Control Styles ComboBoxEx controls support only the following ComboBox styles: CBS_SIMPLE CBS_DROPDOWN CBS_DROPDOWNLIST WS_CHILD No where does it say it supports in the CreateWindow() CBS_AUTOHSCROLL Anyways, fixed, thanks
ClickHeRe
Posts
-
Comboboxex Editbox limit -
Comboboxex Editbox limitSorry to say this but neither works As a test I wrote the following to see the limits and set the good styles: HWND hwndcombo = FindWindowEx( this->m_Hwnd, NULL, NULL, NULL ); SetWindowLong( hwndcombo, GWL_STYLE, GetWindowLong( hwndcombo, GWL_STYLE ) | CBS_AUTOHSCROLL ); int n = SendMessage( this->m_EditHwnd, EM_GETLIMITTEXT, 0, 0 ); char data[500]; wsprintf( data, "Limit : %d", n ); mIRCError( data ); SendMessage( hwndcombo, CB_LIMITTEXT, (WPARAM) 0, (LPARAM) 0 ); n = SendMessage( this->m_EditHwnd, EM_GETLIMITTEXT, 0, 0 ); wsprintf( data, "Limit : %d", n ); mIRCError( data ); Edit_LimitText( this->m_EditHwnd, 0 ); n = SendMessage( this->m_EditHwnd, EM_GETLIMITTEXT, 0, 0 ); wsprintf( data, "Limit : %d", n ); mIRCError( data ); The combo child of the comboboxex has its CBS_AUTOHSCROLL style, and the edit has its EM_AUTOHSCROLL style and the output of the above gives : Limit : 30000 Limit : 30000 Limit : 2147483646 So the initial limit is already 30000 chars so it isn't the culprit. I still hear the little ding sound when I get to the end of the editbox notifying I can't put more there even if the AutoHScroll style is there and the limit is way beyond the actual control limit.
-
Comboboxex Editbox limitHello, Does anyone know how to have the character limit on the editbox of a comboboxex control removed or set very big ? Thanks David
-
BUTTON Box ControlHello, I am using a box control (BUTTON) and I would like to know if there is a way of getting the position where the box line and text is drawn. I would like to use this information to place controls inside the box to make sure they don't touch the line border or text part. Thanks
-
GDI+ PNG TransparencyUsing GDI+ to load a PNG 32 bit image with transparency. I draw the image on a static control and I get this result : Image with this code in the WM_PAINT :
case WM_PAINT: { if ( this->m_pImage != NULL ) { PAINTSTRUCT ps; HDC hdc; hdc = BeginPaint( this->m_Hwnd, &ps ); RECT rect; GetClientRect( this->m_Hwnd, &rect ); Graphics grphx( hdc ); grphx.DrawImage( this->m_pImage, 0, 0, rect.right - rect.left, rect.bottom - rect.top ); EndPaint( this->m_Hwnd, &ps ); bParsed = TRUE; return 0L; } } break;
I'd like to have the transparent part stay grey. Thanks David -
DrawIconEx & ILD_BLEND50Any thoughts on a function or way to achieve the same sort of end result and that would work on any machine. I want to grey the disabled icon and possibly apply this technique on other cases on the menus like normal unselected icons making the selected one the only true color icon. Thanks David
-
DrawIconEx & ILD_BLEND50I tried with plain RGB(255,0,0) and the icon only dimmed, never turned redish
-
DrawIconEx & ILD_BLEND50Hello, I'm building owner drawn menus and when using this ImageList_DrawEx( himl, this->m_nIcon, lpdis->hDC, x, y, 0, 0, CLR_NONE, RGB(128,128,128), ILD_BLEND50 ); The icon color is only dimed, but not blended with the specified RGB color and yes my icon has a mask as I can draw it with ILD_MASK and I see a black icon painted which is the mask. Piece of MSDN help --------------------- rgbFg Foreground color of the image. This parameter can be an application-defined RGB value or one of the following values: CLR_NONE - No blend color. The image is blended with the color of the destination device context. CLR_DEFAULT - Default foreground color. The image is drawn using the system highlight color as the foreground color. fStyle Drawing style and, optionally, the overlay image. For information about specifying an overlay image index, see the comments section at the end of this topic. This parameter can be a combination of an overlay image index and one or more of the following values: ILD_BLEND25, ILD_FOCUS Draws the image, blending 25 percent with the blend color specified by rgbFg. This value has no effect if the image list does not contain a mask. ILD_BLEND50, ILD_SELECTED, ILD_BLEND Draws the image, blending 50 percent with the blend color specified by rgbFg. This value has no effect if the image list does not contain a mask. ------------------- Note: Using Win32 API, no MFC Thanks David -- modified at 17:25 Sunday 16th October, 2005
-
Custom WM_NOTIFY NMHDR codeThe problem is that this is a DLL to add support for UI making in another application. The ID of the control is not know to the DLL window procedures, it just parses the correct messages and sends the info back to the calling app through callback support. Anyways, thanks for the information, I'll see what I can do to get around the problem, I think I have a solution that will work even though there is a conflict.
-
Custom WM_NOTIFY NMHDR codeI understand, but then how to define a custom WM_???? that doesn't conflict with other conrols using WM_USER or WM_APP as I see common controls also use WM_USER + N do define their custom messages.
-
Custom WM_NOTIFY NMHDR codeI'm currently building a custom control from scratch in Win32 API (no MFC). It's a divder control (something like the MFC splitter). I defined some notification events to be sent to the parent window like DVN_DELETEDPANE, but I don't know what number to give to the constant. It will be put in NMHDR.code to be sent with WM_NOTIFY to the parent control. I want to know how to define them so they don't conflict with existing values for other controls. Thank You David
-
Owner Drawn MenuOk here is the image so you can see the problems related to the questions: Image 1- I use this to draw the Check in the menu DrawFrameControl(lpdis->hDC,&rcCheck,DFC_MENU,DFCS_MENUCHECK | DFCS_TRANSPARENT); But as you can see I can't have the background color the same as the side bar. 2 - The Submenu Arrow is always drawn, is there a way to prevent windows from drawing it and I would use the same function as the check mark for that too. 3 - The menu Window has a sort of border which match's windows colors, Is there a way that I could paint this border another color to make the menu look like a flat one. Using Win32 API, no MFC ATL or WTL. Using Visual Studio .NET 2003, Windows XP SP1 If you need more code or other stuff to help, just say so. Thank You for any replies David :-D