Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. tmiketx

    Using MessageBox in a WM_PAINT procedure

    WM_PAINT is intended to be a relatively low-level thing - drawing, not calculating and not resizing the window and not allowing menu choices to be made... (it only even gets called when there is absolutely nothing else to do). you should definitely be doing nothing but painting there. After...
  2. tmiketx

    LoadLibrary

    swapped-in text (code) segments are backed by their original code on disk; perhaps the swapper code simply doesn't support any other arrangement. just a guess. let's see... load a dll from over the wire and execute its contents. no, i can't see ANY security issues THERE. <g>.
  3. tmiketx

    URGENT: Parallel running of commands in VC++

    and then into _beginthreadex()....
  4. tmiketx

    Create 2nd console window for debug data

    you could also create a dll contaning a self-contained debug window on a separate thread, and send messages to the window to add debug text. Easy to do, except you either must hardcode the createwindow/createdialog call in the secondary thread or (as i do) the class that handles this mess has...
  5. tmiketx

    using themes on windows xp

    are the dialog controls custom or standard? if they are custom, you should be having them send WM_CTLCOLOR* messages to their parent (ostensibly the dialog box itself) to try to get the correct background brush. (You should also handle WM_ERASEBKGND and zero the background brush field in the...
  6. tmiketx

    Help Reading data from COM port using Win 32 API

    Your code has 1 big bug - you are opening the file for overlapped I/O, but you're not actually HANDLING overlapped I/O. For example, you are treating ERROR_IO_PENDING as a failure, but it is not. It is a normal result of overlapped I/O when there is insufficient data to satisfy your request or...
  7. tmiketx

    Hex String to Decimal Conversion

    a homebrew fragile algorithm that half-works is simple (obviously! haha) but the CORRECT algorithm that works across character sets is in the library functions strtol() and strtoul().
  8. tmiketx

    Function that can take anything as a parameter?

    I cut someone's raise recently when i came across code like that haha... (determining the type of a pointer's target by consulting another argument)
  9. tmiketx

    Static Text gets cut off in a dialog box??

    i work around this problem by using a custom control class instead of the built-in static control, which is REALLY REALLY easy to do. Whenever the custom control is resized or when its text is changed, recalculate its own size. the next WM_PAINT will fix it nice & pretty. I also send a custom...
  10. tmiketx

    Multithread Serial Communication App using Entire CPU Time

    Ideally, all 3 of the basic comm I/O tasks should be performed using overlapped I/O. this can correctly be done with either one thread (doing all comm port I/O, which i have found to work quite nicely) or with up to 3 threads (one for input, one for output, one for status changes, if important)...
  11. tmiketx

    Message Box Position

    are you passing the HWND of the modeless box as the owner of the messagebox?
  12. tmiketx

    Convert from int to char

    never convert numbers using knowledge of the ordinal positions of the numeral inside the character set. it would be like upshifting letters by adding & subtracing the biases into the ASCII uppercase/lowercase sequence. use the library conversion routines instead, as they work for all...
  13. tmiketx

    Occurences of char* in another char*

    whether or not to support multicharacter substrings is a matter for the function's documentation, altho i agree that failing to do so (given that the substring is not a w_char/char argument) is somewhat impolite. whatever you do, just get that call to strlen() out of the loop!
  14. tmiketx

    How to get the default dialog color

    if course, if this is a child window you're painting, you'll want to send the parent the appropriate WM_CTLCOLOR message first and see if you get a handle back; if so, that's the dialog's suggested background color.
  15. tmiketx

    Problem using strings in a constructor

    'string' is in the namespace 'std'. the references to string should read std::string

Part and Inventory Search

Back
Top