Click here to Skip to main content
15,902,938 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionVisual Studio Just-In-Time Debugger Pin
Try26-Feb-07 3:12
Try26-Feb-07 3:12 
AnswerRe: Visual Studio Just-In-Time Debugger Pin
James R. Twine26-Feb-07 3:18
James R. Twine26-Feb-07 3:18 
AnswerRe: Visual Studio Just-In-Time Debugger Pin
Cedric Moonen26-Feb-07 3:19
Cedric Moonen26-Feb-07 3:19 
GeneralRe: Visual Studio Just-In-Time Debugger Pin
Try26-Feb-07 3:26
Try26-Feb-07 3:26 
GeneralRe: Visual Studio Just-In-Time Debugger Pin
James R. Twine26-Feb-07 4:14
James R. Twine26-Feb-07 4:14 
Questionobjective c Pin
deeps_cute26-Feb-07 2:46
deeps_cute26-Feb-07 2:46 
QuestionRe: objective c Pin
Maximilien26-Feb-07 3:37
Maximilien26-Feb-07 3:37 
Questionto display thumbnails on ListView Pin
vasu_sri26-Feb-07 1:22
vasu_sri26-Feb-07 1:22 
how can i display the bmp, jpg, png image files as a thumbnails on MyListView.

this is my code in ListView class:

HANDLE hFile;
hFile = CreateFile( "C:\\Documents and Settings\\B.Srinivas\\My Documents\\My Pictures\\SkinDlg.bmp",
GENERIC_READ,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL );

if( hFile == INVALID_HANDLE_VALUE )
{
MessageBox( "Invalid Handle", "ERROR", MB_ICONERROR);

}
else
{
// MessageBox( "File Opened successfully");
BYTE *Buffer;
DWORD p=SetFilePointer( hFile, 0x003, NULL, FILE_BEGIN );

Buffer = new BYTE [2359350];


//LPDWORD lpNumberOfBytesRead = NULL;
DWORD pp;
bitmap.bmType=0;

bitmap.bmWidth=1024;
bitmap.bmHeight=768;
bitmap.bmWidthBytes=1024;
bitmap.bmPlanes=1;
bitmap.bmBitsPixel=1;
bitmap.bmBits=(LPSTR)Buffer;

Bitmap image((WCHAR*)Buffer ,0);
Bitmap *bmPhoto = NULL;
CBitmap Bmp1;
Bmp1.SetBitmapBits(&bitmap,Buffer)

bmPhoto = new Bitmap( THUMBNAIL_WIDTH, THUMBNAIL_HEIGHT, PixelFormat24bppRGB );
// bmPhoto->SetResolution( 100,100);//image.GetHorizontalResolution(), image.GetVerticalResolution() );
//bmPhoto->SetResolution()

hBmp=CreateBitmapIndirect((BITMAP FAR*)&bitmap);
CDC *cdc=GetDC();
CDC *pMemDC=new CDC;
pMemDC->CreateCompatibleDC(cdc);
CBitmap *pOldBitmap=((CBitmap*)pMemDC->SelectObject(hBmp));
cdc->BitBlt(0,0,1024,768,pMemDC,0,0,SRCINVERT);
pMemDC->SelectObject(&pOldBitmap);
delete pMemDC;
}


please help me..Confused | :confused:

Regards,
Srinivas

AnswerRe: to display thumbnails on ListView Pin
James R. Twine26-Feb-07 1:35
James R. Twine26-Feb-07 1:35 
AnswerRe: to display thumbnails on ListView Pin
Naveen26-Feb-07 2:13
Naveen26-Feb-07 2:13 
QuestionRe: to display thumbnails on ListView Pin
Hamid_RT26-Feb-07 7:26
Hamid_RT26-Feb-07 7:26 
AnswerRe: to display thumbnails on ListView Pin
vasu_sri26-Feb-07 23:34
vasu_sri26-Feb-07 23:34 
GeneralRe: to display thumbnails on ListView Pin
Hamid_RT27-Feb-07 0:55
Hamid_RT27-Feb-07 0:55 
GeneralRe: to display thumbnails on ListView Pin
vasu_sri27-Feb-07 2:54
vasu_sri27-Feb-07 2:54 
GeneralRe: to display thumbnails on ListView Pin
Hamid_RT27-Feb-07 7:36
Hamid_RT27-Feb-07 7:36 
QuestionContext menu Handler Example Pin
Omar Mallat26-Feb-07 1:01
professionalOmar Mallat26-Feb-07 1:01 
AnswerRe: Context menu Handler Example Pin
Cedric Moonen26-Feb-07 1:10
Cedric Moonen26-Feb-07 1:10 
QuestionMouse over control Pin
baerten26-Feb-07 0:26
baerten26-Feb-07 0:26 
QuestionRe: Mouse over control Pin
prasad_som26-Feb-07 1:20
prasad_som26-Feb-07 1:20 
AnswerRe: Mouse over control Pin
baerten26-Feb-07 1:52
baerten26-Feb-07 1:52 
AnswerRe: Mouse over control Pin
James R. Twine26-Feb-07 1:29
James R. Twine26-Feb-07 1:29 
GeneralRe: Mouse over control Pin
baerten26-Feb-07 1:54
baerten26-Feb-07 1:54 
GeneralRe: Mouse over control Pin
James R. Twine26-Feb-07 2:11
James R. Twine26-Feb-07 2:11 
AnswerRe: Mouse over control Pin
baerten8-Mar-07 21:23
baerten8-Mar-07 21:23 
QuestionGetting IP Address Pin
Vichitram26-Feb-07 0:03
Vichitram26-Feb-07 0:03 

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.