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

C / C++ / MFC

 
GeneralRe: How to get the javascript part Pin
22491711-Nov-09 6:12
22491711-Nov-09 6:12 
AnswerRe: How to get the javascript part Pin
raja jamwal31-Dec-09 8:02
raja jamwal31-Dec-09 8:02 
QuestionWant to add a static horizontal splitter to an already created view in sdi app Pin
Member 570390510-Nov-09 7:02
Member 570390510-Nov-09 7:02 
AnswerRe: Want to add a static horizontal splitter to an already created view in sdi app Pin
«_Superman_»10-Nov-09 8:18
professional«_Superman_»10-Nov-09 8:18 
QuestionIntegration of WinForm and Visual C++ Pin
kikoso10-Nov-09 5:47
kikoso10-Nov-09 5:47 
AnswerRe: Integration of WinForm and Visual C++ Pin
«_Superman_»10-Nov-09 8:24
professional«_Superman_»10-Nov-09 8:24 
GeneralRe: Integration of WinForm and Visual C++ Pin
kikoso11-Nov-09 6:17
kikoso11-Nov-09 6:17 
GeneralRe: Integration of WinForm and Visual C++ Pin
kikoso12-Nov-09 4:11
kikoso12-Nov-09 4:11 
Found a solution (and a new problem) to this. I just post the solution in case anyone check it in the future Smile | :)

I basically transform the IplImage into Bitmap, and then paint it over a Form element.

void IplImageToTBitmap (IplImage* image){
System::Drawing::Bitmap^ bitmap = gcnew Bitmap(image->height,image->width * image->nChannels,System::Drawing::Imaging::PixelFormat::Format24bppRgb);
int numberOfLines= image->height;
int numberOfColums= image->width ;//* image->nChannels;
int step= image->widthStep;
unsigned char* data=reinterpret_cast<unsigned char*>(image->imageData);
for(int i=0; i<numberOfLines; i++){
for(int j=0; j<numberOfColums; j+= image->nChannels){
bitmap->SetPixel(j/3,i,Color::FromArgb(data[j],data[j+1],data[j+2]));

}
data+= step;
}
this->panel2->BackgroundImage = bitmap;
}

Using the sentence this->panel2->BackgroundImage = bitmap; I manage to write the image to a Panel Object (and definitely every object able to support bitmaps).

Now I´m trying to work just with the frames from OpenCV not displaying the video (that means, commenting the line cvNamedWindow( "video", 1 );) Nevertheless, the program gets frozen and I´m not able to use it. I´m thinking about doing some stuff with Threads (using a Thread for OpenCV and a different one for the GUI), but any advice will be welcome Smile | :)

Regards
QuestionToolbar control access Pin
m_mun10-Nov-09 3:13
m_mun10-Nov-09 3:13 
AnswerRe: Toolbar control access Pin
LunaticFringe10-Nov-09 6:59
LunaticFringe10-Nov-09 6:59 
GeneralRe: Toolbar control access Pin
«_Superman_»10-Nov-09 7:46
professional«_Superman_»10-Nov-09 7:46 
GeneralRe: Toolbar control access Pin
LunaticFringe10-Nov-09 8:15
LunaticFringe10-Nov-09 8:15 
QuestionNot able to run the VC++ 2005 exe in remote machine. Pin
jain_MS10-Nov-09 1:57
jain_MS10-Nov-09 1:57 
AnswerRe: Not able to run the VC++ 2005 exe in remote machine. Pin
LunaticFringe10-Nov-09 2:11
LunaticFringe10-Nov-09 2:11 
AnswerRe: Not able to run the VC++ 2005 exe in remote machine. Pin
jain_MS10-Nov-09 2:43
jain_MS10-Nov-09 2:43 
GeneralRe: Not able to run the VC++ 2005 exe in remote machine. [modified] Pin
LunaticFringe10-Nov-09 3:13
LunaticFringe10-Nov-09 3:13 
GeneralRe: Not able to run the VC++ 2005 exe in remote machine. Pin
jain_MS10-Nov-09 3:52
jain_MS10-Nov-09 3:52 
AnswerRe: Not able to run the VC++ 2005 exe in remote machine. Pin
Covean10-Nov-09 3:30
Covean10-Nov-09 3:30 
GeneralRe: Not able to run the VC++ 2005 exe in remote machine. Pin
jain_MS10-Nov-09 3:50
jain_MS10-Nov-09 3:50 
GeneralRe: Not able to run the VC++ 2005 exe in remote machine. Pin
Covean10-Nov-09 4:18
Covean10-Nov-09 4:18 
GeneralRe: Not able to run the VC++ 2005 exe in remote machine. Pin
jain_MS10-Nov-09 4:28
jain_MS10-Nov-09 4:28 
GeneralRe: Not able to run the VC++ 2005 exe in remote machine. Pin
Covean10-Nov-09 4:32
Covean10-Nov-09 4:32 
AnswerRe: Not able to run the VC++ 2005 exe in remote machine. Pin
raja jamwal31-Dec-09 8:07
raja jamwal31-Dec-09 8:07 
QuestionOS Specific Crash - Application crashes in Vista OS , Windows 2008 32/64 bit. Application doesn't crash in Win2003 Pin
V K 210-Nov-09 1:16
V K 210-Nov-09 1:16 
AnswerRe: OS Specific Crash - Application crashes in Vista OS , Windows 2008 32/64 bit. Application doesn't crash in Win2003 Pin
V K 210-Nov-09 1:23
V K 210-Nov-09 1:23 

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.