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
A

Amin Abdi

@Amin Abdi
About
Posts
17
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Export to excel
    A Amin Abdi

    hi all i want to export some data to excel and using excel tools within my MFC program. (like draw border and etc) is there any guide for this? thanks

    C / C++ / MFC c++ tools tutorial question

  • set print area
    A Amin Abdi

    hi all how can i set print area in a SDI project? indeed i want to see specific view of my document in print preview(on any page setup). regards

    C / C++ / MFC question workspace

  • Load Bitmap from file to doc
    A Amin Abdi

    THANX :rose:

    C / C++ / MFC graphics help

  • Load Bitmap from file to doc
    A Amin Abdi

    i put it on a function and call the function in C..View::OnDraw.

    C / C++ / MFC graphics help

  • Load Bitmap from file to doc
    A Amin Abdi

    I change my codes : remove that statement and add these:

    CClientDC dcMem;
    dcMem.SelectObject(&Bitmap);
    pDC->BitBlt(1280, nYposChange-1995, 390, 230, &dcMem, 0, 0, SRCCOPY);
    

    but it show a print screen of window and print nothing. WHY and how can i fix it?

    C / C++ / MFC graphics help

  • Minimize Mainframe in SDI
    A Amin Abdi

    do u want only minimize your document? user can restore it?

    C / C++ / MFC question

  • Load Bitmap from file to doc
    A Amin Abdi

    ;P because of MapMode

    modified on Wednesday, August 26, 2009 4:45 AM

    C / C++ / MFC graphics help

  • Load Bitmap from file to doc
    A Amin Abdi

    dcMem.SelectObject(&Bitmap);
    pDC->BitBlt(1280, nYposChange-1765, 390, -230, &dcMem, 0, 0, SRCCOPY);

    fixed but still nothing :(

    C / C++ / MFC graphics help

  • Load Bitmap from file to doc
    A Amin Abdi

    sry forget it the code is in C..View and pdc defined there. program is SDI

    C / C++ / MFC graphics help

  • Minimize Mainframe in SDI
    A Amin Abdi

    you can hide and show it with

    SW_HIDE

    and

    SW_SHOW

    C / C++ / MFC question

  • Load Bitmap from file to doc
    A Amin Abdi

    HBITMAP hBitmap = 0;
    hBitmap = (HBITMAP)LoadImage( NULL,
    pDoc->cInfo.strContractBrand, //file location
    IMAGE_BITMAP,
    0,
    0,
    LR_LOADFROMFILE | LR_DEFAULTSIZE);
    CBitmap Bitmap;
    Bitmap.Attach( hBitmap );

    BITMAP BitmapInfo = { 0 };
    Bitmap.GetBitmap( &BitmapInfo );
    
    DWORD BitmapImageSize = BitmapInfo.bmHeight \*
    	BitmapInfo.bmWidth \*
    	( BitmapInfo.bmBitsPixel / 8 );
    
    BYTE\* pBitmapData = new BYTE\[ BitmapImageSize \];
    ZeroMemory( pBitmapData, BitmapImageSize );
    
    Bitmap.SetBitmapBits(BitmapImageSize, pBitmapData);
    
    Bitmap.SetBitmapBits( BitmapImageSize, pBitmapData );
    
    pDC->SelectObject(&Bitmap);
    pDC->BitBlt(1280, -1765, 390,  -230, pDC, // pDC : a CDC pointer to document (SDI Program)
    0, 0, SRCCOPY);
    
    delete pBitmapData;
    pBitmapData = 0;
    

    purpose: i want to load a bitmap from file and insert in document. the file location is in C..Doc and PDoc is pointer to its document. MapMode is MM_LOMETRIC. problem: it dosen't show anything.:mad::confused: i don't see anything in desired coordinate and print blank page. notice: i find these codes in web and didn't work with CBitmap class. even didn't use bitmap in my programs.

    C / C++ / MFC graphics help

  • insert bitmap on SDI
    A Amin Abdi

    1. in a function within c..view class 2. no it doesn't work even at (0, 0)

    C / C++ / MFC graphics tutorial

  • insert bitmap on SDI
    A Amin Abdi

    CBitmap Bitmap;
    CDC dcMem;
    HBITMAP hBitmap = 0;
    hBitmap = (HBITMAP)LoadImage( AfxGetInstanceHandle(),
    strLocationOfBitmap,
    IMAGE_BITMAP,
    0,
    0,
    LR_LOADFROMFILE | LR_DEFAULTSIZE);

    dcMem.CreateCompatibleDC(pDC);
    Bitmap.CreateCompatibleBitmap(pDC, 390, -230);
    
    Bitmap.Attach( hBitmap );
    dcMem.SelectObject(&Bitmap);
    pDC->BitBlt(1280, -1765, 390,  -230, &dcMem, 0, 0, SRCCOPY);/\*pDC : on draw defined dc\*/
    

    i used many codes delete and add some function to them. i never used GUI in VC++. :(

    C / C++ / MFC graphics tutorial

  • insert bitmap on SDI
    A Amin Abdi

    hello everyone i want to load a bitmap from file and insert in specific coordinate of my SDI program. but when i write codes and run program it shows nothing. ;P could i have a guide to using and inserting bitmap in my SDI. thanx

    C / C++ / MFC graphics tutorial

  • paper orientation
    A Amin Abdi

    hello; i want to remove page orientation from print setup and make its default to landscape; how can i do it?; thanx;

    C / C++ / MFC question workspace

  • Print and Print Preview and relation with document view
    A Amin Abdi

    Hello guys i have a problem with my SDI program i show some data in my document and when i want see print preview or print data which shown in doc i see data in small font. how can i fix this problem regards.

    C / C++ / MFC help question

  • Print
    A Amin Abdi

    how can i print input data in dialog based projects??

    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