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

Search:

Type: Posts; User: ovidiucucu

Page 1 of 80 1 2 3 4

Search: Search took 1.92 seconds; generated 52 minute(s) ago.

  1. Re: ShellExecute tries to launch .exe everytime even though it is already runniong.

    Here are few ways to find out if the second application is already running:

    get a list running processes and see if one having the given image name is among them. Here you can find hints about...
  2. Thread: sendmessage

    by ovidiucucu
    Replies
    4
    Views
    2,137

    Re: sendmessage

    First of all, there's no BN_CLICK message identifier defined in Windows headers. Unless you are defined your own, you've probable referred to BN_CLICKED, which also is not a message identifier, but a...
  3. Replies
    5
    Views
    2,698

    Re: Get a *.bmp file of a window´s view

    As Victor already suggested, an easy way to save a bitmap in a file is by using CImage MFC/ATL-shared class.
    Here is a simplified example which saves the client area of a window (view).

    void...
  4. Replies
    28
    Views
    8,489

    Re: Help with mfc

    You are welcome!

    [off-topic]
    Just joking a little bit: if I had to deal with that (legacy) code, I would be tempted to hit the monitor with the keyboard. :D
    But no problem, everything can be...
  5. Replies
    28
    Views
    8,489

    Re: Help with mfc

    And about moving the child windows (controls) inside the client area of the parent...

    One easy method is to get the client area of the parent (call CWnd::GetClientRect), calculate the the child...
  6. Replies
    28
    Views
    8,489

    Re: Help with mfc

    Returning to our sheep...

    First note that all Windows controls like buttons, list boxes, combo boxes, and so on are windows, as well. You can see that in plain WinAPI: all are created by a call...
  7. Replies
    28
    Views
    8,489

    Re: Help with mfc

    Aside note...

    Dealing with legacy projects is not an easy task and requires some knowledge and experience. Simply getting tweaks from old sources is not enough. This particular case requires at...
  8. Replies
    28
    Views
    8,489

    Re: Help with mfc

    You've probably got the "System" font, which size can be modified only from the system settings. Or can be another font that does not support the size you have provided.
    Anyway it's not a good idea...
  9. Replies
    28
    Views
    8,489

    Re: Help with mfc

    At a first look, your sample code contains not any MFC stuff. For example, TDC seems to be a Borland's OWL Library class and further are called just plain WinAPI functions (not MFC). I know,...
  10. Replies
    6
    Views
    1,820

    Re: Do not understand conditional in for loop

    It doesn't compile? And what the compiler says?
  11. Re: Opening .xlsx file in Excel programmatically

    As Victor already stated, we can do the magic by using Excel Automation. Here is an example:

    void CExcelRunnerApp::OpenWorkbook(const CStringW& strFile,
    const CStringW& strPassword,
    BOOL...
  12. Thread: postmessage

    by ovidiucucu
    Replies
    8
    Views
    1,871

    Re: postmessage

    Thank you, Victor!
    Just to add a method in which the receiver doesn't need to delete: using of smart pointers, i.e. std::unique_ptr since C++11.
    Here is an example:


    void...
  13. Re: PRIMARY KEY vs. UNIQUE restrictions in MySQL

    In SQL language, NULL simply means "unknown value" or "not yet set value". Because a primary key is intended to (unique) identify a record in a table, a NULL PK has no sense, so is not permitted.
  14. Re: How to capture the screen of a window that contains transparency?

    Neither Snipping Tool nor Print Screen resolve the problem if the window is covered by another. Please, read carefully the original post!
  15. Replies
    2
    Views
    3,605

    Re: How to fix Rect & DrawText?

    DrawText takes an argument which is the rectangle in which the text is to be drawn. You probably enlarged the font size without adjusting that rectangle. You can determine the width and height of the...
  16. Re: executable behaving differently when launched via shortcut?

    I can guess you are using or passing to the third party library paths relative to the application/process current directory (e.g. ".\data", "..\data" or just the file name). The current process...
  17. Thread: postmessage

    by ovidiucucu
    Replies
    8
    Views
    1,871

    Re: postmessage

    Taking a look in your sample code...


    ::PostMessage( dlghandle , WM_SOMEMSG , (WPARAM)&s, 0 );
    PostMessage( WM_SOMEMSG , (WPARAM)&s, 0 );

    ...I have to add a little but important note, beside...
  18. Replies
    0
    Views
    18,826

    STL: What is Filesystem Library?

    Filesystem Library can help you you to easily perform operations on file systems components, such as paths, regular files, and directories. It was initialy developed in boost library and introduced...
  19. Transparent SDI View by using Layered Windows

    Here it is step-by-step!

    1. Define a "transparent" color, preferable in the application's class header.

    // ...
    #define TRANSPARENT_COLOR RGB(1, 2, 254)
    2. In the main frame class...
  20. Transparent SDI View by Using Window Regions

    Override CFrameWnd::RecalcLayout and...

    class CMainFrame final : public CFrameWnd
    {
    // ...
    // Overrides
    virtual void RecalcLayout(BOOL bNotify = TRUE);
    // ...
    };
    ...after...
  21. Replies
    9
    Views
    11,901

    Re: How are these controls created ?

    Well, using the "thousands" word here is a little bit exaggerated. :)
  22. Re: C or C++ equivalent to Java 2D graphics functionality

    I know many projects developed for years using cross-platform libraries, but never targeted other OS than Windows.
    IMO, the most optimal approach is to write as much as possible cross-platform code...
  23. Replies
    6
    Views
    4,567

    Re: Hello world prgram not runing

    @Ketanco
    Have you created a Windows Console Project or is something else?
    35611
  24. Re: C or C++ equivalent to Java 2D graphics functionality

    If the target OS is Windows, the best choice is Direct2D libray.
    You can directly use Direct2D COM interfaces or, much easier, the MFC Support for Direct2D.

    See

    Direct2D
    MFC Support for...
  25. Re: Dynamic Library: Do you need to export variables of a class?

    That's a very good reason.
Results 1 to 25 of 1986
Page 1 of 80 1 2 3 4





Click Here to Expand Forum to Full Width

Featured