Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Mac

@Mac
About
Posts
5
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to change the text color and background color of a combo box
    M Mac

    Hi, How to change to text color and the background color of a combo box

    C / C++ / MFC tutorial

  • va_list, va_start
    M Mac

    Hi, 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); }

    C / C++ / MFC testing debugging beta-testing help

  • include a gif file as a resource file
    M Mac

    Hi, 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

    C / C++ / MFC question tutorial learning

  • how to change the font for a label
    M Mac

    Hi, 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);

    C / C++ / MFC tutorial

  • Creating circular background image with transparency
    M Mac

    Hi, 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);

    C / C++ / MFC question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups