Hi, How to change to text color and the background color of a combo box
Mac
Posts
-
how to change the text color and background color of a combo box -
va_list, va_startHi, I created a funtion DbgMsg(LPSTR lpszMsg, .............) that will allow me to handle to print debugging strings to the debugger. The problem is that it will crushed if a null pointer is passed. I would like to check for the number of args passed. Is it possible to do it. This is how I will call the DbgMsg() DbgMsg("Testing 123 %d %s", x, szTemp) DbgMsg(LPSTR lpszMsg, .............) { char szTemp[256]; va_start(args, szString); wvsprintf(szTemp, szString, args); OutputDebugString(szTemp); va_end(args); }
-
include a gif file as a resource fileHi, Can I include a gif file in the resource file. If yes, how can I load it, loadbitmap(...)??? Also, how to retreive the palette used in order to support 256 colors. Thanks
-
how to change the font for a labelHi, I tried to change the font of a label using SelectObject but it don't work. The SelectObject works if I use TextOut(...). But for label or edit, I use SetDlgItemText(..). So how to change the fonts used for edit/label or is there anything that I did it wrongly. Thanks. code that I use ======================== HDC hDC = GetDC(); hFont = CreateFont(....) HFONT hFontOld = (HFONT)SelectObject( hDC, hFont); TextOut(....) DelectObject(hFont) SelectObject(hDC, hFontOld);
-
Creating circular background image with transparencyHi, I am trying to display a circular image as a background with the transparency. The programs work if I use a mask image with the following operations //draw BitBlt(hDC, m_X, m_Y, m_X + m_Width, m_Y + m_Height, m_Image, 0, 0, SRCINVERT); BitBlt(hDC, m_X, m_Y, m_X + m_Width, m_Y + m_Height, m_Mask, 0, 0, SRCAND); BitBlt(hDC, m_X, m_Y, m_X + m_Width, m_Y + m_Height, m_Image, 0, 0, SRCINVERT); where m_Image is the DC of the window and m_Mask is the mask dc. I try to do the same thing using Region but it don't works. Can anyone helps? Thanks The code is like //create th region HBRUSH hBrush = CreateSolidBrush(RGB(0,0,0)); HBRUSH hOldBrush; hRegion = CreateEllipticRgn(xPos, yPos, xPos + Width - 1, yPos + Height - 1); hOldBrush = (HBRUSH)SelectObject(hDC, hBrush); if(FillRgn(hDC, hRegion, hBrush)) DeleteObject(hBrush); m_bUseRegion = true; SelectObject(hDC, hOldBrush); DeleteObject(hBrush); // create the mask dc m_Mask = CreateCompatibleDC(hDC); SelectObject(m_Mask, hRegion); DeleteObject(hRegion); //draw BitBlt(hDC, m_X, m_Y, m_X + m_Width, m_Y + m_Height, m_Image, 0, 0, SRCINVERT); BitBlt(hDC, m_X, m_Y, m_X + m_Width, m_Y + m_Height, m_Mask, 0, 0, SRCAND); BitBlt(hDC, m_X, m_Y, m_X + m_Width, m_Y + m_Height, m_Image, 0, 0, SRCINVERT);