Click here to Skip to main content
15,915,764 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: date [modified] Pin
p_6-Jun-06 21:42
p_6-Jun-06 21:42 
AnswerRe: date Pin
Laxman Auti6-Jun-06 1:43
Laxman Auti6-Jun-06 1:43 
AnswerRe: date Pin
David Crow6-Jun-06 3:28
David Crow6-Jun-06 3:28 
GeneralRe: date Pin
p_6-Jun-06 3:48
p_6-Jun-06 3:48 
QuestionRe: date Pin
David Crow6-Jun-06 3:55
David Crow6-Jun-06 3:55 
QuestionHow to copy from CBitmap to CBitmap Pin
gomez_a6-Jun-06 1:18
gomez_a6-Jun-06 1:18 
AnswerRe: How to copy from CBitmap to CBitmap Pin
V_shr6-Jun-06 1:31
V_shr6-Jun-06 1:31 
GeneralRe: How to copy from CBitmap to CBitmap Pin
ThatsAlok6-Jun-06 1:59
ThatsAlok6-Jun-06 1:59 
GeneralRe: How to copy from CBitmap to CBitmap Pin
V_shr6-Jun-06 2:11
V_shr6-Jun-06 2:11 
GeneralRe: How to copy from CBitmap to CBitmap Pin
gomez_a6-Jun-06 2:26
gomez_a6-Jun-06 2:26 
GeneralRe: How to copy from CBitmap to CBitmap Pin
ThatsAlok6-Jun-06 18:41
ThatsAlok6-Jun-06 18:41 
GeneralRe: How to copy from CBitmap to CBitmap Pin
Hamid_RT6-Jun-06 2:21
Hamid_RT6-Jun-06 2:21 
GeneralRe: How to copy from CBitmap to CBitmap Pin
ThatsAlok6-Jun-06 18:42
ThatsAlok6-Jun-06 18:42 
GeneralRe: How to copy from CBitmap to CBitmap Pin
Hamid_RT6-Jun-06 18:56
Hamid_RT6-Jun-06 18:56 
AnswerRe: How to copy from CBitmap to CBitmap Pin
ThatsAlok6-Jun-06 1:59
ThatsAlok6-Jun-06 1:59 
GeneralRe: How to copy from CBitmap to CBitmap Pin
gomez_a6-Jun-06 2:43
gomez_a6-Jun-06 2:43 
GeneralRe: How to copy from CBitmap to CBitmap Pin
Hamid_RT6-Jun-06 2:52
Hamid_RT6-Jun-06 2:52 
GeneralRe: How to copy from CBitmap to CBitmap Pin
gomez_a6-Jun-06 5:24
gomez_a6-Jun-06 5:24 
GeneralRe: How to copy from CBitmap to CBitmap Pin
Hamid_RT6-Jun-06 18:57
Hamid_RT6-Jun-06 18:57 
GeneralRe: How to copy from CBitmap to CBitmap Pin
gomez_a6-Jun-06 23:45
gomez_a6-Jun-06 23:45 
GeneralRe: How to copy from CBitmap to CBitmap Pin
Hamid_RT7-Jun-06 2:03
Hamid_RT7-Jun-06 2:03 
Hope I understood your question

<br />
void CAnswerDlg::OnBnClickedTest()<br />
{<br />
CBitmapViewer *mNewBitmap;<br />
CBitmap bmp_part;<br />
bmp_part.Attach((HBITMAP)LoadImage(AfxGetInstanceHandle(),"c:\\0.bmp",IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE|LR_CREATEDIBSECTION));<br />
<br />
CRect R3;<br />
mNewBitmap = new CBitmapViewer();<br />
mNewBitmap->Create(this, R3, 1); // CRect R3 - where the window is placed<br />
mNewBitmap->SetBitmap2(&bmp_part);<br />
mNewBitmap->DestroyWindow();<br />
<br />
/*<br />
if you use this code you see one file<br />
CImage m;<br />
m.Attach(mNewBitmap->m_Bitmap);<br />
m.Save("c:\\test.bmp");<br />
m.Detach();*/<br />
}<br />
<br />
BOOL CBitmapViewer::Create(CWnd* pParentWnd, const RECT& rect,UINT nID,DWORD dwStyle)<br />
{<br />
return CWnd::Create("CBitmapViewer","",dwStyle,rect,pParentWnd,1,0);<br />
}<br />
<br />
BOOL CBitmapViewer::SetBitmap(UINT nIDResource)<br />
{<br />
return m_Bitmap.LoadBitmap(nIDResource);<br />
}<br />
<br />
void CBitmapViewer::SetBitmap2(CBitmap *m)<br />
{<br />
	m_Bitmap.Attach((HBITMAP)m->m_hObject);<br />
}<br />



whitesky


GeneralRe: How to copy from CBitmap to CBitmap Pin
ThatsAlok6-Jun-06 18:13
ThatsAlok6-Jun-06 18:13 
QuestionShared Memory Writing Pin
velayudhan_raj6-Jun-06 1:03
velayudhan_raj6-Jun-06 1:03 
AnswerRe: Shared Memory Writing Pin
Laxman Auti6-Jun-06 1:13
Laxman Auti6-Jun-06 1:13 
GeneralRe: Shared Memory Writing Pin
velayudhan_raj6-Jun-06 1:15
velayudhan_raj6-Jun-06 1:15 

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.