Click here to Skip to main content
15,897,187 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to use GetPrivateProfileSection Pin
Prakash Nadar3-Jan-06 21:31
Prakash Nadar3-Jan-06 21:31 
GeneralRe: How to use GetPrivateProfileSection Pin
<color>Aljechin 3-Jan-06 22:01
<color>Aljechin 3-Jan-06 22:01 
GeneralRe: How to use GetPrivateProfileSection Pin
Prakash Nadar3-Jan-06 22:03
Prakash Nadar3-Jan-06 22:03 
GeneralRe: How to use GetPrivateProfileSection Pin
<color>Aljechin 3-Jan-06 22:11
<color>Aljechin 3-Jan-06 22:11 
GeneralRe: How to use GetPrivateProfileSection Pin
Owner drawn3-Jan-06 23:30
Owner drawn3-Jan-06 23:30 
GeneralRe: How to use GetPrivateProfileSection Pin
Prakash Nadar3-Jan-06 23:41
Prakash Nadar3-Jan-06 23:41 
GeneralRe: How to use GetPrivateProfileSection Pin
<color>Aljechin 4-Jan-06 0:35
<color>Aljechin 4-Jan-06 0:35 
AnswerRe: How to use GetPrivateProfileSection Pin
Owner drawn3-Jan-06 20:05
Owner drawn3-Jan-06 20:05 
GeneralRe: How to use GetPrivateProfileSection Pin
<color>Aljechin 3-Jan-06 20:10
<color>Aljechin 3-Jan-06 20:10 
GeneralRe: How to use GetPrivateProfileSection Pin
Misha21520-Nov-09 10:08
Misha21520-Nov-09 10:08 
QuestionAny Difference between vc++ and MFC? Pin
HaKing3-Jan-06 19:11
HaKing3-Jan-06 19:11 
AnswerRe: Any Difference between vc++ and MFC? Pin
Prakash Nadar3-Jan-06 19:15
Prakash Nadar3-Jan-06 19:15 
GeneralRe: Any Difference between vc++ and MFC? Pin
lastgen4-Jan-06 17:44
lastgen4-Jan-06 17:44 
GeneralRe: Any Difference between vc++ and MFC? Pin
Prakash Nadar4-Jan-06 20:52
Prakash Nadar4-Jan-06 20:52 
QuestionClear difference btwn Copy constructor and Asignment operator? Pin
HaKing3-Jan-06 19:09
HaKing3-Jan-06 19:09 
AnswerRe: Clear difference btwn Copy constructor and Asignment operator? Pin
Prakash Nadar3-Jan-06 19:20
Prakash Nadar3-Jan-06 19:20 
AnswerRe: Clear difference btwn Copy constructor and Asignment operator? Pin
Axter3-Jan-06 19:40
professionalAxter3-Jan-06 19:40 
QuestionQuestion: About VC-&gt;Project-&gt;Dependencies Pin
xpxl13-Jan-06 19:00
xpxl13-Jan-06 19:00 
Questionabout skin, caption button Pin
HOW WHAT3-Jan-06 18:10
HOW WHAT3-Jan-06 18:10 
Questionhow to display bitmap image Pin
zadlos3-Jan-06 18:02
zadlos3-Jan-06 18:02 
AnswerRe: how to display bitmap image Pin
Owner drawn3-Jan-06 18:10
Owner drawn3-Jan-06 18:10 
There are lots of articles in CP for that.

Here's a brief example from MSDN....

// This OnDraw() handler loads a bitmap from system resources, centers
// it in the view, and uses BitBlt to paint the bitmap bits.

void CMyView::OnDraw(CDC* pDC)
{
  CBlat2Doc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);

  // Load IDB_BITMAP1 from the resources.
  CBitmap bmp;
  if (bmp.LoadBitmap(IDB_BITMAP1))
  {
    // Get the size of the bitmap.
    BITMAP bmpInfo;
    bmp.GetBitmap(&bmpInfo);

    // Create an in-memory device context compatible with the
    // display device context that is used to paint.
    CDC dcMemory;
    dcMemory.CreateCompatibleDC(pDC);

    // Select the bitmap into the in-memory device context.
    CBitmap* pOldBitmap = dcMemory.SelectObject(&bmp);

    // Find a center point for the bitmap in the client area.
    CRect rect;
    GetClientRect(&rect);
    int nX = rect.left + (rect.Width() - bmpInfo.bmWidth) / 2;
    int nY = rect.top + (rect.Height() - bmpInfo.bmHeight) / 2;

    // Copy the bits from the in-memory device context to the on-
    // screen device context to do the painting. Use the computed center
    // point for the target offset.
    pDC->BitBlt(nX, nY, bmpInfo.bmWidth, bmpInfo.bmHeight, &dcMemory,
      0, 0, SRCCOPY);

    dcMemory.SelectObject(pOldBitmap);
  }
  else
    TRACE0("ERROR: Where is IDB_BITMAP1?\n");
}


As far as Zoom in and out are concerned I think you can use StretchBlt.

Jesus Loves You and Me Smile | :)
<marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord


GeneralRe: how to display bitmap image Pin
zadlos3-Jan-06 23:24
zadlos3-Jan-06 23:24 
QuestionHTML and C++ Pin
Deys3-Jan-06 17:32
Deys3-Jan-06 17:32 
AnswerRe: HTML and C++ Pin
S Douglas3-Jan-06 19:01
professionalS Douglas3-Jan-06 19:01 
QuestionSpanning monitors with PIX from XDK Pin
lastgen3-Jan-06 15:26
lastgen3-Jan-06 15:26 

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.