Search:

Type: Posts; User: HLMetroid

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: C# and hex

    by HLMetroid
    Replies
    2
    Views
    3,723

    One way you can do it is after you've called...

    One way you can do it is after you've called rtfMain.LoadFile(), convert the text in rtfMain to hex.

    I found a function online that converts a string to hex:
    C# - Convert ASCII String To Hex |...
  2. Replies
    4
    Views
    17,743

    You can use the RotateAt()...

    You can use the RotateAt() method of a matrix if you want to rotate around a specific point.

    Here's a quick example on how you might go about doing it for an image (based on the MSDN sample):

    ...
  3. Replies
    5
    Views
    5,879

    To get the HWND of the listview you can use its...

    To get the HWND of the listview you can use its Control ID in conjunction with GetDlgItem() (where hDlg is the listviews parent handle, and nIDDlgItem is the Control ID of the listview). Since the...
  4. Replies
    13
    Views
    4,864

    I'm just interested in knowing if my way of using...

    I'm just interested in knowing if my way of using a single loop with a 2D array is considered to be an optimal way of doing it (in the right situation), or if someone knows of a better way and is...
  5. Replies
    13
    Views
    4,864

    Thanks for the help so far everyone. Do...

    Thanks for the help so far everyone.



    Do you think the way I'm doing it here is an optimal way of doing it, or is there a faster way? Note: The console app is just to demonstrate the method...
  6. Replies
    13
    Views
    4,864

    Displaying 2D array faster

    I've been displaying my game map (which draws only what is contained in the bounding box) like so (C#):


    // X, Y, Width, Height
    Rectangle rect = new Rectangle(1, 1, 3, 3);

    char[,] map = new...
  7. Replies
    4
    Views
    3,525

    Have you tried this? How to: Draw Images with...

    Have you tried this?

    How to: Draw Images with Transparency

    It uses an overload of DrawImage() that takes an image attribute and you can use imageAttribute.SetColorKey() to set the transparent...
  8. Replies
    0
    Views
    1,673

    Restricting C# Script

    I'm using C# as a scripting language (through Reflection), and I've run into a problem. I want users to be able to make their own GUI's through Windows Forms, but I don't want them to be able to...
  9. Replies
    3
    Views
    5,715

    For automatic double buffering in a Windows Forms...

    For automatic double buffering in a Windows Forms application, you can use this:


    public Form1()
    {
    InitializeComponent();
    this.SetStyle(ControlStyles.AllPaintingInWmPaint
    |...
  10. Replies
    4
    Views
    1,413

    Thanks, that seems like a short way of doing it :)

    Thanks, that seems like a short way of doing it :)
  11. Replies
    4
    Views
    1,413

    Thanks for that, I'll try it out :)

    Thanks for that, I'll try it out :)
  12. Replies
    4
    Views
    1,413

    Accessing member variables of a list

    Hey everyone, I've been wondering about this, but can't find anything about it.

    Basically, I've got a class, and a list of that class:


    public class Person
    {
    public Rectangle...
  13. Replies
    5
    Views
    9,839

    I believe "SelectionChangeCommitted" is the event...

    I believe "SelectionChangeCommitted" is the event you want.

    Example:


    comboBox1.SelectionChangeCommitted += new EventHandler(comboBox1_SelectionChangeCommitted);

    void...
  14. Replies
    4
    Views
    2,369

    Thanks for the responses guys, I'll check out...

    Thanks for the responses guys, I'll check out each one and see if they work with what I want to do.
  15. Replies
    4
    Views
    2,369

    Reading and writing to an embedded file

    Hey guys, I've been thinking about this for a while, but I can't find any way on how to do this.

    Basically what I want to do is have an embedded file in my program, that can be written to. This...
  16. Replies
    6
    Views
    1,449

    Thanks, it works fine now.:)

    Thanks, it works fine now.:)
  17. Replies
    6
    Views
    1,449

    Ok, I tried it: while (true) { ...

    Ok, I tried it:


    while (true)
    {
    char selection = cin.get();
    cin.ignore();
    auto_ptr<Character> Hero;
    if ( selection == 'k' or selection == 'K')
    ...
  18. Replies
    6
    Views
    1,449

    Is this way of doing it alright, or is there a...

    Is this way of doing it alright, or is there a better way?



    while (true)
    {
    char selection = cin.get();
    cin.ignore();
    auto_ptr<Character> Hero(new...
  19. Replies
    6
    Views
    1,449

    Passing object to function outside of loop

    Is there a way to pass an object/pointer to object to a function outside of a loop?

    eg.



    int main()
    {
    cout << "Welcome. Please choose your class:\n\n";
    cout <<...
  20. Replies
    6
    Views
    1,199

    Thanks for the help, I'll do what you suggested.

    Thanks for the help, I'll do what you suggested.
  21. Replies
    6
    Views
    1,199

    Thanks for the help so far. Ok, I originally...

    Thanks for the help so far.

    Ok, I originally had this:

    Main.cpp:


    /* main.cpp */

    #include <iostream>
  22. Replies
    6
    Views
    1,199

    Including objects from another file

    I'm not exactly sure on how to do this, or if it's possible.

    I have a main.cpp which is the main loop. I then have a battle.cpp & .h which defines a class called Character.
    And lastly I have an...
  23. Replies
    2
    Views
    7,687

    Ok, thanks for the help.

    Ok, thanks for the help.
  24. Replies
    2
    Views
    7,687

    Define Header File

    I have read a few ways to define a header file. What is the right way to do it?

    This is from the C Programming Preprocessor tricks:

    http://www.cprogramming.com/tutorial/cpreprocessor.html


    ...
  25. Replies
    4
    Views
    1,500

    Ok, thanks for the quick response.

    Ok, thanks for the quick response.
Results 1 to 25 of 26
Page 1 of 2 1 2