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

Search:

Type: Posts; User: Elrond

Page 1 of 62 1 2 3 4

Search: Search took 0.39 seconds.

  1. Replies
    0
    Views
    3,075

    Scaling issue when replaying metafile

    I am trying to replay a metafile that has been saved on the disk. It works except for one thing. I cannot figure out how to get a proper scaling. If I don't do anything, when drawing the bitmap on...
  2. Re: Why does my bitmap become all black when saved to file?

    Sorry for the late answer as the week end got me going.

    Thanks for the answers, that are correct and working.
  3. Re: Why does my bitmap become all black when saved to file?

    I have put in bold what I believe are all the changes from the beginning. They do produce a usable bitmap file, but in bloack and white only.



    void CreateDrawing()
    {
    CWnd wnd;
    CRect rect...
  4. Re: Why does my bitmap become all black when saved to file?

    This palette thing is a "left over" from the number of attempts I have made to get all this to work. But removing it does not solve the "colour" problem. I still be a black and with bitmap.

    Well,...
  5. Re: Why does my bitmap become all black when saved to file?

    After so many attempts, I have finally solved my problem. I had tried already using memory DC without success, creating the bitmap object at the beginning or the end... The only thing I failed to do...
  6. Re: Why does my bitmap become all black when saved to file?

    Tried it, but my bitmap is still black... :(
  7. [RESOLVED] Why does my bitmap become all black when saved to file?

    I am trying to create a bitmap. This works well as I can obtain the correct result on the screen. But when I am trying to save the bitmap to a file, it become just a black rectangle.

    I have tried...
  8. Replies
    1
    Views
    1,985

    Re: Help with regex

    test = re.findall("_(.+)_", "asdassda_folder_asdswdfd_file_asedswfds")
    The + operator is greedy and will take as much as possible that fits the pattern. Adding the "?" at the end means it will take...
  9. Replies
    3,704
    Views
    620,149

    Poll: Re: Where are we from ?

    pong
  10. Replies
    0
    Views
    3,651

    ValidationRule error only half working...

    I have created a validation rule to validate that the value in a textbox is within a certain range.


    class ValueValidationRule : ValidationRule
    {
    private int _min = 0;
    private int _max = 0;...
  11. Replies
    0
    Views
    2,536

    WH_MOUSE_LL hook freezes on title bar buttons

    I have an application which has a hook on the mouse using WH_MOUSE_LL.



    HMouseHook = SetWindowsHookEx(WH_MOUSE_LL,
    (HOOKPROC)MouseMsgHook,
    pApp->m_hInstance,
    0);

    static LRESULT...
  12. Re: error C2039: 'SetWindowTextA' : is not a member of 'ATL::CStringT

    As I said multiple times, m_NOFR is not a window, it is a string, so you should use the method Format and not SetWindowText. But as you also have to update the data after that, it would be even...
  13. Thread: try catch

    by Elrond
    Replies
    15
    Views
    2,954

    Re: try catch

    And that anyway, *** lindley pointed out, having such an exception means that the code is not correct... ;)
  14. Re: error C2039: 'SetWindowTextA' : is not a member of 'ATL::CStringT

    In my message with the typo, there was a first piece of code. It is the declaration of m_pDialog that you need to add to your class. Then it will know about it.
  15. Re: error C2039: 'SetWindowTextA' : is not a member of 'ATL::CStringT

    I think pretty much all the errors you got come from a typo from my side. You need to put a coma rather than a semicolon int the initialisation list, before "m_pDialog"
  16. Re: error C2039: 'SetWindowTextA' : is not a member of 'ATL::CStringT

    Give me the list of errors and we'll see what we can do...
  17. Re: error C2039: 'SetWindowTextA' : is not a member of 'ATL::CStringT

    What I told you is still correct. If you want the object of type "MySdk2Client" to which the method "SdkDataHasArrived" belong to update the dialog, this object need to know about the dialog.

    Add...
  18. Re: error C2039: 'SetWindowTextA' : is not a member of 'ATL::CStringT

    First, using the "code" tags would make it easier to read your code. Any way:

    class CConnectDlg : public CDialog
    {
    ...
    public:
    CString m_NOFR;
    ...
    };
    This shows that m_NOFR is a CString....
  19. Replies
    7
    Views
    1,004

    Re: For Loop Statement Pattern to use in Parser

    Probably, the thing you should focus on is that the basic for loop is:

    for ( [some expression]; [some expression]; [some expression] ) [some expression]

    You have to find out what is and is not...
  20. Replies
    1
    Views
    504

    Re: Algorithm to add areas

    Show us what you have, i.e. your not so robust algorithm. ;)
  21. Re: error C2039: 'SetWindowTextA' : is not a member of 'ATL::CStringT

    1. We can't see anywhere in the code sample you provide where m_NOFR is coming from. There is part of your code missing (definition of the dialog class from the .h file for a start).

    2. The...
  22. Replies
    11
    Views
    3,221

    Re: Accessing COM EXE-server from diffent threads

    Are you accessing this COM server from all your threads using the same pointer?
  23. Re: error C2039: 'SetWindowTextA' : is not a member of 'ATL::CStringT

    Then again, looking at these lines of code:

    CString m_NOFR;
    m_NOFR.SetWindowText("%d\r", m_frameCount);

    m_NOFR is not a window but a CString, at least in this context.

    You may want to look...
  24. Replies
    3
    Views
    1,109

    Re: How to get the MainFrame object in Document

    CMainFrame* pFrame = static_cast<CMainFrame*>(AfxGetMainWnd());
  25. Thread: Save button MFC

    by Elrond
    Replies
    25
    Views
    11,421

    Re: Save button MFC

    An example for the end of line characters "\r\n"

    If you don't use them, when you open the file with a text editor, everything will be on the same line. If that suits you, that's fine not to use...
Results 1 to 25 of 1529
Page 1 of 62 1 2 3 4





Click Here to Expand Forum to Full Width

Featured