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
S

spielehelfer

@spielehelfer
About
Posts
12
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Socket prblem
    S spielehelfer

    maybe you can reverse use the sock.sin_port after the connection has been occured with port = ntohs(sock.sin_port) from the socket.

    C / C++ / MFC sysadmin help question

  • Socket prblem
    S spielehelfer

    something in the back of my brain said: "sock.sin_port = 0" would let the OS select the port....

    C / C++ / MFC sysadmin help question

  • Using _T() and L"" in UNICODE Projects? [modified]
    S spielehelfer

    Be carefull with '' and "" ... can drive you into some problems. :)

    C / C++ / MFC question

  • Right click for open program
    S spielehelfer

    You mean a "right click" on the file in the windows explorer view, where you can select "open with" or similar the application? --> thats a registry "hack"

    C / C++ / MFC

  • Sockets Programming Question
    S spielehelfer

    Well this one is needed as far as I knnow to store the adress you want to listen, f.ex. //adress buildup SOCKADDR_IN lSockAddr; memset(&lSockAddr,0, sizeof(lSockAddr)); lSockAddr.sin_family = AF_INET; lSockAddr.sin_port = htons(8500); lSockAddr.sin_addr.s_addr = INADDR_ANY; and afterwards you can check if all initialize went OK with if(lSockAddr.sin_addr.s_addr ==INADDR_NONE) //error

    C / C++ / MFC question

  • Thread Colsing Problem
    S spielehelfer

    Well I left several part out, thats true. - I thought its well known whats able to fill 'params' with - the Threadobject would be deleted after the loop jumps out, what happens when the thread has ended (I didnt write it, ok). - that the Sleep() is no 100% secure statement for a threadchange ist true - to secure the application for deadlocks, there are several locking mechanism possible so secure shared variables. - WaitForSingleObject has the problem that it locks up the application that calls it if used tirect in a window creating code, thats why i used a loop. Well Im not a code guru, dont think Im one and also theres every time someone that knows more than me :)

    C / C++ / MFC help performance

  • Error when using CSocket with Threading
    S spielehelfer

    Oh interesting, someone else with CSocket and Thread probs.... Had lately also probs with CSocket and CAsyncSocket....sending works fine but no Messages were send/received so I was unable to receive ..... I went back to C based socket communication and there it works

    C / C++ / MFC help

  • Converting a UTF-8 Character in to its euuavalant Unicode Number
    S spielehelfer

    WideCharToMultiByte() MultiByteToWideChar() helps to convert 1byte -> 2byte and other way round data representation things

    C / C++ / MFC tutorial

  • Thread Colsing Problem
    S spielehelfer

    ^^ yep if possible use a timer... otherwise by using a thread: load: ThreadRef = AfxBeginThread(Thread, ¶ms, THREAD_PRIORITY_BELOW_NORMAL, 0, CREATE_SUSPENDED); disable auto delete: ThreadRef->m_bAutoDelete = false; start Thread: ThreadRef->ResumeThread(); then use a global variable to signalize the thread to exit (in Thread func) if(params->pDlg->m_WantExit){ return 1; } and use a own method in the main function to clean up the threads, calld before ending, and also wait till they end. do{ Sleep(1); //jump to thread GetExitCodeThread(ThreadRef->m_hThread,&ExitCode); }while(ExitCode == STILL_ACTIVE); this makes sure that the thread gets canceled correct on end of the main function.

    C / C++ / MFC help performance

  • how to use stl?
    S spielehelfer

    why dont u use the class CString?

    C / C++ / MFC c++ csharp visual-studio debugging help

  • Sizing-End
    S spielehelfer

    Hmm when the resizing stops, the user as released the mouse... maybe you can catch this event and look everytime its called if there had been a resizement. Maybe by a "locking" variable in your "refresh Function" -> Mosedown -> lock enable refresh part not called -> Moseup -> lock release -> refresh/paint

    C / C++ / MFC question css database tutorial

  • Problem with CPropertySheet class
    S spielehelfer

    Hi, I've got some Problems with CPropertySheet in the development of a C++ application in emVC++. Problem is: I have a PropertySheet width 4 pages (all same size 260*92); but they all get cut of at the right side. So I startet do derive a class from CPropertySheet and overwrite the OnInit Method like in this project: Free size and extended styles in CPropertySheets This brought me a few Problems: - the CPropertyPage* pppg = GetActivePage(); causes access violation so I changed it into CPropertyPage* pppg = GetPage(0); (curious from outside, in the dialog class i can use GetActivePage(), inside I only get a 0x0 pointer) - also the pppg->MapDialogRect(rcOriginal); causes access violation and all other Methods that later on uses pppg too. This brings me down to the problem that I cannot read out the PropertyPage size on runtime and have to use fixed values to resize. so only these lines had been left from all the code: BOOL bResult = CPropertySheet::OnInitDialog(); ModifyStyleEx(0, WS_EX_TOOLWINDOW); CRect rcModified; //Tab GetTabControl()->GetWindowRect(rcModified); ScreenToClient(&rcModified); rcModified.right +=50; GetTabControl()->SetWindowPos( NULL, 0,0, rcModified.Width(), rcModified.Height(), SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_NOACTIVATE ); //Sheet GetWindowRect(rcModified); ScreenToClient(&rcModified); rcModified.right +=50; SetWindowPos( NULL, 0,0, rcModified.Width(), rcModified.Height(), SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_NOACTIVATE ); Anyone has an idea why I cannot acces the ActivePage() or also the work with the PropertyPage reference loaded by GetPage(0) causes access violations?

    C / C++ / MFC c++ wpf com help 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