Click here to Skip to main content
16,010,394 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRegular Expressions - e-mail validation Pin
BlackDice1-Apr-04 9:27
BlackDice1-Apr-04 9:27 
GeneralRe: Regular Expressions - e-mail validation Pin
David Crow1-Apr-04 9:45
David Crow1-Apr-04 9:45 
GeneralRe: Regular Expressions - e-mail validation Pin
BlackDice1-Apr-04 10:14
BlackDice1-Apr-04 10:14 
GeneralCreating a DLL Pin
schnee2k31-Apr-04 9:25
schnee2k31-Apr-04 9:25 
GeneralRe: Creating a DLL Pin
Alexander M.,1-Apr-04 22:59
Alexander M.,1-Apr-04 22:59 
GeneralDrawing a transparent bitmap Pin
the one dono1-Apr-04 9:10
the one dono1-Apr-04 9:10 
GeneralRe: Drawing a transparent bitmap Pin
Ravi Bhavnani1-Apr-04 9:44
professionalRavi Bhavnani1-Apr-04 9:44 
GeneralRe: Drawing a transparent bitmap Pin
John R. Shaw1-Apr-04 9:51
John R. Shaw1-Apr-04 9:51 
Code copied from CExBitmap.cpp (codeproject article CExBitmap)
// Win 3.x and above
// Note: This technique may not necessarily work on printer devices.

// Create temporary Bitmaps
CBitmap bmpMask;
if( !bmpMask.CreateBitmap(
    bmSrc.bmWidth, bmSrc.bmHeight, 1, 1, NULL) )
{
    return FALSE;
}

CBitmap bmpTemp;
if( !bmpTemp.CreateCompatibleBitmap(
    pdcDest, bmSrc.bmWidth, bmSrc.bmHeight) )
{
    return FALSE;
}

// Create temporary DCs and select bitmaps into them
CWorkDC dcTemp(pdcDest, &bmpTemp);
CWorkDC dcMask(pdcDest, &bmpMask);

// Use temporary DC to reduce flicker
if( dcTemp.BitBlt(0, 0, bmSrc.bmWidth, bmSrc.bmHeight,
    pdcDest, xDest, yDest, SRCCOPY) )
{
    // If we made it here there should be no more possible problems

    // Create mask using crTransparent
    dcSrc.SetBkColor(crTrans);
    dcMask.BitBlt(0, 0, bmSrc.bmWidth, bmSrc.bmHeight,
        &dcSrc, 0,0, SRCCOPY);

    // Draw bitmap using mask
    dcTemp.BitBlt(0, 0, bmSrc.bmWidth, bmSrc.bmHeight,
        &dcSrc, 0, 0, SRCINVERT);
    dcTemp.BitBlt(0, 0, bmSrc.bmWidth, bmSrc.bmHeight,
        &dcMask, 0, 0, SRCAND);
    dcTemp.BitBlt(0, 0, bmSrc.bmWidth, bmSrc.bmHeight,
        &dcSrc, 0, 0, SRCINVERT);

    // Copy Temporary DC to Destination DC
    pdcDest->BitBlt(xDest, yDest, nWidth, hHeight,
        &dcTemp, 0, 0, SRCCOPY);
}

I hope this helps!


INTP
GeneralCFormView without dyncreate Pin
Adam Preble1-Apr-04 9:05
Adam Preble1-Apr-04 9:05 
GeneralAccess violations Pin
packetlos1-Apr-04 8:20
packetlos1-Apr-04 8:20 
GeneralRe: Access violations Pin
David Crow1-Apr-04 8:52
David Crow1-Apr-04 8:52 
GeneralRe: Access violations Pin
packetlos1-Apr-04 12:24
packetlos1-Apr-04 12:24 
GeneralRe: Access violations Pin
Neville Franks1-Apr-04 20:42
Neville Franks1-Apr-04 20:42 
GeneralThe riight question Pin
doctorpi1-Apr-04 7:59
doctorpi1-Apr-04 7:59 
GeneralRe: The riight question Pin
David Crow1-Apr-04 8:56
David Crow1-Apr-04 8:56 
GeneralRe: The riight question Pin
John R. Shaw1-Apr-04 12:35
John R. Shaw1-Apr-04 12:35 
GeneralRe: The right question Pin
Jeffrey Walton1-Apr-04 12:49
Jeffrey Walton1-Apr-04 12:49 
GeneralRe: The riight question Pin
gUrM33T1-Apr-04 16:34
gUrM33T1-Apr-04 16:34 
GeneralRe: The riight question Pin
doctorpi1-Apr-04 20:47
doctorpi1-Apr-04 20:47 
GeneralRe: The riight question Pin
doctorpi1-Apr-04 20:56
doctorpi1-Apr-04 20:56 
GeneralRe: Installer Package Problems Pin
mjmcinto1-Apr-04 7:53
mjmcinto1-Apr-04 7:53 
GeneralSoftware protection Pin
Wes Aday1-Apr-04 7:41
professionalWes Aday1-Apr-04 7:41 
GeneralRe: Software protection Pin
grigsoft1-Apr-04 8:27
grigsoft1-Apr-04 8:27 
GeneralRe: Software protection Pin
Wes Aday1-Apr-04 9:54
professionalWes Aday1-Apr-04 9:54 
GeneralDrawing DC Pin
ns1-Apr-04 7:34
ns1-Apr-04 7:34 

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.