CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: AssafLavie

Page 1 of 10 1 2 3 4

Search: Search took 0.07 seconds.

  1. Re: Dislpying JPG s the backgroud of the Dialog box

    You have to render the JPg on the DC of the dialog window.
    You can use OLELoadPicature/Path (IIRC) to load up JPG's like BMP's and then use the COM interface IPIcture to render it.

    __

    Assaf...
  2. Re: simple: function expects file pointer, but I want a memory stream

    There will be no type-safe way of doing that.
    That's why you should work with FILE pointers and similar C constructs.
    Had you used an ostream& like we do in C++ you would have had no problem...
  3. Replies
    2
    Views
    559

    Re: howto change screen resolution

    That's it.
    thanks.

    here's what I've done with it. The program accepts 3 optional command line parameters and changes the resolution and frequency accordingly (if supported):
    usage:...
  4. Replies
    2
    Views
    559

    howto change screen resolution

    How do I change the screen resolution programmatically on XP or 2K?


    _________________________________
    Assaf Lavie
    -- Rate if it helped --
  5. Replies
    3
    Views
    450

    Re: Exception Handling

    MSVC doesn't support throw specifications.


    _________________________________
    Assaf Lavie
    -- Rate if it helped --
  6. Re: Can you create a file that cannot be deleted

    You can either open the file and not allow access while it's open.
    Or - if you're using NTFS (or any other file system with permissions) you can change the security descriptor and disallow access to...
  7. Replies
    4
    Views
    575

    Re: Double to string

    It's in the FAQ:
    http://www.parashift.com/c++-faq-lite/input-output.html#[15.12]

    _________________________________
    Assaf Lavie
    -- Rate if it helped --
  8. Re: What's the difference between vector and list in STL ?

    A vector is a wrapper arround an array. This means it offers random access iterator that are very fast and can also be used when raw memory pointers are required.
    A list is a wrapper for a linked...
  9. Replies
    1
    Views
    472

    Re: kill a process

    Read about Structured Exception Handling in MSDN.


    _________________________________
    Assaf Lavie
    -- Rate if it helped --
  10. Replies
    1
    Views
    444

    Re: NET MESSAGES URGENT

    If those machines are NT's you can use the NT Messenger service:
    Command Line: net send userName message


    _________________________________
    Assaf Lavie
    -- Rate if it helped --
  11. function template specialization for vectors

    Hi.
    The following yields a compiler error about ambiguity:

    template<typename T>
    void foo(const T&) { };

    template<typename T>
    void foo(const vector<T>&) { };

    int main()
  12. Thread: File

    by AssafLavie
    Replies
    1
    Views
    351

    Re: File

    Read about the FTP protocol.


    _________________________________
    Assaf Lavie
    -- Rate if it helped --
  13. Re: How to Convert std::string to uppercase or lowercase?

    Don't have to be a guru for this ;) :
    #include <iostream>
    #include <algorithm>
    #include <string>
    using namespace std;
    string& upper(string& s)
    {
    transform(s.begin(), s.end(), s.begin(),...
  14. Replies
    4
    Views
    461

    Re: New operater inside template

    The C Run-Time library. When you build your project you can just to link to the CRT statically or dynamically (using a DLL).
    When you want to be able to allocate from one module and deallocate from...
  15. Re: virtual inheritance, dominance and compiler warnings

    You can derive r (for instance) in the 'e' and let it call l::r.

    like so:
    class e : public g, public d
    {
    public:
    void r() { l::r() };
    };
  16. Replies
    1
    Views
    523

    Re: NT/2000 File protections

    I think you can use WMI for that on 2000. If so, it's as easy as it comes.


    _________________________________
    Assaf Lavie
    -- Rate if it helped --
  17. Replies
    1
    Views
    429

    Re: Template Linkage Problem

    That's because you can't put the definition of templates into seperate .cpp files. They have to be inside the header (that's just the way it works).


    _________________________________
    Assaf...
  18. Replies
    4
    Views
    461

    Re: New operater inside template

    There are no special rules or sematics regarding new&delete operators for template (as opposed to 'regular' classes).
    If you're having problem deallocating from a different module perhaps you're not...
  19. Replies
    1
    Views
    678

    Re: Closing all running Browser windows

    If it's IE just close the process iexplore.exe (TerminateProcess).
    Or do the same for any other browser.

    _________________________________
    Assaf Lavie
    -- Rate if it helped --
  20. Replies
    4
    Views
    2,843

    Re: System-wide hook for WM_SYSCOMMAND

    Excellent idea!
    Thanks, it works.

    _________________________________
    Assaf Lavie
    -- Rate if it helped --
  21. Replies
    4
    Views
    2,843

    Re: System-wide hook for WM_SYSCOMMAND

    Thanks for the help.
    The problem with the CBT hook is that it doesn't give me the window handle (or menu handle for that matter). How can I know which window this message belongs to?

    Assaf.
    ...
  22. Replies
    4
    Views
    2,843

    System-wide hook for WM_SYSCOMMAND

    Hi.
    I got a question about catching WM_SYSCOMMAND messages using a hook.
    I've succeeded in installing system wide hooks of several types but non of them seem to
    catch all WM_SYSCOMMAND messages. ...
  23. Replies
    2
    Views
    384

    Re: Need help with STL map !!!

    It would be better if you used a refernce. That way you won't have to pay for the two copy operations:

    LONGVEC& lvLong = m_rangedata[0];
    lvLong[0] += 10;


    _________________________________...
  24. Thread: file exists

    by AssafLavie
    Replies
    11
    Views
    716

    Re: file exists

    in std c++:

    #include <fstream>

    if (std::ifstream("yourfile"))
    {
    // it opened ok.
    };
  25. Replies
    4
    Views
    1,622

    Re: itoa function

    use this:

    template<typename T>
    string ToString(const T& val)
    {
    ostringstream oss;
    oss << val;
    return oss.str();
    };
Results 1 to 25 of 226
Page 1 of 10 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)