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
C

Cohen

@Cohen
About
Posts
13
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • DTD and attributes
    C Cohen

    Hmm.. use ID type which quarantees that the values are unique? e.g.

    XML / XSL tutorial

  • Testing tool needed
    C Cohen

    Does anyone know is there a testing tool available which could do the following: While running the application (which is tested) in debug mode the tool collects coverage information which can be saved for later purposes. And here is the catch, it should be possible to compare two sets of coverage information and perform logical operations to them. This way I could for example find out which lines of code were performed in a given test run but not in another and vice versa. It would be nice if the tool had a visual interface which would highlight the differences in the test run coverages (bit like in WinDiff). This kind of tool would be valuable in a situation where a certain way to perform an operation causes an error but another (alternative) way doesn't. With bigger systems it's quite hard to do this manually. The tool should be usable with VC++ 6.0.

    C / C++ / MFC c++ testing debugging beta-testing help

  • Threads and shared basic datatypes
    C Cohen

    Is it quaranteed that operations to basic datatypes are atomic? Or can I safely do the following: INT g_i; void main() { ... // Manipulate g_i also here... ... } DWORD WINAPI ThreadProc(LPVOID lpParameter) { ... g_i++; // Is this safe? ... } I started wondering this after noticed functions such as InterlockedIncrement in MSDN. Where are these functions used? I have always thought that individual increase statement as above are always atomic.. Cohen

    C / C++ / MFC question

  • Automate "New Connection Wizard"?
    C Cohen

    Hi Jeff, You can use the RAS API (Remote Access Service) to solve your problem. There's examples how to use it in MSDN. Cohen

    C / C++ / MFC c++ sysadmin json question workspace

  • How to communicate with Parallel Port
    C Cohen

    Hi, You can use platform SDKs File Storage operations also for writing and reading data from communication resources (such as parallel and serial ports). Check out CreateFile(), WriteFile() and ReadFile() from MSDN. Cohen

    C / C++ / MFC tutorial question

  • Schema problem..
    C Cohen

    Hmm, Would this work? Don't have time to test it :) Cohen

    XML / XSL html database xml help tutorial

  • List Control Header resizing problem
    C Cohen

    Hi there, Are these usefull? http://www.codeguru.com/Cpp/controls/listview/columns/article.php/c1065/[^] http://www.codeguru.com/Cpp/controls/listview/columns/article.php/c1061/[^] Cohen

    C / C++ / MFC question help

  • how to access form controls in another view
    C Cohen

    The CChecklist object you create in the CFruits::OnOK() isn't the same you have subclassed somewhere else in your code. That object isn't subclassed at all and I suppose that this is why you get that runtime error. You could try to do something like this (ain't that pretty though and I'm not sure does this work):

    void CFruits::OnOK()
    {
    
    // Obtain handle to checklists parent here
    
    HWND hCheckMark =
    ::GetDlgItem( ::GetDlgItem(handle_to_checklists_parent, IDC_CHECKLIST), IDC_CHECKMARK );
    
    ::ShowWindow( hCheckMark, SW_SHOW );
    PostMessage(WM_COMMAND,ID_FILE_CLOSE);
    }
    

    Cohen

    C / C++ / MFC question help tutorial

  • C++ Random Question
    C Cohen

    Graham - Slow Rick - Slower Cohen - Slowest :-D

    C / C++ / MFC c++ game-dev help question lounge

  • C++ Random Question
    C Cohen

    rand() returns pseudo random numbers rather than real random numbers. This is why you always get the same value. You can work your way around this by setting the random seed, before you invoke rand(). Seed is a number which is used inside the rand() function to produce the sequence of these pseudo random numbers. So, different seed value gives you different sequence of numbers. Common trick is to give the current time as seed number as this gives you a different sequence each time you run your application. You can set the seed like this: srand(static_cast<unsigned>(time(0))); Make this function call before you use rand() for the first time. If you wan't the numbers be in a spesified range (between 1 and 100) you must use the following line instead of just invoking rand(). random = 1 + (rand() % 100); rand() returns numbers between 0 (?) and RAND_MAX (== big number, depends on you compiler I think) and the above line takes a modulus from the returned value and this conveniently scales the result between 0 and 99. Hope this helps, Cohen

    C / C++ / MFC c++ game-dev help question lounge

  • Debugging a DLL
    C Cohen

    Assuming that I understood you correctly, I think that you should do it the otherway around. Set the executable in project A to the one you compile in project B. This way you can debug your DLL.

    C / C++ / MFC c++ debugging help question announcement

  • Implementation of HTML Help in MFC - Help please!!
    C Cohen

    Lakshmi Priya Musuvathy wrote: error C2065: 'HID_MAINFRAME' : undeclared identifier I'd quess that you simply don't include the header file correctly or that you have a typo somewhere. Should it be IDH_MAINFRAME for example?

    C / C++ / MFC help c++ html tutorial

  • Implementation of HTML Help in MFC - Help please!!
    C Cohen

    Hi, I don't know is it possible to fetch the context IDs programmatically from the CHM-file. I have always used hardcoded values (and the people who have made the help-files have ofcourse used those same values). So, make a header file. e.g. HelpIDs.h where you define the IDs: #define HID_MAINVIEW 100 #define HID_SOMEOTHERVIEW 101 #define HID_YETANOTHERVIEW 102 Then include this file and just invoke html help with the correct id HtmlHelp( GetDesktopWindow(), "helpfile.chm", HH_HELP_CONTEXT, HID_MAINVIEW) ; I have no experience from making the chm-files though..

    C / C++ / MFC help c++ html tutorial
  • Login

  • Don't have an account? Register

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