Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Problem with project.

  • 19-02-2004 8:20am
    #1
    Moderators, Computer Games Moderators Posts: 4,569 Mod ✭✭✭✭


    Trying to write some code for C++ Builder 4.

    I'm trying to dynamically create images for this GUI for a game editor.

    The problem at the moment is how do I create an image from nothing?

    I can use an image dialog box to choose a file for the desired location, however how do I display that on the screen?

    Any help would be greatly appreciated.

    This is what I have at the moment (I'm using the standard shapes at the moment till I can figure this out)


    void __fastcall TfrmMain::imgMainInterfaceMouseDown(TObject *Sender,
    TMouseButton Button, TShiftState Shift, int X, int Y)
    {
    if (Drawing == True)
    {
    imgMainInterface->Canvas->Rectangle(X, Y, X + 10, Y + 10);
    Drawing = false;
    txtObjectXCoord->Text = X;
    txtObjectYCoord->Text = Y;
    }
    }

    txtObjectXCoord is a text box which displays the X co-ordinates, ditto for txtObjectYCoord.

    Is it possible to copy an image from a file to the C++ window?
    I cant find anything in the help files but then they are pretty ****e (on various occasions they seem to be help files for Delphi).
    Any website links or anything would be awesome either


Advertisement