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
Amin Abdi
Posts
-
Export to excel -
set print areahi 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
-
Load Bitmap from file to docTHANX :rose:
-
Load Bitmap from file to doci put it on a function and call the function in C..View::OnDraw.
-
Load Bitmap from file to docI 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?
-
Minimize Mainframe in SDIdo u want only minimize your document? user can restore it?
-
Load Bitmap from file to doc;P because of MapMode
modified on Wednesday, August 26, 2009 4:45 AM
-
Load Bitmap from file to docdcMem.SelectObject(&Bitmap);
pDC->BitBlt(1280, nYposChange-1765, 390, -230, &dcMem, 0, 0, SRCCOPY);fixed but still nothing :(
-
Load Bitmap from file to docsry forget it the code is in C..View and pdc defined there. program is SDI
-
Minimize Mainframe in SDIyou can hide and show it with
SW_HIDE
and
SW_SHOW
-
Load Bitmap from file to docHBITMAP 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.
-
insert bitmap on SDI1. in a function within c..view class 2. no it doesn't work even at (0, 0)
-
insert bitmap on SDICBitmap 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++. :(
-
insert bitmap on SDIhello 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
-
paper orientationhello; i want to remove page orientation from print setup and make its default to landscape; how can i do it?; thanx;
-
Print and Print Preview and relation with document viewHello 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.
-
Printhow can i print input data in dialog based projects??