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
H

HumanOsc

@HumanOsc
About
Posts
47
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to unlock an application associated file?
    H HumanOsc

    Hehhh, i will precisice my problem, maybe you mitunderstood me... I want to carry out my application with the file association, but generally the file will be locked from the shell... I hoped it exists any shell settings to share the file... :)

    C / C++ / MFC help tutorial question

  • How to unlock an application associated file?
    H HumanOsc

    Hi... I have a App which is associated with an specified file type... So when i execute this data file, my application will be launched... My Problem is that in this situation the data file will be locked and f.e. i can't rename them... Exist any solution to prevent this locking mechanism ? THX... :) -- modified at 13:40 Friday 12th May, 2006

    C / C++ / MFC help tutorial question

  • Handling Events inside a "while" clause
    H HumanOsc

    Ok, sorry it was my fault... Sometimes i mix two different classes... I mean the SelectedItems Property... if(listView.SelectedItems.Count == 0) return; You should check the collection if it's contains items, before you get anyone... Well, in your app in the SelectedIndex_Changed handler... // get sure that one item is selected if(listViewCatalogo.SelectedItems.Count == 0) return; i = listViewCatalogo.SelectedIndices[0]; -- modified at 7:28 Tuesday 14th February, 2006

    .NET (Core and Framework) csharp database dotnet visual-studio graphics

  • Handling Events inside a "while" clause
    H HumanOsc

    1.) You can use the SelectedIndex Property to check if an item is selected... if(listView.SelectedIndex == -1) return; 2.) It's recommend to disabling the updateing mechanism when you are adding items... // disable updating mechanism listView.BeginUpdate(); while(...) { // adding items here } // enable updating mechanism listView.EndUpdate(); By the way you should named you variables more significant... ;)

    .NET (Core and Framework) csharp database dotnet visual-studio graphics

  • TCP port detection/scanning
    H HumanOsc

    Hello again... Look at: http://www.c-schell.de/home/cpp/source/gull.c[^] This an example in pure c... I believe this can be helpful for your problem, too...

    C / C++ / MFC sysadmin question

  • TCP port detection/scanning
    H HumanOsc

    Hello... Look at: http://www.codeproject.com/internet/NagTPortScanner.asp[^] Not very good explained but a smart introducion about TCP SYN scanning... # Best regards... :)

    C / C++ / MFC sysadmin question

  • How to wait for thread & if no response within time abort it
    H HumanOsc

    Hello... Roger Stoltz wrote: if( ::WaitForSingleObject( hThread, 100 ) == WAIT_TIMEOUT ){ ::ExitThread( hThread );}::CloseHandle( hThread ); This is wrong, ExitThread must be always called from that thread which should be end... That means inside the worker thread... When you like to end a thread outside from worker thread then must use GetExitCodeThread and TerminateThread... But in the most situations it exists an better solution...

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

  • Problem with FileIOCompletionRoutine ???
    H HumanOsc

    Hello... This is very guru like solution... :) Big Thx, greets from germany...

    C / C++ / MFC help question

  • How to wait for thread & if no response within time abort it
    H HumanOsc

    Hello... First, You use MFC then you should you use the Threading function from MFC like AfxBeginThread because some MFC internals need to prepared for Threading... When you use the pure API calls in the MFC it can produce unexpected situations and also Memory Leaks... Second, when you use the pure API then always closing the Thread Handle... Third, Use the Sleep function in your worker thread to enforce a context switch this can improve the performance of your app... Fourth... I believe you should read some more articels about threading before you continue your work... :) You can find the most important facts about threading here (especially for MFC) : http://www.codeproject.com/threads/usingworkerthreads.asp[^] Best regards...

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

  • CryptAcquireContext fails on other machines
    H HumanOsc

    Hello... Yes, i believe i have an idea... I think on the other machines it isn't the requested CSP installed (this are dll's which provides cryptography algorithm)... For more information read: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/seccrypto/security/cryptographic_service_providers.asp[^] Best regards...:)

    C / C++ / MFC cryptography help question announcement

  • Global variable prob
    H HumanOsc

    Hello... benjnp wrote: I thought redeclaring the struct will reset all its values or perhaps reinitialize them. No, only without the extern keyword... With the extern keyword you can declare global variables over many files without to reset them... They will be all associated to the first declaration... :)

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

  • Problem with FileIOCompletionRoutine ???
    H HumanOsc

    Hello... I like to implement WriteFileEx / ReadFileEx in one of my classes... Is there any safe way to implement LPOVERLAPPED_COMPLETION_ROUTINE as a (non static) member function ? :doh: Thx... :-D -- modified at 5:09 Wednesday 14th September, 2005

    C / C++ / MFC help question

  • Image dislaying and processing in C#
    H HumanOsc

    Hello... The point of the question is : how portable should be your app... To use Managed DirectX u need to install it... Ok... But Managed DirectX is one possible way to optimize your performance... Another way is to use Platform Invoke from the native Window GDI API... f.e.: the native StretchBlt Function to doing zooming operation... Best regards... ;)

    C# graphics csharp winforms game-dev performance

  • Can not marshal parameter #4: The type definition of this type has no layout information.
    H HumanOsc

    Hello... I believe you forget to define the StructLayoutAttribute for the paramater NETRESOURCE* p... In general it'S Sequential...:)

    Managed C++/CLI help sysadmin json learning

  • read more bytes
    H HumanOsc

    Hello... Try something like this: public MemoryStream Read(int bufSize) { byte[] BufBytes = new byte[bufSize]; MemoryStream stream = new MemoryStream(); /*-- Check Port is Open --*/ if( hComm != INVALID_HANDLE_VALUE ) { OVERLAPPED ovlCommPort = new OVERLAPPED(); int BytesRead = 0; while(ReadFile(hComm, BufBytes, bufSize, ref BytesRead, ref ovlCommPort) != 0 /* or true (based on your interop declaration) */) stream.write(BufBytes,0,BytesRead); } return stream; } Remark: This is code is not tested (it can contains some small bugs but the base concept will work)... ;)

    C# help data-structures question

  • static Method And Thread Safety
    H HumanOsc

    Hello... In other words: 1. Every Thread contains his own stack... 2. Local variables are always stored on the stack from the specified thread (each one have its own copy)... --> The static keyword before functions haves no effect on there locals... :)

    C# help

  • subclassing concept
    H HumanOsc

    Hello... mx483 wrote: What's the difference? Nothing... In front of the subclassing concept... It's only a difference of the design concept... I believe you have read two different solutions of subclassing, the first "used by itself" in the good old c style without inhertance and the other one in c++ with oo aspects... :) Best regards... :)

    C / C++ / MFC question

  • How to get the Font width ???
    H HumanOsc

    Hello Mark... Thx for your comments... It helps me a lot to understand the difference about logical untits and the real size on dc'S... Mark Petrik Sosa wrote: I can't see where you'd use it without a DC I need the width of the font in some calculations of my new app... But before the window is drawing... At this point the explicit creation of a dc handle to retrieve only the width of the font looks very involved... Best regards... :)

    C / C++ / MFC tutorial question

  • How to get the Font width ???
    H HumanOsc

    Hello... Mhhh... Mark Petrik Sosa wrote: Without a DC a real width doesn't exist until it's associated with a DC. I don't understand ? :doh: I think the LOGFONT height it's the height of the font. The size is fixed and independent from the dc... What's the different about the width... When i create a font with a height of 20 pixels then is height from the font on a screen dc different as from the printer dc, but i think it's difference about the resolution and the count of pixel per inch... Can you explain your idea? Best regards...

    C / C++ / MFC tutorial question

  • Problem with "Create a FrameWnd inside a thread"
    H HumanOsc

    Hello again... My solution is based on the great Articel from Joseph M. Newcomer: http://www.codeproject.com/threads/usingworkerthreads.asp[^] This is a very nice Introduction about worker threads. Be carefull about SendMessage, it can also produce unexpected situations like a deadlock from your app... Always prever the use of PostMessage to provide a safe gui access. But Sometimes it's recommend (before or after the end of a worker thread) to get sure thats no (old) messages exists in the message queue. In this situations use PeekMessage, GetMessage and DispatchMessage in main thread to remove (process) all old Message from Queue... Best regards... :-D

    C / C++ / MFC help tutorial 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