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
I

Ilushka

@Ilushka
About
Posts
9
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • DLL Hell Going From Win2000 to XP
    I Ilushka

    msvcr70d is obviously a debug library. I wonder if he tried to build a release. ;) Sincerely yours, Ilya Kalujny.

    C / C++ / MFC help csharp com question

  • Problems with WM_VSCROLL PostMessage
    I Ilushka

    Do exactly as you`ve been told, and mind that the SB_PAGEDOWN could be used too. Sincerely yours, Ilya Kalujny.

    C / C++ / MFC question

  • Why use Multi-thread Servers?
    I Ilushka

    forget window-message notification for a number of users up 100. It`s going to kill you machine ;) Sincerely yours, Ilya Kalujny.

    C / C++ / MFC sysadmin performance question learning

  • run an executable located in a memory buffer
    I Ilushka

    rough :) Sincerely yours, Ilya Kalujny.

    C / C++ / MFC performance question

  • Help on List View
    I Ilushka

    You can set a column name via numerous different ways - starting from filling LVITEM structure and sending a message to control. Anyway: all those ways use something like "iSubItem" - and thats the number of column to accomodate the text. Dont have MSDN by my hands - take a look there. Sincerely yours, Ilya Kalujny.

    C / C++ / MFC question help

  • TCP/IP Question
    I Ilushka

    Thats simple. :) Send expects a [long constant pointer to TCHAR] variable, so just putting somthing of type byte isn`t right. still, the second parameter of .Send is a length of data to be sent, thats it in TCHARs. So make it that way: Suppose you have a BYTE g_aBytes[1024]; filled with some interesting bytes and you want to send 651 of them. just make a call like that: iSent = m_sConnectSocket.Send((LPCTSTR) g_aBytes, 651); here you do s old-style C cast from array of bytes to LPCTSTR. Also you expicitly tell the socket how much data you`d like to send. That`ll do the trick, unless you dont use UNICODE. :) In general , from your post i see you`re not much expirienced in C++ programming. I recommend some serious reading - for example Bjane Stroustroup C++ programming language third edition. Be good, Sincerely yours, Ilya Kalujny.

    C / C++ / MFC c++ sysadmin help question lounge

  • C++ Function objects - how to use them?
    I Ilushka

    Hi All! Here goes the question: Mr. C++ has cleary descibed how to use function objects in Parhagraph 18.4 of his Book. The Sample code works OK, and if i use them with STL, everything`s OK Here is a simple sample: void Add7(int& out_Int) { out_Int += 7; } class AddNumber { public: int m_iToAdd; AddNumber(int in_iToAdd = 0) { m_iToAdd = in_iToAdd; } void operator()(int& out_Int) { out_Int += m_iToAdd; } }; class A { public: std::vector < int > m_vData; }; void main() { A tmp_a; tmp_a.m_vData.push_back(7); tmp_a.m_vData.push_back(5); tmp_a.m_vData.push_back(6); std::for_each(tmp_a.m_vData.begin(),tmp_a.m_vData.end(),Add7); std::for_each(tmp_a.m_vData.begin(),tmp_a.m_vData.end(),AddNumber(13)); } --- But when i try to use them some other way than in combination with STL, I get that: typedef void (*TraveseFuncPtr) (int&); void Add7(int& out_Int) { out_Int += 7; } class AddNumber { public: int m_iToAdd; AddNumber(int in_iToAdd = 0) { m_iToAdd = in_iToAdd; } void operator()(int& out_Int) { out_Int += m_iToAdd; } }; class A { public: std::vector < int > m_vData; void TraverseVector(TraveseFuncPtr in_func) { for (int i = 0; i < m_vData.size(); i++) { (*in_func)(m_vData[i]); } } }; void main() { A tmp_a; tmp_a.m_vData.push_back(7); tmp_a.m_vData.push_back(5); tmp_a.m_vData.push_back(6); tmp_a.TraverseVector(Add7); // All ok. tmp_a.TraverseVector(AddNumber(13)); //C2664 } --- And thats it. error C2664: 'TraverseVector' : cannot convert parameter 1 from 'class AddNumber' to 'void (__cdecl *)(int &)' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called I tried to dig up STL source but hell the same for_each takes a CLASS (!) as a template parameter. No functions there. Who can say anything to this? Sincerely yours, Ilya Kalujny.

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

  • Need a hint on implementing path picker WTL control.
    I Ilushka

    Yeah, but isnt it modal? When i try to use it like this: BROWSEINFO bi = { 0 }; bi.lpszTitle = _T("Pick a Directory"); bi.hwndOwner = m_hWnd; LPITEMIDLIST pidl = SHBrowseForFolder ( &bi ); if ( pidl != 0 ) { // get the name of the folder TCHAR path[MAX_PATH]; if ( SHGetPathFromIDList ( pidl, path ) ) { } // free memory used IMalloc * imalloc = 0; if ( SUCCEEDED( SHGetMalloc ( &imalloc )) ) { imalloc->Free ( pidl ); imalloc->Release ( ); } } I Get a modal dialog that is definitely not what i want :( Well, if only i had a possibility to modify that dialog somehow (ie. insert my onw controls and write according handlers) that would be nice, but how?? More hints pleaaaase :) Sincerely yours, Ilya Kalujny.

    ATL / WTL / STL c++ data-structures json help question

  • Need a hint on implementing path picker WTL control.
    I Ilushka

    Subject. :) I just cant think of where to start from. I guess i should inherit WTL CTreeViewCtrl, and add functionality for parsing computers directory tree. So would you be so kind to give me links to samples of doing that? Any help would be appreciated, thanks. Sincerely yours, Ilya Kalujny.

    ATL / WTL / STL c++ data-structures json 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