Click here to Skip to main content
15,908,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Preventing unauthorised access to an ISAPI extension Pin
divbanjoe2-Jan-02 18:22
divbanjoe2-Jan-02 18:22 
GeneralRe: Preventing unauthorised access to an ISAPI extension Pin
Derek Waters2-Jan-02 18:31
Derek Waters2-Jan-02 18:31 
GeneralGetDeviceCaps and Printer Pin
Braulio Dez1-Jan-02 22:44
Braulio Dez1-Jan-02 22:44 
GeneralRe: GetDeviceCaps and Printer Pin
Ernest Laurentin2-Jan-02 4:25
Ernest Laurentin2-Jan-02 4:25 
GeneralTrying to rotate 90º EMF Pin
Braulio Dez1-Jan-02 20:58
Braulio Dez1-Jan-02 20:58 
QuestionIn eVC how to make FullScreen in PocketPC ? Pin
subang1-Jan-02 20:51
subang1-Jan-02 20:51 
AnswerRe: In eVC how to make FullScreen in PocketPC ? Pin
NormDroid1-Jan-02 21:15
professionalNormDroid1-Jan-02 21:15 
GeneralMaking an Image Transparent Pin
clemence1-Jan-02 19:52
clemence1-Jan-02 19:52 
The Following code works fine except for the black edges that are displayed in the Transparent Image. How can I get rid of that???
COLORREF m_crWhite = RGB(255,255,255);
COLORREF m_crBlack = RGB(0,0,0);
//pdc is the Screen Dc
COLORREF crOldBack = pDC->SetBkColor(m_crWhite);
COLORREF crOldText = pDC->SetTextColor(m_crBlack);
COLORREF crOldBkMode = pDC->SetBkMode(TRANSPARENT);
//The Following 2 lines gives me image information.
int nImageWidth = m_pImageInfoData->bmpInfo.bmiHeader.biWidth;
int nImageHeight = m_pImageInfoData->bmpInfo.bmiHeader.biHeight;
CBitmap BmpMask;
BmpMask.CreateBitmap( nImageWidth, nImageHeight, 1, 1, NULL);
CDC hdcSrc, hdcDst;
hdcSrc.CreateCompatibleDC(pDC);
hdcDst.CreateCompatibleDC(pDC);
CBitmap BmpSource;
BmpSource.CreateCompatibleBitmap(pDC,nImageWidth,nImageHeight);
CBitmap* hbmSrcT = (CBitmap*) hdcSrc.SelectObject(&BmpSource);
CBitmap* hbmDstT = (CBitmap*) hdcDst.SelectObject(&BmpMask);
StretchDIBits(hdcSrc.GetSafeHdc(),
0, 0, nImageWidth, nImageHeight,
0, 0, nImageWidth, nImageHeight,
m_pImageInfoData->pszData,
&(m_pImageInfoData->bmpInfo),
DIB_RGB_COLORS, SRCCOPY);
COLORREF clrSaveBk = hdcSrc.SetBkColor(crColor);
hdcDst.BitBlt(0,0,nImageWidth, nImageHeight, &hdcSrc,0,0,SRCCOPY);
COLORREF clrSaveDstText = hdcSrc.SetTextColor(RGB(255,255,255));
hdcSrc.SetBkColor(RGB(0,0,0));
hdcSrc.BitBlt(0,0,nImageWidth, nImageHeight, &hdcDst,0,0,SRCAND);
hdcDst.SetTextColor(clrSaveDstText) ;
hdcSrc.SetBkColor(clrSaveBk);
pDC->StretchBlt( nLeft, nTop, nWidth, nHeight, &hdcDst,
0, 0, nImageWidth,nImageHeight,SRCAND);

pDC->StretchBlt( nLeft, nTop, nWidth, nHeight, &hdcSrc,
0, 0,nImageWidth,nImageHeight,SRCPAINT);


hdcSrc.SelectObject(hbmSrcT);
hdcDst.SelectObject(hbmDstT);
hdcSrc.DeleteDC();
hdcDst.DeleteDC();
pDC->SetBkMode(crOldBkMode);
pDC->SetTextColor(crOldText);
pDC->SetBkColor(crOldBack);
GeneralRe: Making an Image Transparent Pin
Christian Graus2-Jan-02 0:19
protectorChristian Graus2-Jan-02 0:19 
GeneralOwner drawn button flicker hell Pin
Christian Graus1-Jan-02 18:19
protectorChristian Graus1-Jan-02 18:19 
GeneralRe: Owner drawn button flicker hell Pin
Rick Dangerous2-Jan-02 0:30
Rick Dangerous2-Jan-02 0:30 
GeneralRe: Owner drawn button flicker hell Pin
Christian Graus2-Jan-02 0:52
protectorChristian Graus2-Jan-02 0:52 
Generalmalloc() question Pin
1-Jan-02 17:26
suss1-Jan-02 17:26 
GeneralRe: malloc() question Pin
Philip Patrick1-Jan-02 19:14
professionalPhilip Patrick1-Jan-02 19:14 
GeneralRe: malloc() question Pin
1-Jan-02 19:15
suss1-Jan-02 19:15 
GeneralRe: malloc() question Pin
Philip Patrick1-Jan-02 19:23
professionalPhilip Patrick1-Jan-02 19:23 
Generalremove popup menu arrow Pin
1-Jan-02 15:35
suss1-Jan-02 15:35 
GeneralProblem with Multithreads Pin
Mustafa Demirhan1-Jan-02 6:06
Mustafa Demirhan1-Jan-02 6:06 
GeneralRe: Problem with Multithreads Pin
Mustafa Demirhan1-Jan-02 6:12
Mustafa Demirhan1-Jan-02 6:12 
GeneralRe: Problem with Multithreads Pin
1-Jan-02 6:32
suss1-Jan-02 6:32 
GeneralRe: Problem with Multithreads Pin
1-Jan-02 6:56
suss1-Jan-02 6:56 
GeneralRe: Problem with Multithreads Pin
Todd Smith1-Jan-02 7:35
Todd Smith1-Jan-02 7:35 
GeneralRe: Problem with Multithreads Pin
Mustafa Demirhan1-Jan-02 8:59
Mustafa Demirhan1-Jan-02 8:59 
GeneralRe: Problem with Multithreads Pin
Michael Dunn1-Jan-02 9:30
sitebuilderMichael Dunn1-Jan-02 9:30 
GeneralRe: Problem with Multithreads Pin
Mustafa Demirhan2-Jan-02 0:33
Mustafa Demirhan2-Jan-02 0:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.