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
U

User 11731824

@User 11731824
About
Posts
17
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Detecting a KeyDown
    U User 11731824

    Hi all, I have a textbox (Microsoft Forms 2.0 ActiveX control). I want to do something after user press down arrow keys (VK_DOWN). when i used classwizard to add the event on the textbox, here is the function: void CSubtitlerView::OnKeyDownMytextbox(LPDISPATCH KeyCode, short Shift) { // TODO: Add your control notification handler code here } I have no idea how to get the key information from KeyCode. Can anyone help me?

    C / C++ / MFC com help tutorial question

  • SetText doesn't work on TextBox?
    U User 11731824

    I inserted an ActiveX Control "Microsoft Forms 2.0 TextBox" in my app because it supports unicode character. I can successfully type and retrieve the text from it. But now I can't set the text to it from the code. I tried using the following code, but it doesn't work. There must be something simple that I am missing. Can anyone help me? m_myTextBox.SetText(L"The text"); UpdateData(false);

    C / C++ / MFC com help question

  • How to choose between two views on Form-based MDI?
    U User 11731824

    Hi all, I have a problem that should have a simple solution. I have an MDI FormView-based app and it has two button on the toolbar where the user can choose to create a new form-based document version 1 or version 2. Therefore I think I have 2 issues: one, how to set the global variable after either clicking button 1 or 2. What function should I call after setting the var? void CMainFrame::OnFileNew2() { view = 2; // set the global var ... // what function should be here to continue creating new doc? } two, how to choose the view based on the global var. Can anyone help me? or does anyone have a sample code that just does that? Thanks a lot in advance.

    C / C++ / MFC help tutorial question announcement

  • Unicode vs. ANSI string
    U User 11731824

    Does anyone know how the Unicode (wide-char) string is constructed. I have a unicode text file and I want to use WideCharToMultiByte to manipulate the contents. My problem is that I read the file as binary (byte-by-byte) and I dont know how to construct the wide-character string (used as the input for the function) to result the ANSI string. My project doesn't define unicode (therefore doesn't support unicode). Thanks a lot in advance for any ideas.

    C / C++ / MFC visual-studio help tutorial

  • Executing an exe
    U User 11731824

    Thank you very much Geert :) It works wonderfully!

    C / C++ / MFC help question

  • Executing an exe
    U User 11731824

    Hi all, I have somewhat simple DOS command line, but I can't get it to work. Here is my code: // the line to be executed: // c:\a\wzzip c:\b\b.zip c:\b\*.* // my first try, it return "The specified file was not found." ShellExecute(NULL, "open", "C:\\a\\wzzip C:\\b\\b.zip C:\\b\\*.*", NULL, NULL, SW_SHOWNORMAL); //my second try WinExec ("c:\\a\\wzzip c:\\b\\b.zip c:\\b\\*.*", SW_SHOW); //my third try _spawnl( _P_WAIT, "C:\\a\\wzzip C:\\b\\b.zip C:\\b\\*.*", "C:\\a\\wzzip C:\\b\\b.zip C:\\b\\*.*", NULL, NULL, NULL); Can anyone please help me? Thanks a lot.

    C / C++ / MFC help question

  • How to use StrecthBlt?
    U User 11731824

    Can anyone post a quick sample code on how to use StrecthBlt? I have a bitmap that I want to resize to its half-size. Thanks a lot in advance.

    C / C++ / MFC graphics tutorial question

  • SetTimer doesn't work
    U User 11731824

    I did some more digging and found something: In the project, I create an owner draw button. What I want to do is move this button while the movie is playing. Therefore I add this line on OnTimer: GetDlgItem(IDC_MY_IMAGE_BUTTON)->MoveWindow(newX, newY, newWidth, newHeight, true); And it works (it moves while the movie playing). But I also want to draw an image on the button, so I created a new class CMyImageButton, derived from CButton class. And as soon as I associated the owner draw button variable to CMyImageButton class, the OnTimer stop working. Any idea why? Thanks.

    C / C++ / MFC question

  • SetTimer doesn't work
    U User 11731824

    I never use thread before (and it sounds&seems confusing) :) Could you please post a small sample code on how to create, call, and destroy a simple thread on an MFC dialog-based? Thanks a lot in advance.

    C / C++ / MFC question

  • SetTimer doesn't work
    U User 11731824

    Yes, I have the handler in message map. what does the VERIFY() should do? because nothing different happened when I add it. The line of code right before the SetTimer(1,500,NULL) is: MCIWnd(hMCI); // plays a movie This shouldn't affect anything, should it? I know that MSDN says "The WM_TIMER message is a low-priority message." I have another smaller app that also dialog-based that does that: plays a movie while activating the timer. Thanks.

    C / C++ / MFC question

  • SetTimer doesn't work
    U User 11731824

    Hi All, I used the following code. But it appears that my code in the OnTimer function is never executed. The strangest thing is that if I click the menu ,so it drops down, the timer is executed! And as soon as I pull up the menu again, the timer stops! Can anyone give me a explaination for this? Thanks a lot. void CMyDialog::OnMyFunction() { ... SetTimer(1, 500, NULL); ... } void CMyDialog::OnTimer(UINT nIDEvent) { ... // my code} }

    C / C++ / MFC question

  • Splash screen on dialog-based?
    U User 11731824

    Can anyone give me a hint on how to display splash screen on a dialog-based app, please? Thanks a lot in advance.

    C / C++ / MFC tutorial question

  • SetWindowPos doesn't work?
    U User 11731824

    I want to play two movies at the same time side-by-side, one using MCIWnd and the other one using CMediaPlayer (Windows Media Player ActiveX Control). The following code does it, except that I have a background image that should appear on top of the two controls. My question: why the bitmap doesn't appear on top of the CMediaPlayer control (while the bmp appears on top of the MCIWnd control!) ? I thought ::SetWindowPos( ... , HWND_BOTTOM, ...) will place the control at the bottom of all other control? void CMyDlg::OnButton1() { HWND hMCI; hMCI = MCIWndCreate(m_hWnd,AfxGetApp()->m_hInstance, MCIWNDF_SHOWNAME|MCIWNDF_NOMENU, "C:\\1.avi"); ::SetWindowPos(hMCI, HWND_BOTTOM, 10,10,200,200, SWP_SHOWWINDOW); MCIWndPlay(hMCI); // CMediaPlayer2 is a class from Windows Media // Player ActiveX control CMediaPlayer2 m_media; m_media.Create( "Media", WS_VISIBLE, CRect(250, 10, 550, 260), this, 1234); ::SetWindowPos(m_media.m_hWnd, HWND_BOTTOM, 250, 10, 200, 200, SWP_SHOWWINDOW); m_media.SetFileName("C:\\2.avi"); m_media.Play();} If anyone can explain this to me, I really appreciate it. Thanks for any help in advance.

    C / C++ / MFC question com graphics help

  • Sample code on DirectShow, please?
    U User 11731824

    If you could really give me the example code, I really appreciate it. Btw, it is not a win32 app, is it? Because I am really new at this DirectX stuff, and I already have my project half done in an MFC dialog-based app. All I need to do now is the ability to play a movie clip file (non-streaming) using DirectShow. Once again, thanks a lot.

    Article Writing question

  • Sample code on DirectShow, please?
    U User 11731824

    If you could really give me the example code, I really appreciate it. Btw, it is not a win32 app, is it? Because I am really new at this DirectX stuff, and I already have my project half done in an MFC dialog-based app. All I need to do now is the ability to play a movie clip file (non-streaming) using DirectShow. Once again, thanks a lot.

    Article Writing question

  • Sample code on DirectShow, please?
    U User 11731824

    I would like to play a movie clip using DirectShow on my dialog-based app. Is this possible? Does anyone have a (working) sample code that does it, or maybe an article or web site? preferably non-full frame. Thanks a lot in advance.

    Article Writing question

  • Sample code on DirectShow, please?
    U User 11731824

    I would like to play a movie clip using DirectShow on my dialog-based app. Is this possible? Does anyone have a (working) sample code that does it, or maybe an article or web site? preferably non-full frame. Thanks a lot in advance.

    Article Writing 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