Click here to Skip to main content
15,887,302 members

Comments by pranav_30 (Top 47 by date)

pranav_30 23-Mar-12 8:46am View    
thanksssss :)
pranav_30 23-Mar-12 5:57am View    
what is wrong in second dialog rsource?
wel i have just added one dialog resource in resource editor which have by default two button ok & cancel

& my DlgDSplayerProc2 is as follows

BOOL CALLBACK DlgDSPlayerProc2(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
bool handled = false;

switch (message)
{
case WM_INITDIALOG:
return TRUE;
}
}
pranav_30 17-Mar-12 5:33am View    
Deleted
i write following code in wm_paint


Bitmap b(800,800);
HDC hdc;
hdc = BeginPaint(g_hDialogWindow, &ps);
Graphics graphics(g_hDialogWindow);
Graphics *graphics2=Graphics::FromImage(&b);

Pen pen(Color(255, 40,40,40),2);
graphics.DrawLine(&pen,0,0,600,600);
graphics2->DrawLine(&pen,0,0,400,400);

b.GetHBITMAP(Color(255,255,255),&dcimage);



BITMAP bm;
HDC hdcMem = CreateCompatibleDC(hdc);
SelectObject(hdcMem, dcimage);
GetObject(dcimage, sizeof(bm), &bm);

BitBlt(hdc,rect.left, rect.top, bm.bmWidth, bm.bmHeight, hdcMem, 0, 0, SRCCOPY);
DeleteDC(hdcMem);

EndPaint(g_hDialogWindow, &ps);

it is creating bitmap image but its background is blue instead of white, i used b.GetHBITMAP(Color(255,255,255),&dcimage);

plz tell me what wrong with this code
pranav_30 26-Feb-12 13:16pm View    
i tried to format the snippet but it wont work...
well above code works fine for me. but i am new to c++, so if any budy have any suggestion then plz post the suggestion....
thanks.
pranav_30 25-Feb-12 11:11am View    
using open cv i can get iplimage from byte array with help of cvGet2D() &cvSet2D()
then convert thay iplimage into hbitmap
is this proper way ??