Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Aug 2008
    Posts
    47

    wxWidgets Bitmap Errors

    So, up till this point (excluding the fact that the new version of wxWidgets was incompatible with the VTM) everything has been mostly fine, but now I've run into another error that I can't quite fix. The program won't load bitmaps when I try. That is, it says that it can't find the bitmap file, and asks me to check the .rc file, which doesn't exist. It gives me the error when I try to move the mouse over the window to draw the bitmap I made.

    This is the code that I have:

    Code:
    void MainFrame::OnMotion( wxMouseEvent &event )
    {
    	wxPoint mousePos = event.GetPosition();
    
    	wxClientDC dest(paintWindow);
    	
    	wxString myImage(_T("smallBMP.bmp"));
    
    	wxBitmap myBitmap(myImage);
    
    	//dest.DrawBitmap(myBitmap, mousePos, false);
    
    	/*
    	dest.SetPen(wxPen(wxColour(255, 255, 255)));
    	dest.SetPen(*wxWHITE_PEN);
    	dest.SetBrush(wxBrush(wxColour(65, 34, 76)));
    	dest.DrawCircle(mousePos, 10);
    	*/
    }
    I'd really appreciate help, if possible.

  2. #2
    Join Date
    Nov 2006
    Location
    UK
    Posts
    3,774
    I hadnt tried WxWidgets till last week and like a muppet I downloaded the new ones and the instructions dont work the project it said to load wasnt there, I found a batch file designed to build the msvc version, so I ran it, it seemed to complete, only, following the test example from the thread - it didnt work.. So, I kinda ran away grumping.
    Delphi !ROCKS!
    Got a question? Read this first!!!
    "You gotta help us, Doc. We've tried nothin' and we're all out of ideas"

  3. #3
    Join Date
    Mar 2008
    Posts
    394
    Should this line:

    Code:
    wxString myImage(_T("smallBMP.bmp"));
    Not be:
    Code:
    wxImage myImage(_T("smallBMP.bmp"));
    I might be wrong, but that's what I have, and it seems to find it fine for me Hope it helps.

  4. #4
    Join Date
    Aug 2008
    Posts
    47
    Quote Originally Posted by Khalhern View Post
    Should this line:

    Code:
    wxString myImage(_T("smallBMP.bmp"));
    Not be:
    Code:
    wxImage myImage(_T("smallBMP.bmp"));
    I might be wrong, but that's what I have, and it seems to find it fine for me Hope it helps.
    Oh, thanks, that works! I thought I tried that already...guess no though.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •