Skip to content

C / C++ / MFC

C, Visual C++ and MFC discussions

This category can be followed from the open social web via the handle c-c-mfc@forum.codeproject.com

111.5k Topics 465.7k Posts
  • Dll required to run exe ?

    help c++ question
    2
    0 Votes
    2 Posts
    0 Views
    U
    you can compile the exe file with the dll static linked,you just need to open the settings of the project then change the link options to WITH MFC STATIC LINKED ,compile it ,that is ok!
  • Problems to get double from CListCtrl...

    com help question
    2
    0 Votes
    2 Posts
    0 Views
    M
    The _tcstod() family of functions convert from a string to a double.
  • Copy files........

    c++ com tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    M
    Copying files is an OS-dependent operation, so it's not part of C++ itself. On Windows, you use the MoveFile() and CopyFile() functions to move/copy files.
  • Arp question?

    c++ question tutorial workspace
    2
    0 Votes
    2 Posts
    0 Views
    L
    you may be intersted in looking at the SNMP Without SNMP sample from Felix Kasza's Win32 Samples http://www.mvps.org/win32/network/snmp.html Hope it will help Alfadhly
  • Internet

    c++
    5
    0 Votes
    5 Posts
    0 Views
    L
    Hi Alex, to add to your answer. I have noticed a common mistake most people fall in they forget to target the correct url for example if they have an in box called Lastname and a submit button named Send in an asp page called page1.asp they would send their post Request as follow using telnet connect to www.anyserver.com port 80 then they would send the following ascii lines // SNIPP POST /page1.asp HTTP/1.1 Content-Length: 28 [empty_line] lastname=Alfadhly&Send=Submit [empty_line] // SNIPP although these steps are correct since it includes the three most importent pieces of the post i.e 1) POST command and the target url plus the protocol version 2) The conent length header of the data in the request 3) the data it self e.g lastname=Alfadhly [NOTE:] I have ommited other headers such as referer and Host, and Cookies ] if they are used in the aps page Most programmers tend to forget to look at the source of the asp page and forget thaat the target should be the one identified by the ACTION parameter of the post I hope this might help
  • E-TEAM

    c++ com linux collaboration question
    9
    0 Votes
    9 Posts
    0 Views
    G
    >cvs is kinda like "rcs" on Unix/Linux, yes? Except that is supports concurent development. That means that no locks are necessary, and many peoples can work on the same files at the same time, then CVS merges the things... >I hope we can get a nice user-friendly UI to go with it... WinCvs: www.wincvs.org CVS has a good solutions for internet development. In fact WinCvs itself is developed that way as well as CVS of course...
  • Coloring the PropertySheet

    tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    K
    Hi do something like HBRUSH CMyDlg::OnCtlColor(CDC *pDC, CWND *pWnd, UINT nCtl) { if (CTLCOLOR_STATIC == nCtl) // or CTLCOLOR_EDIT { int i = GetDlgItemInt(pWnd->GetCtrlID()); if (0 > i) pDC->SetTextColor(RGB(255, 0, 0)); ) return CDialog::OnCtlColor(pDC, pWnd, nCtl); }
  • Problem is registering a dll??

    c++ help question announcement
    4
    0 Votes
    4 Posts
    0 Views
    M
    thanks. I read this article in MSDN and thought that I dont have latest version of comcat.dll but i installed SP5 on my machine.
  • Clearing Disk Cache

    performance help question
    2
    0 Votes
    2 Posts
    0 Views
    G
    Do you mean you want to test or speed up the process launch and you find your process is already cached in the windows cache? FlushInstructionCache -> Process instruction cache is flushed (but not the data) FlushFileBuffers -> Call this for every open file handle and all writes are performed. (purges write cache) use FILE_FLAG_WRITE_THROUGH in the file create or open call. (disables write caching) more interesting than the above blabla is http://www.sysinternals.com/cacheset.htm
  • Printer monitor project

    sysadmin help tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Docking without MFC

    c++ tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Searching/replacing text in large text files

    algorithms question
    2
    0 Votes
    2 Posts
    0 Views
    D
    Look. I've worked with large files - it was 0.5 GB - 1.5 GB. It was realy large and search and replace took hours with DOS-made program. To impove it I compiled another program. One of the ideas was - first allocate enough memory. You probably can allocate all 4 MB in memory. Second, the program will work much faster if it will work not with bytes, but with DWORD. So, I packed chars in DWORDs by 4 where it was possible. Third, check only first DWORD, if it is equal, compare all. Make a loop with offset by DWORD. After you passed all file, increment it, and so three times to make full search. This algorithm a litle bit more complicated, but I've got speed of like it was just read and write - something like 10-15 minutes. Hope this will help.
  • Problem with PreTranslateMessage!!!

    help question
    2
    0 Votes
    2 Posts
    1 Views
    D
    Why do not try WindowProc() instead of PretranslateMessage()?
  • System menu activation from a CDialogBar

    help question c++ tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • How do i Convert RGB to 8 bits DIB..?

    question
    2
    0 Votes
    2 Posts
    0 Views
    C
    convert 24-bit to 8-bit + a palette (hard) 2) allocate memory for the DIB (easy) 3) fill in the BITMAPINFOHEADER (easy) 4) fill in the DIB's palette (easy) 4) copy each row of the 8-bit image to a row of the DIB image, insuring that each row of the DIB is padded to make the width of each row a multiple of 4 BYTEs. remember that DIBs are stored vertically flipped, compared to most images. (not too hard, not too easy) or... (shameless plug) visit http://www.smalleranimals.com/isource.htm
  • Ways of identifing a single computer

    c++ windows-admin question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • How to render a textured NURBS surface?

    tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • MSHFlexGrid

    c++ question help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Slider background

    question graphics
    2
    0 Votes
    2 Posts
    0 Views
    B
    Hi 1. Add a Slider to your App 2. Add a New Class with Class Wizard derived from CSliderCtrl 3. Again with the class Wizard and A member variable for your control mapping it to your NewSlider Class 4 Edit your New Slider Class 's OnPaint function To Change The ThumbRect, SliderChannel, Background etc, 5, Add a KillFocus function and Add Invalidate(TRUE); You can change the shape, color and size of the thumbrect as it moves along the slider, or you can make the sliderchannel pulse with movement Or you could animate the thumb control when clicked by the mouse The options are only limited by the aesthetics Regardz
  • E-TEAM

    c++ collaboration help question
    3
    0 Votes
    3 Posts
    0 Views
    F
    I'd like to think that another purpose of this group would be to help each other learn new things. Of course not everyone knows everything about everything, so this would be a great learning experience for all of us. :) Frank