Click here to Skip to main content
15,914,350 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: global array pls pls help Pin
John R. Shaw17-Jun-04 13:03
John R. Shaw17-Jun-04 13:03 
Generaldll function calls Pin
Member 19033516-Jun-04 14:54
Member 19033516-Jun-04 14:54 
GeneralRe: dll function calls Pin
palbano16-Jun-04 16:08
palbano16-Jun-04 16:08 
GeneralRe: dll function calls Pin
Member 19033516-Jun-04 16:20
Member 19033516-Jun-04 16:20 
Generalplotting cpu and mem consumption Pin
vvim16-Jun-04 14:32
vvim16-Jun-04 14:32 
GeneralRe: plotting cpu and mem consumption Pin
Antony M Kancidrowski17-Jun-04 1:50
Antony M Kancidrowski17-Jun-04 1:50 
GeneralRe: plotting cpu and mem consumption Pin
vvim18-Jun-04 2:25
vvim18-Jun-04 2:25 
GeneralMenubar problem Pin
group716-Jun-04 13:04
group716-Jun-04 13:04 
I use embedded visual c++ to write a video cam software, so that the pocket PC show the screen of the cam. But my menubar does not work.(I tick the top up box) When I click the top up button in menubar, the menubar hangs. But the screen still can show the video.

void CGroup7Dlg::OnPreview()
{
unsigned char *pbuffer = (unsigned char *)malloc(m_PrvWidth * m_PrvHeight * 3);
unsigned char *rpbuffer = (unsigned char *)malloc(m_PrvWidth * m_PrvHeight * 3);

if ((PreviewFrame((unsigned char*) pbuffer)) == false)
AfxMessageBox(_T("Preview Frame Fail!"), MB_OK);

Rectify(pbuffer, rpbuffer); //<----- a
CBitmap bitmap;
bitmap.CreateBitmap(m_PrvWidth, m_PrvHeight, 1, 24, rpbuffer);

CVOImage image;
RECT pic_rect;
m_picture_window.GetWindowRect(&pic_rect);
HDC picDC = ::GetDC(m_picture_window.m_hWnd );
CString path_fname;

::WriteBitmapIntoJpegFile(TEXT("\\pic1.jpg"), 80, (HBITMAP)bitmap);

UpdateData(true);
path_fname ="\\My Documents\\pic1.jpg";
image.Load (picDC ,path_fname );
image.Draw (picDC ,2,13 );
free(pbuffer);
pbuffer = NULL;
free(rpbuffer); //<-------b
rpbuffer = NULL;
}

There will be out of memory if I comment out line b but menubar works. There will be no problem but the screen pixel is in wrong order of course. I don't know how to fix this bug. Please help...
GeneralRe: Menubar problem Pin
Anthony_Yio16-Jun-04 20:51
Anthony_Yio16-Jun-04 20:51 
GeneralRe: Menubar problem Pin
group716-Jun-04 22:43
group716-Jun-04 22:43 
GeneralRe: Menubar problem Pin
Anthony_Yio16-Jun-04 23:08
Anthony_Yio16-Jun-04 23:08 
Questioninstance name from thread id? Pin
ben216-Jun-04 12:04
ben216-Jun-04 12:04 
AnswerRe: instance name from thread id? Pin
Blake Miller16-Jun-04 13:21
Blake Miller16-Jun-04 13:21 
GeneralRe: instance name from thread id? Pin
ben216-Jun-04 15:02
ben216-Jun-04 15:02 
GeneralRe: instance name from thread id? Pin
ben216-Jun-04 15:12
ben216-Jun-04 15:12 
GeneralRe: instance name from thread id? Pin
ben216-Jun-04 15:17
ben216-Jun-04 15:17 
GeneralRe: instance name from thread id? Pin
Blake Miller16-Jun-04 15:50
Blake Miller16-Jun-04 15:50 
GeneralC++ Arrow Keys Pin
c. s.16-Jun-04 11:55
c. s.16-Jun-04 11:55 
GeneralRe: C++ Arrow Keys Pin
palbano16-Jun-04 12:02
palbano16-Jun-04 12:02 
GeneralRe: C++ Arrow Keys Pin
c. s.16-Jun-04 22:00
c. s.16-Jun-04 22:00 
GeneralRe: C++ Arrow Keys Pin
Roger Allen16-Jun-04 22:24
Roger Allen16-Jun-04 22:24 
QuestionTB_ADDSTRING example? Pin
LukeV16-Jun-04 10:48
LukeV16-Jun-04 10:48 
AnswerRe: TB_ADDSTRING example? Pin
palbano16-Jun-04 11:12
palbano16-Jun-04 11:12 
GeneralRe: TB_ADDSTRING example? Pin
LukeV16-Jun-04 13:01
LukeV16-Jun-04 13:01 
AnswerRe: TB_ADDSTRING example? Pin
Michael Dunn16-Jun-04 20:07
sitebuilderMichael Dunn16-Jun-04 20:07 

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.