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

Search:

Type: Posts; User: ingrilli

Search: Search took 0.07 seconds.

  1. Re: How to keep a window drawn when moving it (instead of just an outline)

    Win NT or Plus on Win95 do that for you, so I would not do it if I was you... Alternatively you could do an Invalidate at every move, but that could be problematic, as the modal loop's processing...
  2. Replies
    6
    Views
    888

    Re: Template beginner needs your help!

    When I read my email from last night -- I see I did leave you to desire a better answer... but I think what you said is wrong:
    "The order of the last two destructors is implementation dependant."...
  3. Replies
    1
    Views
    821

    Re: Delete toolbar and status bar

    check out your

    int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
    {
    if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
    return -1;

    if (!m_wndToolBar.Create(this) ||...
  4. Thread: pointers

    by ingrilli
    Replies
    3
    Views
    633

    Re: pointers

    It is not the OS that decides, it is the CPU -- the OS is build on top of that. 32 but CPU's have a 32 bit bus, they can address as much memory as a 32 bit number can.

    To top it off, your...
  5. Thread: right click??

    by ingrilli
    Replies
    3
    Views
    605

    Re: right click??

    You are right, but win 95/nt standards request that you use what Rail Jon Rogut told you to do...
    here is part of the documentation -- not the same as Rclick:

    Remarks
    A window can process this...
  6. Re: DLL function that contains as argument the address of a function implemented on app that uses DL

    Here is what you are asking for


    // 1. In some h file define the type for the function you want the dll
    // function to take in as a param
    typedef int (*PFN_INT_FLOAT) (double);

    // 2. In the...
  7. Replies
    6
    Views
    888

    Re: Template beginner needs your help!

    Ohhh the quest the C++ programmers have had since java was born....

    To be able to use a list of pointers to delete all the objects, you need to have objects with virtual dtors (so all the correct...
  8. Re: My WIndowsHook works fine, but there's a weird problem...

    Can you show your code?
  9. Replies
    4
    Views
    669

    Re: Writing an ScreenSaver

    1. Make your window transparent & maximize it. Now anything you paint looks like a screensaver. You can also make it with a dark background to make it look like an empty screen.

    2. there is a...
  10. Replies
    3
    Views
    1,256

    Re: CEdit::Create()

    you don't need to do a GetLastError:
    after a line of code that would have resulted in a call to SetLastError, all you have to do is watch (shift-f9) for 'err', and that will have the last error code
  11. Re: [q] the difference between ON_COMMAND_EX and ON_UPDATE_COMMAND_UI

    ON_COMMAND_EX essentially allows you to completely take over what MFC is doing -- you can return TRUE to indicate that the command has been handled, otherwise routing will continue to other command...
  12. Replies
    22
    Views
    3,244

    Re: How to import a function from a DLL

    Jaime, maybe you were not on the same wavelength as Dmitriy:
    You have to export your functions & classes for them to be imported elsewhere.
    Here is my latest DLL exporting CHook (this is "Hook.h":...
  13. Re: triggering an event when an application is opened...

    All right -- I tried to get the SetWindowsHookEx function to work cross application but I could not. Here is something that does pretty close to what you wanted: it is a thread that you create...
  14. Replies
    3
    Views
    1,118

    Re: Grey out Button

    What we do in my current project, is we hook up on the kill focus event of all controls, and when that occurs (for any control) we evaluate the apply button status (enabled/disabled) according to...
  15. Replies
    2
    Views
    2,004

    Re: Copy file over network

    Dino Esposito (Visual C++ Windows Shell Programmings) suggest you use SHFileOperation (#include <ShellAPI.h>) -- its worth giving it a try, because it is a shell function, I assume it should be able...
  16. Thread: Set/Get

    by ingrilli
    Replies
    3
    Views
    692

    Re: Set/Get

    Here is how I would do it: a class with static variables to hold your global data, and static Set/Get to access that global var. This way the CPP for the class takes care of initializing all your...
  17. Thread: UI threads

    by ingrilli
    Replies
    2
    Views
    574

    Re: UI threads

    Check out the MFC HWND-CWnd* maps (CWnd::FromHandle and CWnd::FromHandlePermanent)... If I was you I'd rather have the 1ary thread handle the message queue, and the 2ary doing whatever work -- the...
  18. Re: Best way to cast CString into UINT or long

    If the CString is more complicated than just a number, use sscanf or swscanf (wide is better!)
  19. Thread: Mouse control

    by ingrilli
    Replies
    1
    Views
    535

    Re: Mouse control

    Check out the SDKs GetCursorPos & SetCursorPos.
  20. Replies
    1
    Views
    941

    Re: Problem on memory leaks, Help!!

    D:\Fengjc\missons\ocr-1\ctFinal\CharTranDoc.cpp(22) : {43} client block at 0x00791F00, subtype 0, 240 bytes long.
    a CCharTranDoc object at $00791F00, 240 bytes long
    and...
  21. Re: triggering an event when an application is opened...

    check out HSHELL_WINDOWCREATED & HSHELL_WINDOWDESTROYED through Win32 ShellProc.
    Altough I would prefer hooking on process creation which can't be done in a very clean way -- EnumProcess in Win95,...
  22. Replies
    3
    Views
    2,331

    Re: Sleep() v.s. TimeSetEvent() ?!

    I don't see why Sleep() wastes resources...(check out the documentation). On the other hand, it doesn't. The only problem I see with using Sleep(), is that you can't really terminate when you need...
  23. MessageBox not displaying during a rubber-band-ed move window

    Take an generic MFC MDI app where the view is a CFormView.
    Put one button on the form. The butotn creates a thread to send the
    view itself a message. The handler for this message just does a...
Results 1 to 23 of 23





Click Here to Expand Forum to Full Width

Featured