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
N

Nuri Ismail

@Nuri Ismail
About
Posts
290
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Using ON_UPDATE_COMMAND_UI Macro??
    N Nuri Ismail

    You'll need to handle the WM_KICKIDLE message in order to work with ON_UPDATE_COMMAND_UI in your dialogs. Here[^] is a very detailed article on this topic. This[^] CP article might also be useful. :)

    C / C++ / MFC question help

  • how to get all handles of process
    N Nuri Ismail

    Well I already gave you the link to the documentations of two APIs. The usage of GetProcessHandleCount is trivial, documentation says everything you need. For NtQuerySystemInformation you can check out this[^] thread, where you will find a sample code that actually retrieves Handle Count, Thread Count, etc. The example code actually uses ZwQuerySystemInformation[^] function but in fact this does not change anything for you, the usage is exactly the same. P.S. If you actually want to know the difference between 'Nt' and "Zw' prefixed native API functions, have a look at this interesting article[^]. :)

    C / C++ / MFC tutorial question

  • how to get all handles of process
    N Nuri Ismail

    If you want to retrieve the number of opened handles by given process you can use GetProcessHandleCount[^]. Note that minimum supported clients for this function are Windows Vista and Windows XP with SP1. If you want to support older windows versions you can use NtQuerySystemInformation[^]. Look for SYSTEM_PROCESS_INFORMATION class and read the documentation carefully before using this function. I hope this helps.

    C / C++ / MFC tutorial question

  • How i can get the hardware device Driver Information using C#
    N Nuri Ismail

    Check out this[^] useful article from the CodeProject archive. :)

    C# csharp hardware

  • How to increase buffer size for CEdit Box in VC6
    N Nuri Ismail

    Yes Shilpi, you are right. I also didn't know about the voting system at the beginning but after about a week wandering through the forums I realized how things work. :) Thank you very much! Best Regards, Nuri

    C / C++ / MFC tutorial question

  • How to increase buffer size for CEdit Box in VC6
    N Nuri Ismail

    Rajesh, I see that this is a trend. Once their problems are solved, the OPs often forget to vote. :rolleyes: Thank you very much for the vote and the support! Best Regards, Nuri

    C / C++ / MFC tutorial question

  • How to increase buffer size for CEdit Box in VC6
    N Nuri Ismail

    You're welcome! :)

    C / C++ / MFC tutorial question

  • How to increase buffer size for CEdit Box in VC6
    N Nuri Ismail

    Did you try sending EM_SETLIMITTEXT[^] to your CEdit control or calling CEdit::SetLimitText[^]?

    C / C++ / MFC tutorial question

  • get host name from Ip address
    N Nuri Ismail

    You can use: - Dns.GetHostEntry[^] - Dns.GetHostByAddress[^] The second method is obsolete and using the first alternative is recommended but you will see these details in documentation. :)

    C# question

  • ListControl Problem
    N Nuri Ismail

    There are lots of example that might be useful for you. With a quick search in CodeProject archive I found these articles: - Showing the Image file thumbnail view in ListView control using VC++ 6.0[^] - Thumbnails Viewer using ListCtrl[^] - Using thumbnail images in a list control[^] You can find even more articles on this topic. :)

    C / C++ / MFC graphics help

  • Rename a folder?
    N Nuri Ismail

    An alternative to SHFileOperation is using MoveFile[^] or MoveFileEx[^] APIs. These functions can rename either a file or a directory.

    C / C++ / MFC help question

  • Microsoft Mathematics 4.0
    N Nuri Ismail

    Small typo:

    OriginalGriff wrote:

    Recommended specs: 1GB processor

    1 GHz :)

    The Lounge csharp html com tools help

  • Spammer [modified]
    N Nuri Ismail

    Marcus, it was not about the article. It was about an advertisement message (about a skin care cream :-D) from the discussion board of the article. This message is now removed and my link become irrelevant, so I decided to delete the link. Regards, Nuri

    Site Bugs / Suggestions

  • Spammer [modified]
    N Nuri Ismail

    Here [link deleted after the removal of the spam message] - some funny advertisement from him. :)

    modified on Thursday, January 13, 2011 9:58 AM

    Site Bugs / Suggestions

  • Spammer
    N Nuri Ismail

    Some advertising in C/C++/MFC forum. Here[^] is the post.

    Site Bugs / Suggestions c++ com

  • Populate An Array With Numbers.
    N Nuri Ismail

    Here is the problem:

    // You are indexing with "limit", which is the size of your array
    scanf("%d", &numbers[limit]);
    // Change the above line to:
    scanf("%d", &numbers[index]);

    Mike Certini wrote:

    What I have discovered is that I have to input a \o for the program to know that it is the end of my input.

    This is not true. When you enter the limit-th number the loop will end and the program will exit.

    Mike Certini wrote:

    Secondly, I have problems with index variable. When I loop one time or when I press enter after inputing a number, my index number advances to 8. My question is why the index does not advance to 2?

    Actually it is incremented by 1 after each iteration (index++ part of your for loop) but you are indexing with wrong variable (I pointed out this problem at the start of my answer). I hope this helps. :)

    C / C++ / MFC question database visual-studio data-structures

  • HextoCString conversion
    N Nuri Ismail

    You can do this easily using std::ostringstream[^]. Here is a small example for you:

    #include <iostream>
    #include <string>
    #include <iomanip>
    #include <sstream>

    int main()
    {
    // Test numbers - num1 declared as HEX, num2 as DEC
    const unsigned int num1 = 0x1234, num2 = 1234;

    // We will use std::ostringstream for the conversion
    std::ostringstream oss;
    
    // First num to Hex
        // "0x" is optional if you don't need it you can use "oss << std::hex << num1;"
    oss << "0x" << std::hex << num1; 
    std::string strFirstNumHex = oss.str();
        // Clear the content of the string buffer for later use
    oss.str(std::string());
    
    // Second num to Hex
        // "0x" is optional if you don't need it you can use "oss << std::hex << num2;"
    oss << "0x" << std::hex << num2;
    std::string strSecondNumHex = oss.str();
        // Clear the content of the string buffer for later use
    oss.str(std::string());
    
    // First num to Dec
    oss << std::dec << num1;
    std::string strFirstNumDec = oss.str();
        // Clear the content of the string buffer for later use
    oss.str(std::string());
    
    // Second num to Dec
    oss << std::dec << num2;
    std::string strSecondNumDec = oss.str();
    
    // This line prints: Numbers in HEX: 0x1234, 0x4d2       Numbers in DEC: 4660, 1234
    std::cout << "Numbers in HEX: " << strFirstNumHex << ", " << strSecondNumHex << "\\t"
              << "Numbers in DEC: " << strFirstNumDec << ", " << strSecondNumDec;
    
    std::cin.get();
    return 0;
    

    }

    As you can see from the above example strFirstNumHex and strSecondNumHex contain hex string representations of the test integers (strFirstNumHex = 0x1234 and strSecondNumHex = 0x4d2). strFirstNumDec and strSecondNumDec contain decimal string representations of the test integers. If you don't need the "0x" prefix for your Hex strings you can remove this prefix from specified lines in above example. I hope this helps. :) NOTE: For clearing the content of the stream buffer I usually use: oss.str("");, but it messes the formatting of the code block and I changed it to oss.str(s

    C / C++ / MFC

  • how can find how thread running in my application
    N Nuri Ismail

    See here[^]. You can use the code from the link, just need to replace the printf call with conditional check - if the process ID matches your own process ID, obtained via GetCurrentProcessId[^]. :)

    modified on Wednesday, January 5, 2011 6:13 AM

    C / C++ / MFC question json

  • Need to pass private member of a Class as a argument to function of another class and get modified there
    N Nuri Ismail

    Please, do not cross-post. You have already posted the same question in Managed C++/CLI[^] forum. Your question has nothing to do with ATL/WTL/STL. Please stick to Managed C++/CLI forum.

    ATL / WTL / STL csharp c++

  • I wish to complain about certain people gaining MVP status
    N Nuri Ismail

    Congratulations Dave! You well deserved this award! :thumbsup:

    The Lounge xml architecture
  • Login

  • Don't have an account? Register

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