Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

SimCom

@SimCom
About
Posts
12
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Showing capture webcam picture problem :(
    S SimCom

    Hello dear friends, I've a problem in showing video captured from webcam :(( First I wanted to learn to do this by using the CAvicap, but it didn't work and I couldn't find anybody who can tell me what I did wrong. So I was a bit desperate and searched another method and that was using the DirectShow of DirectX SDK. Well, I've still not coded, because I want to know how Directx and COM work. But the main problem is still that I don't know how to display the video from the webcam on the screen. :doh: The part to show the video using webcam with the Avicap class is here: void CCamSampDlg::OnStart() //when button start is clicked { //than the previewing must begin CRect rectangular; GetClientRect(&rectangular); // Here I try to display the imagestream WebCam.Create(WS_CHILD|WS_VISIBLE,rectangular,this,TRUE); WebCam.ConnectWithDriver(-1); WebCam.SetPreviewRate(15); WebCam.StartPreview(TRUE); } The only thing wat happens when I execute, is the Led blinking of my webcam, wich means that there is some activity going on. But I see not a window opening to show the captured video. :sigh: So I hope you smart guys can help this dumb boy, so I can give my wife more attention :-> If you want the whole project, I can send it to you by email If my application works, I forget all my problems.

    C / C++ / MFC help com graphics game-dev tutorial

  • Help me with displaying capture image
    S SimCom

    Dear Cedric, First, I'm sorry I'm not so clear to you, but I will try to understand you what my situation is. :doh: I want to make a simple dialogbox application just simply to show the video-image of the webcam, using CAvicap class wich encapsulates the win32API fucntions of VFW.dll or .cpp (you can see an article of that class, I'm sorry for the missing link) So I included the CAvicap class in my DialogBox project. To use the webcam, I have to do the following steps: 1) Call the Creat method of CAvicap 2) Callthe Connect method of CAvicap 3) Set preview rate (also a function of CAvicap) 4) Start preview (also a function of CAvicap) And when to close it, I need to call the Disconnect method. The part of showing the life video on my DialogBox is as follow: void CCamSampDlg::OnStart() //when I click on Start-button, { //the webcam will be activated (I see green CRect rect; //LED turns on) and it should start showing GetClientRect(&rect); //the videopicture on the dialogbox // Here I try to display the imagestream WebCam.Create(WS_CHILD|WS_VISIBLE,rect,&m_Disp,TRUE); //I think in this line something WebCam.ConnectWithDriver(-1); //is wrong. //-1 means any driver that's available WebCam.SetPreviewRate(100); //the rate is in mSec to refresh a new image WebCam.StartPreview(TRUE); } void CCamSampDlg::OnCancel() { WebCam.Disconnect(); OnOK(); CDialog::OnCancel(); } Here is the Create method declaration: BOOL CAviCap::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, BOOL fAutoSize) { ASSERT(!GetSafeHwnd()); if(GetSafeHwnd()) { iLastError=CAP_CREATE_DUP; return FALSE; //already connected, can't connect twice! } _autosize = fAutoSize; HWND hWnd=capCreateCaptureWindow("AviCap_Basic", dwStyle, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, pParentWnd->GetSafeHwnd(), AVICAP_WINDOW_ID); if(!hWnd) { TRACE("CAviCap Window creation failed\n"); iLastError=CAP_WINCREATION_FAILED; return FALSE; } //subclass standard window SubclassWindow(hWnd); ::SetClassLong(hWnd, GCL_STYLE, ::GetClassLong(hWnd,GCL_STYLE)|CS_DBLCLKS); #ifdef ON_CONNECT_CHECK_DRIVERLIST _getDrvList(); #endif return TRUE; } By the way the link where you can find the CAvicap class is here: http://www.codeproject.com/audio/avicapwrp.asp Well I hope I informed you well, if you want my project to look at it, I can send it to you. And thank you :-> If my application works, I forget all my problems.

    C / C++ / MFC help tutorial

  • Help me with displaying capture image
    S SimCom

    Webcam is the variable of the type CAvicap class, like this: CAvicap Webcam; and the method Create is as follow: BOOL CAviCap::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, BOOL fAutoSize) { ASSERT(!GetSafeHwnd()); if(GetSafeHwnd()) { iLastError=CAP_CREATE_DUP; return FALSE; //already connected, can't connect twice! } _autosize = fAutoSize; HWND hWnd=capCreateCaptureWindow("AviCap_Basic", dwStyle, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, pParentWnd->GetSafeHwnd(), AVICAP_WINDOW_ID); if(!hWnd) { TRACE("CAviCap Window creation failed\n"); iLastError=CAP_WINCREATION_FAILED; return FALSE; } //subclass standard window SubclassWindow(hWnd); ::SetClassLong(hWnd, GCL_STYLE, ::GetClassLong(hWnd,GCL_STYLE)|CS_DBLCLKS); #ifdef ON_CONNECT_CHECK_DRIVERLIST _getDrvList(); #endif return TRUE; } If my application works, I forget all my problems.

    C / C++ / MFC help tutorial

  • Help me with displaying capture image
    S SimCom

    Hi best programmers, Please help me with my problem. I want to display captured streaming avi-data from webcam, but the main problem is to show the video on my dialogbox. Actually it's very easy to get avi from webcam and I think it worked well so far, but to show in my dialogbox there is a problem. The code I tried is as follows: void CCamSampDlg::OnStart() //when I click on Start-button, { //the webcam will be activated (I see green CRect rect; //LED turns on) and it should start showing GetClientRect(&rect); //the videopicture on the dialogbox // Here I try to display the imagestream WebCam.Create(0,rect,&m_Disp,TRUE); //I think in this line something WebCam.ConnectWithDriver(-1); //wrong. WebCam.SetPreviewRate(15); WebCam.StartPreview(TRUE); } void CCamSampDlg::OnCancel() { WebCam.Disconnect(); OnOK(); CDialog::OnCancel(); } I've read the MSDN how to do that, but I guess I use the Creat-method wrong. Please can somebody help me, you'll maken me so happy, really if I was a gay I would give a very big wet french kiss. Thank you dear friends!!!! If my application works, I forget all my problems.

    C / C++ / MFC help tutorial

  • Problem with webcam image capture
    S SimCom

    Hello boyz, I see nobody replied on my question :doh: , can somebody please help me?? :(( If my application works, I forget all my problems.

    C / C++ / MFC help tutorial question

  • Problem with webcam image capture
    S SimCom

    Hello best programmers, I coded an application wich can display imagestream from a simple webcam. I found a good class (I guess) for capturing AVI from webcam to perform several functions etc... I found it here in Codeproject, some Russian dude encapsulated the functions of VFW class. Anyway, I tried to find a lot of useful information how to capture from webcam, but unfortunatly I found only descriptions of wich functions it has. And believe me there is a lot of functions, and a lot os useless functions for me. What I tried to do is making a simple dialogbox with a startbutton, when you click on start, the webcam is turned on and you'll see yourself on the dialogbox. I coded it as follows: void CCamSampDlg::OnStart() { CRect rect; // Here I try to display the imagestream WebCam.Create(WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS,rect,this,TRUE); WebCam.ConnectWithDriver(-1); WebCam.SetPreviewRate(100); WebCam.StartPreview(TRUE); } It's actually very easy, but the PROBLEM is, when you click on start, the camera turns on (cause I see the activation LED blinking), but it shows nothing on the dialogbox. So I think there something missing in the part of Create-function. Can somebody please help me?? Thank you very very much!!! If my application works, I forget all my problems.

    C / C++ / MFC help tutorial question

  • Can somebody help me with sockets..
    S SimCom

    Hello thug developers, I have a very anoying irritating problem here with my app. I've worked hard to understand VC++, searched all over the internet to find out how things work. So I managed to code an app like a very very simple chat application. A simple peer to peer connection for just sending each other a line of text, that's all. After solving all the errors and warnings, I finally completed my app. I started to test my app and found out that it can connect with the other pc and it can receive data from other pc, but I can't print the recieved text on the screen. I've checked msdn and everything, but I just don't understand what I did wrong. So I hope someone here is able to receive my sourcecode en check what I've done wrong. If there is someone to check it for me I'll be very very very very happy if he can solve my problem. If someone wants to help me via email, than this is my adres: ammeniar@hotmail.com Than you very very very much. If I was a gay I would tongkiss ya ;) thnx boyz and girlz!! If my application works, I forget all my problems.

    C / C++ / MFC help c++ com lounge

  • Can't send text trough socket-connection, help me please!
    S SimCom

    Thnx for the reply, But what has this to do with sending test on the right way? I just want to know how I can send or receive text (in string-format) in its simplest form using CArchive and WriteString() and ReadString(). If my application works, I forget all my problems.

    C / C++ / MFC c++ help sysadmin tutorial question

  • Can't send text trough socket-connection, help me please!
    S SimCom

    Hello my best friends, I'm a beginner to Visual C++ programming, so I have some "stupid" questions for you and I hope you guys to help me. I'm working on my own very simple chatapplication, but I encounterd some problems. I've made a client and a server part, I've tested it out but I had the problem that I couldn't send a text string. My serverside establishes a connection with the clientside ( I know it because I put some control messages to be sure there is a connection). But when I try to send a peace of text, it does nothing except that it shows the sending text on my display and the receiver part shows nothing on the display. I used the following code to send a string: void CSimComDlg::OnSend() { m_Message.GetWindowText(strMESSAGE); m_pArOut->WriteString(strMESSAGE); m_pArOut->Flush(); m_MsgDsp.SetWindowText(_T(Name+":"+strMESSAGE+"\r\n")); strMESSAGE.Empty(); } And to read a received string: void CSimComDlg::ReadReceive() { m_pArIn->ReadString(strMESSAGE); m_MsgDsp.SetWindowText(_T("Chatter:"+strMESSAGE+"\r\n")); strMESSAGE.Empty(); } m_pArOut and m_pArIn are CArchive pointers (I use this in combination with CSocketFile to send data over internet). Is there something wrong with these codes? I've seen some other example codes on the internet, they include also the length of the message to send and they check also the buffer if there's more data coming in. But are they neccesary to put them in my code? I hope you can help me boyzz If my application works, I forget all my problems.

    C / C++ / MFC c++ help sysadmin tutorial question

  • Sending string (text or array of character) trough a socket-connection.
    S SimCom

    Thnx for the reply on my message, But actually I don't just want to copy some prepared codes where you just have to code for example: SendText("Hi how are you") and the rest goes by itself. I want to know what I've done vrong with my code and what do I have to change in my code or what code do I have to add in my code. I've seen some peaces of code using WriteString() and ReadString() with CArchive (wich needs also CSocketFile). I've seen also some codes using Send() and Receive of CSocket class. When I know how to use these codes I can alway encapsulated them just like NDK application you reffered it to. So I hope you can help me more about WriteString() and ReadString() and I hope other guys can help me too, you are all welcome. If my application works, I forget all my problems.

    C / C++ / MFC c++ help sysadmin data-structures tutorial

  • Sending string (text or array of character) trough a socket-connection.
    S SimCom

    Hello my best friends, I'm a beginner to Visual C++ programming, so I have some "stupid" questions for you and I hope you guys to help me. I'm working on my own very simple chatapplication, but I encounterd some problems. I've made a client and a server part, I've tested it out but I had the problem that I couldn't send a text string. My serverside establishes a connection with the clientside ( I know it because I put some control messages to be sure there is a connection). But when I try to send a peace of text, it does nothing except that it shows the sending text on my display and the receiver part shows nothing on the display. I used the following code to send a string: void CSimComDlg::OnSend() { m_Message.GetWindowText(strMESSAGE); m_pArOut->WriteString(strMESSAGE); m_pArOut->Flush(); m_MsgDsp.SetWindowText(_T(Name+":"+strMESSAGE+"\r\n")); strMESSAGE.Empty(); } And to read a received string: void CSimComDlg::ReadReceive() { m_pArIn->ReadString(strMESSAGE); m_MsgDsp.SetWindowText(_T("Chatter:"+strMESSAGE+"\r\n")); strMESSAGE.Empty(); } m_pArOut and m_pArIn are CArchive pointers (I use this in combination with CSocketFile to send data over internet). Is there something wrong with these codes? I've seen some other example codes on the internet, they include also the length of the message to send and they check also the buffer if there's more data coming in. But are they neccesary to put them in my code? I hope you can help me boyzz If my application works, I forget all my problems. If my application works, I forget all my problems.

    C / C++ / MFC c++ help sysadmin data-structures tutorial

  • Sending strings (or characters) through sockets.
    S SimCom

    Hello my best friends, I'm a beginner to Visual C++ programming, so I have some "stupid" questions for you and I hope you guys to help me. I'm working on my own very simple chatapplication, but I encounterd some problems. I've made a client and a server part, I've tested it out but I had the problem that I couldn't send a text string. My serverside establishes a connection with the clientside ( I know it because I put some control messages to be sure there is a connection). But when I try to send a peace of text, it does nothing except that it shows the sending text on my display and the receiver part shows nothing on the display. I used the following code to send a string: void CSimComDlg::OnSend() { m_Message.GetWindowText(strMESSAGE); m_pArOut->WriteString(strMESSAGE); m_pArOut->Flush(); m_MsgDsp.SetWindowText(_T(Name+":"+strMESSAGE+"\r\n")); strMESSAGE.Empty(); } And to read a received string: void CSimComDlg::ReadReceive() { m_pArIn->ReadString(strMESSAGE); m_MsgDsp.SetWindowText(_T("Chatter:"+strMESSAGE+"\r\n")); strMESSAGE.Empty(); } m_pArOut and m_pArIn are CArchive pointers (I use this in combination with CSocketFile to send data over internet). Is there something wrong with these codes? :doh: I've seen some other example codes on the internet, they include also the length of the message to send and they check also the buffer if there's more data coming in. But are they neccesary to put them in my code? I hope you can help me boyzz :-O If my application works, I forget all my problems.

    C / C++ / MFC c++ help sysadmin tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups