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 |...
Type: Posts; User: HLMetroid
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 |...
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):
...
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...
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...
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...
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...
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...
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...
For automatic double buffering in a Windows Forms application, you can use this:
public Form1()
{
InitializeComponent();
this.SetStyle(ControlStyles.AllPaintingInWmPaint
|...
Thanks, that seems like a short way of doing it :)
Thanks for that, I'll try it out :)
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...
I believe "SelectionChangeCommitted" is the event you want.
Example:
comboBox1.SelectionChangeCommitted += new EventHandler(comboBox1_SelectionChangeCommitted);
void...
Thanks for the responses guys, I'll check out each one and see if they work with what I want to do.
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...
Thanks, it works fine now.:)
Ok, I tried it:
while (true)
{
char selection = cin.get();
cin.ignore();
auto_ptr<Character> Hero;
if ( selection == 'k' or selection == 'K')
...
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...
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 <<...
Thanks for the help, I'll do what you suggested.
Thanks for the help so far.
Ok, I originally had this:
Main.cpp:
/* main.cpp */
#include <iostream>
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...
Ok, thanks for the help.
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
...
Ok, thanks for the quick response.