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
K

khb

@khb
About
Posts
49
Topics
14
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to create and maintain HTML file?
    K khb

    I'd recommend to use XML files for logging. There are tons of libraries to modify XML files. You can then use XSL to convert it into a HTML file. If you link the XML file to the XSL file then loading the XML file with a browser automatically shows the desired HTML page. I learned everything form www.w3schools.com/[^]. Kind regards Marcus

    C / C++ / MFC html tutorial question announcement

  • VC++ 6.0 - No Unicode in debug output window
    K khb

    I tried all fonts that I can select in VC6's settings but none did the trick. Is there a way to add new fonts? I never figured out how to do this... Kind regards Marcus

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

  • VC++ 6.0 - No Unicode in debug output window
    K khb

    Thank you for your reply Rajesh. Using L"..." shows correct characters if I just type Latin characters. If I use a message box then, for example, Russian characters are shown correctly but not for the debug window. Do you have any further advice for me? Kind regards Marcus

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

  • VC++ 6.0 - No Unicode in debug output window
    K khb

    Hello together, I'm using VC++ 6.0 for developing a Unicode application. It works fine, but I have a problem with Unicode output in the debug window. As described everywhere, I checked "Tools->Options->Debug->Display Unicode strings" and I use the TRACE0, TRACE1, etc. macros. But Unicode characters are still shown as '?'. Does anyone has a solution for this? Thanks in advance... Kind regards Marcus

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

  • __int64 question
    K khb

    Thanks for the tip! But don't forget to pass in the second parameter of operator>> by reference (__int64& value). Then it works perfectly! Regards Marcus

    C / C++ / MFC help question c++

  • SHFileOperation and Vista64
    K khb

    David, thank you very much for pointing me out that there is a more recent SDK for VC6. The service pack I already have. Kind regards Marcus

    C / C++ / MFC c++ help question

  • SHFileOperation and Vista64
    K khb

    Doesn't matter. This confirms my feeling again that someday I have to buy VS20xy :| Kind regards Marcus

    C / C++ / MFC c++ help question

  • SHFileOperation and Vista64
    K khb

    Then I fear that it won't work. I'm just reading the release notes and they state that the current SDK only applies for VS2005 and VS2008. Anyway, thanks for the hint. Kind regards Marcus

    C / C++ / MFC c++ help question

  • SHFileOperation and Vista64
    K khb

    Wow! This is unawaited :) A long time ago somebody told me that the PSDKs from 2002 and later don't apply to VC6 any more. Therefore I'm still using the Oct. 2001 version. Does the latest SDK really compile for VC6? Thank you very much for your help! Kind regards Marcus

    C / C++ / MFC c++ help question

  • How to remove the carriage return to newline conversion in C.
    K khb

    Lines in files are terminated by "\r\n". You still seem to print out the "\n" after handling the "\r". Kind regards Marcus

    C / C++ / MFC help tutorial question

  • SHFileOperation and Vista64
    K khb

    Hello! I've developed an MFC application with VC++6.0. It still works for Vista32, but when I try to move a file to the recycle bin using SHFileOperation on Vista64 then I get the error code 120(ERROR_CALL_NOT_IMPLEMENTED). I know for Vista I should use IFileOperation, but I'm still using VC++6.0. Is there any way to move files to the recycle bin on Vista64 using VC++6.0? Kind regards Marcus

    C / C++ / MFC c++ help question

  • Can I declare a control based on OS version in .h file?
    K khb

    I'm sorry, I got your sentence "how do we differentiate the OS version (if feasible)" wrong :-O Regards Marcus

    C / C++ / MFC question announcement

  • Can I declare a control based on OS version in .h file?
    K khb

    Determining the OS is not so hard. Take a look at the article "XWinVer - Simple class to get windows OS version" by Hans Dietrich. Regards, Marcus.

    C / C++ / MFC question announcement

  • Addstring function
    K khb

    It depends. If in your case myobj is a member of your dialog where the list box belongs to and if myobj is associated with that list box, then no. If you created myobj in some function locally, then yes. Maybe you can have a look at the MFC Controls -> List controls section for some sample code to study. Regards Marcus

    C / C++ / MFC help tutorial question

  • Addstring function
    K khb

    Before calling Create(...) no window exists for the list box. And you can't add items to the list before creating a corresponding window. See MSDN for how to use the function. Regards, Marcus.

    C / C++ / MFC help tutorial question

  • Addstring function
    K khb

    I guess you have to call the CListBox member function Create(...) before adding items to the list. Regards Marcus

    C / C++ / MFC help tutorial question

  • How do I count CPU cores?
    K khb

    Hi Mike, thanks for your answer. Currently I'm using the code from the article Counting Physical and Logical Processors here on CP. It makes also use of the functions you mentioned. I split up the code on did some tests on the following 2 PCs (I was wrong before: Pentium D has no HT):

    1. Pentium 4, 3.06GHz, Single core, HT
    2. Pentium D 950, 3.40GHz, Dual core, No HT

    I'd like to calculate the following values:

    1. CPUs: 1, #Cores: 1, #Log. CPUs per Core: 2

    2. CPUs: 1, #Cores: 2, #Log. CPUs per Core: 1

    Now the problem: The functions you mentioned return the following values for both(!) CPUs:

    GetSystemInfo.dwNumberOfProcessors: 2
    cpuid HTT bit: Set
    cpuid # logical CPUs per physical CPU: 2

    This shows that it's not possible to distinguish between HT and dual core :(( Regards, Marcus.

    C / C++ / MFC question c++ com tutorial

  • How do I count CPU cores?
    K khb

    Now I'm getting confused ;) I just tried Win32_ComputerSystem. For example, I can get NumberOfProcessors correctly. But I can't get NumberOfLogicalProcessors, it's not in the query result. But this is alright according to MSDN which says about NumberOfLogicalProcessors: Windows Server 2003, Windows XP, Windows 2000, Windows NT 4.0, and Windows Me/98/95: This property is not available. Then I tried Win32_Processor. For example, I can get Name correctly. But I get neither NumberOfLogicalProcessors nor NumberOfCores, they're both not in the query result. But again this is alright, because MSDN states for both properties what I already cited above. Or did I get something completely wrong? Thank you for your patience, David! Regards, Marcus.

    C / C++ / MFC question c++ com tutorial

  • How do I count CPU cores?
    K khb

    DavidCrow wrote:

    These were added for Vista.

    Whoops, I somehow missed that :-O Well, this brings me right back to my initial question: Is there any chance to get the processor specs on non-Vista systems? Regards, Marcus.

    C / C++ / MFC question c++ com tutorial

  • How do I count CPU cores?
    K khb

    DavidCrow wrote:

    This makes no sense. If the members of Win32_Processor are not valid, why would you then state that they should contain the data you're looking for?

    Maybe I understood wrong what MSDN says. I just read: "To determine the total number of processor instances associated with a computer system object, use the Win32_ComputerSystemProcessor association class."

    DavidCrow wrote:

    How are you verifying this?

    Maybe I'm doing something wrong. I compiled the code with VC6 on my single core P4 with HT enabled (Win XP). I also run the program on a dual core Pentium D with HT enabled (also Win XP). In both cases NumberOfCores was not found and NumberOfLogicalProcessors was 0. I guess that the code works, as I can retrieve other members like, e.g., Name correctly. However, I can post the code if you like. Regards, Marcus.

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