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

Vassili

@Vassili
About
Posts
11
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • check if external program runs
    V Vassili

    Hello, is there anybody who knows the command for this? I want to check if a program was shut down by an accident and then start it again (by using CreateProcess). Thanks for any help

    C / C++ / MFC help question

  • Convert CString to char *
    V Vassili

    How can I convert a CString to a char * variable? CString str; char *szBuffer; //code . . . szBuffer = (const char *) str; //why does this not work, and what do I have to do?

    C / C++ / MFC question

  • How to change the caption
    V Vassili

    Does anybody know how to change the caption of the main dialog window dynamicly?

    C / C++ / MFC tutorial question

  • How to 'talk' to an OPC server
    V Vassili

    Hello, I need to link my application to an OPC server (write and read data). I have no idea how to do this. Is there anybody who has a simple example? Is it the same way as using ODBC or is it complete different thing? Do you know any good books or internet links? Thank you in advance

    C / C++ / MFC tutorial sysadmin question

  • How to hide a button?
    V Vassili

    Thanks a lot! Meanwhile I found that it also seems to work with: myB.ShowWindow(SW_HIDE); and myB.ShowWindow(SW_SHOWNORMAL); Is there a difference between myB.ShowWindow(SW_SHOWNORMAL); and myB.EnableWindow( FALSE ); Another question: In my application I do not have any 'OK' or 'Cancel' buttons. But if I press the enter button on my keybord the application terminates... and I don't know why.

    C / C++ / MFC question tutorial

  • How to hide a button?
    V Vassili

    Question: Is it possible to hide and to inactivate a button on a dialogbox if a certain condition has occured?

    C / C++ / MFC question tutorial

  • How to send CString with SendMessage
    V Vassili

    Hi all, does anybody know what the exact syntax is for sending a CString variable with SendMessage? I have tried every thing you can imagine: UINT MyThread(LPVOID arg) { HWND hMain = (HWND) arg; CString text; text = "Hello"; SendMessage(hMain, WM_SEND_HELLO, 0, (LPARAM &) text); } LRESULT CMyDlg::OnSendHello(WPARAM wParam, LPARAM lParam) { CString* text = (CString *) lParam; return 0; } What is wrong with this code?

    C / C++ / MFC question tutorial

  • Termination of a thread
    V Vassili

    Hi again, within the while loop I use the function ReadFile(...). This means that if there is nothing to read from the serial port the process will not step to the next line. It will remain in the ReadFile-step until a new information will come through the port. Because of this I can't use a condition like bContinue. On the other hand only the main program knows when to end the thread. So the question is: is there a way to terminate my thread from the main program? If not then I will have to redesign my complete program :-(

    C / C++ / MFC help question

  • Termination of a thread
    V Vassili

    Yes, it is a worker thread. In my endless while loop I read the serial port. On an port event I send a message to the main program. I also send a message to the main program with the handle of the thread by using GetCurrentThread() UINT TheThread(LPVOID pParam) { HANDLE* pObject = (HANDLE*)pParam; HANDLE hThread; . . . hThread = GetCurrentThread(); SendMessage(pObject, WM_MY_MESSAGE, 0, (LPARAM) hThread); while(1) { //here I read the CommPort . . } return 0; } --In the main Program: LRESULT CMyDlg::MyFunction(WPARAM wParam, LPARAM lParam) { m_hThread = (HANDLE) lParam; //m_hThread is a private HANDLE variable of CMyDlg return 0L; } void CMyDlg::OnWhatEver() { //TerminateThread(m_hThread, -1); //CloseHandle(m_hThread); } If I use TerminateThread((m_hThread, -1) the application disappears but a process is still running which I have to terminate with the Task Manager. If I use CloseHandle(m_hThread) nothing happens... You posted befor that I need simply to exit the thread function - this is exactly what I want to do, but how?

    C / C++ / MFC help question

  • Termination of a thread
    V Vassili

    Hi, I use a thread, whitch I have created with 'AfxBeginThread'. Within this thread I use an endless while loop [while(1) {//do some thing}]. Is it possible to terminate this thread by the thread-caller? All I could find is to use the TerminateThread function but to do this I have to use before the DuplicateHandle function. Unfortunately I was realy not very successfull by trying this. Can anybody help please? Thanks a lot Vassili

    C / C++ / MFC help question

  • Using MScomm32.ocx with Visual Studio.Net
    V Vassili

    Hi, I want to use the AciveX component 'MScomm32.ocx' in my Visual C++ project. The registration of mscomm32.ocx seems to be successful with the command 'rundll32 c:\winnt\system32\mscomm32.ocx, DllRegisterServer', but when I try to insert the ActiveX Component 'Microsoft Communications Control' in the project I get the error message that I have no license. It's obviously because I dont't have VB 6.0 installed on my machine. But is there maybe another activex component available which is able to 'talk' to the serial ports including all the features of mscomm32? Or does somewhere a 'free library exist? Thanks a lot Vassili

    C / C++ / MFC csharp c++ visual-studio com help
  • Login

  • Don't have an account? Register

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