Click here to Skip to main content
16,011,784 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SHGetSpecialFolderPath and NT4 Pin
Tomasz Sowinski15-Mar-02 3:41
Tomasz Sowinski15-Mar-02 3:41 
GeneralRe: SHGetSpecialFolderPath and NT4 Pin
Tomasz Sowinski15-Mar-02 3:44
Tomasz Sowinski15-Mar-02 3:44 
GeneralRe: SHGetSpecialFolderPath and NT4 Pin
jerry0davis15-Mar-02 4:32
jerry0davis15-Mar-02 4:32 
GeneralRe: SHGetSpecialFolderPath and NT4 Pin
Michael Dunn15-Mar-02 7:41
sitebuilderMichael Dunn15-Mar-02 7:41 
GeneralCreateEx Pin
Anthony988715-Mar-02 3:35
Anthony988715-Mar-02 3:35 
GeneralRe: CreateEx Pin
Tomasz Sowinski15-Mar-02 3:36
Tomasz Sowinski15-Mar-02 3:36 
GeneralRe: CreateEx Pin
Carlos Antollini15-Mar-02 3:39
Carlos Antollini15-Mar-02 3:39 
Questionwill this cause resource leak? Pin
lucy15-Mar-02 2:56
lucy15-Mar-02 2:56 
Thank you for reviewing my code. Please tell me whether this will cause any resource leak. Thank you a lot for your time and help! Rose | [Rose] Rose | [Rose]
void CMyView::OnDraw(CDC *pDC)
{
    CPen redBeaconPen;
    VERIFY(redBeaconPen.CreatePen(PS_SOLID, 1, RGB(255,0,0)));
    CPen * pOldPen = pDC->SelectObject(&redBeaconPen);
    pDC->SelectStockObject(HOLLOW_BRUSH);

    pDC->Ellipse(1, 1, 10, 10);

    pDC->SelectObject(pOldPen);
    // <== my concern is here, how should I delete redBeaconPen? Or windows will handle that for me in CPen's destructor?
}

AnswerRe: will this cause resource leak? Pin
Tomasz Sowinski15-Mar-02 2:53
Tomasz Sowinski15-Mar-02 2:53 
GeneralRe: will this cause resource leak? Pin
lucy15-Mar-02 3:17
lucy15-Mar-02 3:17 
GeneralA strange problem! Pin
Davidlou15-Mar-02 2:18
Davidlou15-Mar-02 2:18 
GeneralAvoid Moving a window Pin
parker_john15-Mar-02 2:17
parker_john15-Mar-02 2:17 
GeneralRe: Avoid Moving a window Pin
Tomasz Sowinski15-Mar-02 2:19
Tomasz Sowinski15-Mar-02 2:19 
GeneralRe: Avoid Moving a window Pin
Prem Kumar15-Mar-02 2:38
Prem Kumar15-Mar-02 2:38 
GeneralRe: Avoid Moving a window Pin
Tomasz Sowinski15-Mar-02 2:43
Tomasz Sowinski15-Mar-02 2:43 
GeneralRe: Avoid Moving a window Pin
Prem Kumar15-Mar-02 2:33
Prem Kumar15-Mar-02 2:33 
GeneralDrag and Resize ActiveX control in CView Pin
sanskypotov15-Mar-02 1:58
sanskypotov15-Mar-02 1:58 
Generalplease help me Pin
15-Mar-02 1:55
suss15-Mar-02 1:55 
GeneralRe: please help me Pin
Tomasz Sowinski15-Mar-02 2:08
Tomasz Sowinski15-Mar-02 2:08 
GeneralRe: please help me Pin
Tim Smith15-Mar-02 2:10
Tim Smith15-Mar-02 2:10 
GeneralRe: please help me Pin
Tomasz Sowinski15-Mar-02 2:14
Tomasz Sowinski15-Mar-02 2:14 
GeneralRe: please help me Pin
Tim Smith15-Mar-02 3:14
Tim Smith15-Mar-02 3:14 
GeneralRe: please help me Pin
Christian Graus15-Mar-02 10:30
protectorChristian Graus15-Mar-02 10:30 
GeneralRGB to HSB Conversion.. Pin
Neha15-Mar-02 1:12
Neha15-Mar-02 1:12 
GeneralRe: RGB to HSB Conversion.. Pin
Tomasz Sowinski15-Mar-02 1:19
Tomasz Sowinski15-Mar-02 1:19 

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.