Hi,
We have successfully loaded the image into child window within the firebreath plugin window. I did this to show the images with scroll bar options as per suggestion given by John Tan and Neil. But the problem is if we scanned more than one images the first image alone getting loaded the others are not displayed. We have followed the below steps
1. Create Child Window.
hChildWin = CreateWindowEx(
WS_EX_WINDOWEDGE, //Extended Window Styles - WS_OVERLAPPEDWINDOW, WS_OVERLAPPED
className.c_str(), //window class name
winName.c_str(), //window caption
WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL, //window style
0, //initial x position
0, //initial y position
iChildWinWidth, //initial x size
iChildWinHeight, //initial y size
hParentWin, //parent window handle
NULL, //window menu handle
hInstance, //program instance handle
NULL //creation parameters
);
2. Get the physical path of scanned images into array and show that images into Device context using WM_PAINT message of ChildWindow_Proc.
HDC hdc = GetDC(hChildWin);
RECT Rect;
GetWindowRect(hChildWin, &Rect);
for (int i = 0; i < g_arrFiles.size(); ++i) //Scanned images file path in array.
{
//1.getting bitmap info from scanned images here to show that in child window.
.........
//2. Begin the paint
PAINTSTRUCT ps;
hdc = ::BeginPaint(hChildWin, &ps);
//3. Paint the image into device context
StretchDIBits(hdc, 0, iNextPagePos, iRectWidth, iRectHeight, 0, 0, cxDib, cyDib, pBits, pbmi, DIB_RGB_COLORS, SRCCOPY);
EndPaint(hChildWin, &ps);
}
Here iNextPagePos = No.Of.Files * EachImageHeight; // to draw the image one by one in child window(or HDC).
Please give me the suggestion for below my doubts.
1. Is there any code statement I did missed here to show all the images in single child window.
2. If so please let me know how to show all the images in single child window.
3. Its also so helpful if there is another work around for this task.
Thanks,
Yoga V
yoga...@gmail.com