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
V

Vickie

@Vickie
About
Posts
29
Topics
16
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • AfxBeginThread and EndThread
    V Vickie

    Dear all, I'm writting a MFC program that enables the user to enter the URL, and then press "Start" button to start downloading the html from that URL. So I have create a WorkerThread to handle the downloading process so that the user can press "Stop" button to terminate the downloading process. After successful or unsuccessful downloading of html, it should call a Text-to-speech function to speak to the user about the status of download. However, the text-to-speech function cannot work when there is another thread running. I have tried to create another thread to call the TTS function, but it failed too. My question is :where does the thread return when it finished?? Is there anyother method to call my TTS() function when the thread is finished? Here is my program: // myappdlg.cpp static UINT workerthreadcontrol ( void * pRTclass ) void myappdlg.OnStart() { downloadHTML(); } void downloadHTML() { ..... CWinThread* pWorkerThread; pWorkerThread = AfxBeginThread ( workerthreadcontrol, this, THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED ); m_Startbtn.EnableWindow( False ); m_Stopbtn.EnableWindow( True ); pWorkerThread->ResumeThread(); ..... } UINT workerthreadcontrol( void * pRTclass ) { myappdlg pDlg = (myappdlg*) pRTclass; pDlg->WorkerThreadProcess(); return 0; } void WorkerThreadProcess() { doing downloading......... } // Where should I put this function??? void TTS( LPCTSTR Text ) { Speak out Text..... } Thanks a lot for your help.... Best Regards, Vickie

    C / C++ / MFC c++ question html help

  • Get present URL from Internet Explorer
    V Vickie

    Dear all, Does anyone know whether a MFC program can get the URL at the activating Internet Explorer or not? If yes, how can I get the URL? Thanks a lot! Vickie

    C / C++ / MFC question c++

  • Calling CWnd function between 2 dialogs
    V Vickie

    Dear all, If I have two window dialogs opening, say, A and B. And if A is activating, I want that in A::OnOK(), it can call a function in B, say B::bfunction(). However, there is some CWnd function, e.g UpdateData(), SetForeGroundWindows(), SetWindowText() etc...included in the bfunction(), then it will fail in run time.. A::OnOK() { B dlg; dlg.function(); } Can I know how to solve it? My target is, when A is activating, if the user press OK, then the B dialog will bring to top and A will call the B's function.....and then close A dialog. Please help! Thanks a lot!!! :rose: :-O

    C / C++ / MFC help tutorial question

  • Select individual subitem cell in CListCtrl
    V Vickie

    Hi all, In a CListCtrl, is that the user can only select the ITEM ? Can the subitem in other column be selected individually too( only select the subitem )?? If can't, what should I use other than CListCtrl if I want to select cells horizontally ? Please help! Thanks! Vickie

    C / C++ / MFC help question

  • CListCtrl OnItemchanged, loops 3 times??
    V Vickie

    Thank you very much!! I got how to do it now. It is to check the status of pNMListView->uNewState and pNMListView->uOldState before operation as follow: void CTable::OnItemchangedtable(NMHDR* pNMHDR, LRESULT* pResult) { NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; UINT u = pNMListView->uNewState; UINT n = pNMListView->uOldState; if( u != 0 && n == 0 ) { POSITION pos = m_table.GetFirstSelectedItemPosition(); int i = m_table.GetNextSelectedItem( pos ); CString cs = m_table.GetItemText(i, 0); AfxMessageBox( cs); } *pResult = 0; }

    C / C++ / MFC question testing beta-testing help

  • CListCtrl OnItemchanged, loops 3 times??
    V Vickie

    Since my tools is for the Blind, can't use Mouse but only keyboard, i.e. up, down arrow or short-cut key instead.

    C / C++ / MFC question testing beta-testing help

  • CListCtrl OnItemchanged, loops 3 times??
    V Vickie

    Dear all, I am encountering a problem in calling this CListCtrl function, OnItemchanged. Whenever there is a change in selection, this functions will run 3 times!!! And, for the first time, the string got is " ", but at the second time, it shows the right string, then it is " " again for the third time. Can I know how does it happen for running 3 times? This is just a testing code. Actually I want to call another function whenever a selection is moved to another one, how can I do this if this function cannot work? void CTable::OnItemchangedtable(NMHDR* pNMHDR, LRESULT* pResult) { NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; POSITION pos = m_table.GetFirstSelectedItemPosition(); int i = m_table.GetNextSelectedItem( pos ); CString cs = m_table.GetItemText(i, 0); AfxMessageBox( cs); *pResult = 0; } Thank you very much !!! Regards, Vickie

    C / C++ / MFC question testing beta-testing help

  • Grid
    V Vickie

    I want to make a control that like a Grid that can provide the function of setting columns and rows, changing selection by just pressing up, down, left or right arrow keys. Is that the CListCtrl can do so? Thanks ! Vickie

    C / C++ / MFC css question

  • CFile::Read
    V Vickie

    Dear all, How can I read a text file and put all the text into ONE CString? Thanks for your help! Vickie

    C / C++ / MFC question help

  • Global variable
    V Vickie

    I can't get it work even I have followed what you'd said, since there are many others header files included in my cpps. Will this be the reason leading to my errors? Thanks a lot!

    C / C++ / MFC question c++

  • Global variable
    V Vickie

    Dear all, How can I declare a variable so that all cpps in my MFC project can access the variable? Thanks. Vickie

    C / C++ / MFC question c++

  • CListBox
    V Vickie

    Dear all, I have created a CListBox, with several lines of string, in a dialogbox. How can I call another function automatically whenever the selection of string in the list box is changed (by the up and down arrow key)? For example, in the function I want to get the text of the new position of the cursor selection whenever the selection is changed etc.. Looking forward to your sincere reply! Thanks!

    C / C++ / MFC question tutorial

  • Passing PCWSTR to a function
    V Vickie

    Dear all, How can I pass the string in a char array or CString array in this Speak() function? e.g. char chararray[5][5]; chararray[0] = "Hello"; or CString cstringarray[5][5]; cstringarray[0] = "How are you"; HRESULT Speak (PCWSTR pszSpeak); Since the parameter should be a pointer of WCHAR, do anyone know how to convert the string to the suitable parameter? Looking forward to your sincere reply. Thanks a lot!

    C / C++ / MFC question data-structures tutorial

  • Microsoft SAPI (tts) problem
    V Vickie

    Dear all, Is there anyone familiar with the Microsoft SAPI (text-to-speech)? I have tried to write a program by using SAPI 4.0, however, I got these errors. Can anyone help me how to solve it? Waiting for you sincere reply. Thx a lot. --------------------Configuration: tts - Win32 Debug-------------------- Linking... ttsDlg.obj : error LNK2001: unresolved external symbol _CLSID_TTSEnumerator ttsDlg.obj : error LNK2001: unresolved external symbol _IID_ITTSEnumA ttsDlg.obj : error LNK2001: unresolved external symbol _IID_ITTSBufNotifySink Debug/tts.exe : fatal error LNK1120: 3 unresolved externals Error executing link.exe. tts.exe - 4 error(s), 0 warning(s)

    C / C++ / MFC help debugging tutorial question workspace

  • HotKey in backend process
    V Vickie

    Dear all, I want to write a programe that: 1. A dialog box is prompted at the beginning, but the browser will be activated after the user has input the information in the dialog box. 2. The process of the dialog box is stilling running at the backend. 3. If the user input some HotKey such as Ctrl+q/Ctrl+l/Ctrl+f..., the process of my application can receive these keyboard hotkey command and jump to perform another process. How can I receive these keyboard command and also, how to identifiy the command is equal to Ctrl+q or Ctrl+l...? Looking forward for your reply. Thx a lot!

    C / C++ / MFC question tutorial

  • HTML Parser in C++
    V Vickie

    Thanks a lot for your detailed advice! I am trying to write the parser now! Hope there is good news few days later!

    C / C++ / MFC c++ html question

  • 2D array of CString in MFC
    V Vickie

    Why I need to hate you that you gave me advice? ^v^! Anyway, can I know how to use CStringArray to construct a 2D array? Can you show me how to use and declare it? Thx for your sincere help!

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

  • Using sndPlaySound()
    V Vickie

    But do I need to declare anything else before calling this function, or any objects should be created first? Since I get "undeclared identifier" when calling this function. Thx a lot!

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

  • Using sndPlaySound()
    V Vickie

    Hi all, Do you know how to use the function sndPlaySound() in MFC? I had put it in my program, but it got an error. Is it any header file or other declaration is needed before calling this procedure? Thx for your help!

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

  • 2D array of CString in MFC
    V Vickie

    Hi all, I want to make a 2D array of CString in MFC. Can I know if it is possible and how to declare and make it work?? Thx for your help!

    C / C++ / MFC c++ data-structures help 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