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
R

RichardWdy

@RichardWdy
About
Posts
33
Topics
13
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • WMP Player 9(CWMPPlayer4) frame control and dragging
    R RichardWdy

    I had a small mistake in the above post. void CMyDlg::OnStep() { if (MPState == MP_PLAYING) g_pMediaPlayer->GetControls().pause(); // forward m_nOneFrame = 0.04 (PAL) g_pMediaPlayer->GetControls().SetCurrentPosition((double)m_nOneFrame); } should be: void CMyDlg::OnStep() { ... if (MPState == MP_PLAYING) g_pMediaPlayer->GetControls().pause(); // forward m_nOneFrame = 0.04 (PAL) g_pMediaPlayer->GetControls().SetCurrentPosition((double)(m_nCurrPos + m_nOneFrame)); } No pains, no gains.

    C / C++ / MFC c++ com performance question

  • WMP Player 9(CWMPPlayer4) frame control and dragging
    R RichardWdy

    Hi, To support both mpeg files and wmv files, I had just updated and embeded WMP Player 6 to 9 ActiveX control in my c++ application. Everything went well with .mpg file, like frame step forward and backward. Also image kept moving while dragging a slider ctrl. But that didn't work with .wmv file! As described in WMPlayer SDK document, I couldn't find "m_MP.GetControls().step()" function in CWMPPlayer4 class.I find newly WM Player 9.0 has this funcion: Enhanced->Play speed control: there are 2 small button which can step forward and backward. I dragged the slider ctrl but the image didn't refresh. After I dragged to a new position and excuted play() function, it moved again. My code is like following: void CMyDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) { double dblPosi; ... if (MPState == MP_PLAYING) g_pMediaPlayer->GetControls().pause(); m_nTimeSlider = m_TimeSlider.GetPos(); dblPosi = g_pMediaPlayer->GetControls().SetCurrentPosition((double)m_nTimeSlider); CDialog::OnHScroll(nSBCode, nPos, pScrollBar); } void CMyDlg::OnStep() { if (MPState == MP_PLAYING) g_pMediaPlayer->GetControls().pause(); // forward m_nOneFrame = 0.04 (PAL) g_pMediaPlayer->GetControls().SetCurrentPosition((double)m_nOneFrame); } Anybody who know that plz give me some suggestion? Thanks a lot. No pains, no gains.

    C / C++ / MFC c++ com performance question

  • How to send message to another program?
    R RichardWdy

    Hi, I tried another way and it did work! I used EnumChildWindows function to enumerate all child windows of the dialog and I could get the handle of the edit control through a callback function. Thanks for help. Richard Woo No pains, no gains.

    C / C++ / MFC tutorial question

  • Help on multi-threading
    R RichardWdy

    I think you should do like this... void CThreadTestDlg::OnStop() { // wanna stop the thread... g_bAbort = TRUE; } Thus you can abort the thread. No pains, no gains.

    C / C++ / MFC debugging help question

  • Help on multi-threading
    R RichardWdy

    I think you should do like this... void CThreadTestDlg::OnStop() { // wanna stop the thread... g_bAbort = TRUE; DWORD dwExitCode = 0; } Thus you can abort the thread. No pains, no gains.

    C / C++ / MFC debugging help question

  • How to send message to another program?
    R RichardWdy

    Have you received my email with the 2 programs? No pains, no gains.

    C / C++ / MFC tutorial question

  • How to send message to another program?
    R RichardWdy

    Sorry about my troubling you. I have to send my whole project to you. Plx take some time to help me. Thanks. Richard Woo No pains, no gains.

    C / C++ / MFC tutorial question

  • How to send message to another program?
    R RichardWdy

    I don't know why it works! Just before I sent you the 2 apps, it showed "Not Found". HWND g_FindSpecialControl(LPCSTR lpWndCap, int nIDDlgItem) { HWND hWnd; int nID; hWnd = FindWindow(NULL, lpWndCap); if (hWnd == NULL) return NULL; hWnd = GetWindow(hWnd, GW_CHILD); while (hWnd != NULL) { hWnd = GetWindow(hWnd, GW_HWNDNEXT); nID = GetDlgCtrlID(hWnd); if (nID == nIDDlgItem) return hWnd; } return NULL; } It's strange! No pains, no gains.

    C / C++ / MFC tutorial question

  • How to send message to another program?
    R RichardWdy

    I send you 2 apps. Plx check. Thanks a lot. No pains, no gains.

    C / C++ / MFC tutorial question

  • How to send message to another program?
    R RichardWdy

    I can get the handle of the dialog and the ID of the edit control. But the edit control only has ID, not caption. I do use GetWindow() to enumerate the desktop windows. It's a good way that can replace FindWindow function. My problem is I don't know how to use ID of the control to get the handle. I tried several functions, as GetDlgItem, GetDlgCtlID,... Could you give me further information? Thanks a lot. Richard Woo No pains, no gains.

    C / C++ / MFC tutorial question

  • How to send message to another program?
    R RichardWdy

    Thank you. I want to run another dialog program. It has several edit controls. I want to fill the edit controls automatically, which requests send message to the edit control. I tried several ways, but I couldn't the handle of the edit control. The following is my code. HWND h = ::GetDlgItem(hDlg, ID_EDIT_START); // hDlg is the handle of the dialog. h return NULL. Could you tell me what's wrong? How can I perform that? Richard Woo No pains, no gains.

    C / C++ / MFC tutorial question

  • How to send message to another program?
    R RichardWdy

    Thank you. I want to run another dialog program. It has several edit controls. I want to fill the edit controls automatically, which requests send message to the edit control. I tried several ways, but I couldn't get the handle of the edit control. The following is my code. HWND h = ::GetDlgItem(hDlg, ID_EDIT_START); // hDlg is the handle of the dialog. h return NULL. Could you tell me what's wrong? How can I perform that? Richard Woo No pains, no gains.

    C / C++ / MFC tutorial question

  • How to send message to another program?
    R RichardWdy

    I made a mistake with the former reply. I tried this: ::SendMessage(::GetDlgItem(hSearchHandle, ID_EDIT_START), BM_SETCHECK, 1, 0); No response at all. I have solved it in another way. My question has a little change. How to get a special edit control in a dialog program's handle? Could you help me? Thanks a lot. Richard Woo No pains, no gains.

    C / C++ / MFC tutorial question

  • How to send message to another program?
    R RichardWdy

    Thanks for giving me help. I think the code may has some problem.(I didn't test it yet.) I want to send BM_SETCHECK message to an edit(ID = ID_EDIT_START) and your code showed that you send BM_SETCHECK message to main window. It won't work. So I need to get the edit control's handle (It's where my problem really exists, I can't get the handle). By the way, the external dialog program has several edit controls. Thanks again. Richard Woo No pains, no gains.

    C / C++ / MFC tutorial question

  • How to send message to another program?
    R RichardWdy

    I wnat to run another prog. in my prog. So I need seng messare to the prog. I have two questions: 1.What's wrong with the following code and How to send message to a check ctrl? HWND hEditFilter = GetDlgItem(g_hExefile, ID_CHECK_EDIT); // return NULL??? // g_hExefile is the handle of another prog's dialog. PostMessage(g_hExefile, BM_SETCHECK, ID_CHECK_EDIT, 0); // no respond // I want to set the check ctrl in FALSE state. 2.How to send message to a commom dialog(like OK button)? Thanks. No pains, no gains.

    C / C++ / MFC tutorial question

  • I want VirtualDub!!!
    R RichardWdy

    I don't know why I can't access VirtualDub's download website. Anyone who had that program plx e-mail to me.(With source code) Thanks a lot. E-mail:zne@zne.com.cn No pains, no gains.

    C / C++ / MFC com

  • How to use VB dll?
    R RichardWdy

    Thank you very much. I am trying... No pains, no gains.

    C / C++ / MFC help com tutorial question

  • How to use VB dll?
    R RichardWdy

    I have a VB dll(ActiveX dll). The project only has dll file and library file. I used it like this: typedef VOID (*VTPROC)(LPTSTR); void MyProc() { HINSTANCE hinstLib; VTPROC ProcAdd; BOOL fFreeResult, fRunTimeLinkSuccess = FALSE; // Get a handle to the DLL module. hinstLib = LoadLibrary("VTProj"); // If the handle is valid, try to get the function address. if (hinstLib != NULL) { ProcAdd = (VTPROC)GetProcAddress(hinstLib, "Initialize"); // If the function address is valid, call the function. if (fRunTimeLinkSuccess = (ProcAdd != NULL)) (ProcAdd) ("message via DLL function\n"); // Free the DLL module. fFreeResult = FreeLibrary(hinstLib); } // If unable to call the DLL function, use an alternative. if (! fRunTimeLinkSuccess) printf("message via alternative method\n"); } The ProcAdd was always NULL. Could anyone help me solve the problem? Thanks. No pains, no gains.

    C / C++ / MFC help com tutorial question

  • How to use directx objects?
    R RichardWdy

    Does anyone knows how to use FilgraphManager Object(directx object) in VC? Thanks a lot. No pains, no gains.

    C / C++ / MFC graphics game-dev tutorial question

  • DirectX editing service problem, help me!
    R RichardWdy

    I found a program named "TrimmerVB"(it's a VB sample of AVI/MOV editng in DirectX 8.1 SDK). I want to use its functions in my VC++ frame. But I don't know how to do that. Thanks for giving any further advice. :confused: :confused: :confused: Win2k, VC++ 6.0 SP5

    C / C++ / MFC help c++ graphics game-dev tutorial
  • Login

  • Don't have an account? Register

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