Search Results

Showing results 1 to 40 of 79
Search took 0.01 seconds.
Search: Posts Made By: William Hemsworth ; Forum: C++ and child forums
Forum: C++ 17 Days Ago
Replies: 14
Views: 399
Posted By William Hemsworth
Now you know another, my entire personal library is wrapped in a number of namespaces, without them it would be chaos.
Forum: C++ 18 Days Ago
Replies: 7
Views: 404
Posted By William Hemsworth
I made a little snippet that allows you to directly access the pixels and save it as a .bmp. [link] (http://www.daniweb.com/code/snippet217147.html) I've simplified it a little for you.#include...
Forum: C++ Oct 23rd, 2009
Replies: 11
Views: 388
Posted By William Hemsworth
Maybe re-read the question :) I think he said he has already done that part.
Forum: C++ Oct 20th, 2009
Replies: 4
Views: 238
Posted By William Hemsworth
If you place a static variable inside a function lets say, it is declared once, and is only destructed once the program is closed. For example, try compiling this:#include <iostream>
using namespace...
Forum: C++ Oct 17th, 2009
Replies: 42
Views: 1,801
Posted By William Hemsworth
You can expect it :P
It's a good thing you want to help, but to really help the OP you have to make him learn something, giving him the answer is ultimately making him dumber when he gets his next...
Forum: C++ Oct 14th, 2009
Replies: 11
Views: 328
Posted By William Hemsworth
What did you expect? You copy your question here word for word and expect a solution?
The first thing you do on any new forum is read the rules, you didn't show any effort.

We're here to help you...
Forum: C++ Oct 14th, 2009
Replies: 11
Views: 328
Posted By William Hemsworth
Yup, he should just keep watching this (http://www.youfail.org/YouFailDOTorg.swf) until he gets the message.
Forum: C++ Oct 11th, 2009
Replies: 5
Views: 415
Posted By William Hemsworth
You have to admit, for an 8 year old that's a pretty well presented post compared to some people on here who are in Uni.
Stick to something easier for a while, believe me you're not ready for C++...
Forum: C++ Oct 7th, 2009
Replies: 5
Views: 244
Posted By William Hemsworth
I took this as a challenge, and managed it. I'm sure there's better ways, but.. it work perfectly for me. Compile this code, put your program in the same directory with the correct name, then run...
Forum: C++ Oct 4th, 2009
Replies: 7
Views: 220
Posted By William Hemsworth
Hell do I know? :D
All I did was 30 seconds of googling to come to that conclusion,
I'm sure you can figure it out if you put your mind to it.
Forum: C++ Oct 4th, 2009
Replies: 7
Views: 220
Posted By William Hemsworth
You have to sign your application with a trusted certificate. [link] (http://msdn.microsoft.com/en-us/library/ms247066(VS.80).aspx)
Forum: C++ Oct 4th, 2009
Replies: 8
Views: 209
Posted By William Hemsworth
Ahh crap, I read your code, I just helped you improve a keylogger.
Luckily, it's one of bad quality which wont do any harm.
Forum: C++ Oct 4th, 2009
Replies: 8
Views: 209
Posted By William Hemsworth
Alternatively, you can compile the program as a Windows application, and use
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
instead of int main()
Forum: C++ Oct 4th, 2009
Replies: 8
Views: 209
Posted By William Hemsworth
You put the statements in the wrong order, my code is correct.#include <iostream>
using namespace std;
#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <Winuser.h>

int Save (int...
Forum: C++ Oct 4th, 2009
Replies: 8
Views: 209
Posted By William Hemsworth
Was I asking you?
Forum: C++ Oct 4th, 2009
Replies: 8
Views: 209
Posted By William Hemsworth
Will this do?#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <iostream>

int main() {
ShowWindow( GetConsoleWindow(), SW_HIDE );
std::cin.ignore();
}
Forum: C++ Oct 3rd, 2009
Replies: 7
Views: 415
Posted By William Hemsworth
Damage? I doubt it. The physical memory would quickly run out, and then your pc would automatically free all the memory you allocated when you restart the pc or somehow close it.
Forum: C++ Oct 3rd, 2009
Replies: 6
Views: 299
Posted By William Hemsworth
That's too much to ask for.

If you're very new to programming, you shouldn't have been set a task like this. I wont do it for you, but what I will do is lead you in the right direction. Start by...
Forum: C++ Oct 2nd, 2009
Replies: 6
Views: 299
Posted By William Hemsworth
Assuming this is the defaut Windows API listbox..

Step 1: Find a handle to the window containing the list box. [link] (http://msdn.microsoft.com/en-us/library/ms633499(VS.85).aspx)
Step 2:...
Forum: C++ Oct 2nd, 2009
Replies: 1
Views: 334
Posted By William Hemsworth
Painting Vista controls can be unpredictable because of the Aero theme. If you disable the Aero theme, you will probably find that your code works, however if you want it to work either way, you can...
Forum: C++ Sep 28th, 2009
Replies: 12
Views: 493
Posted By William Hemsworth
>Don't pay any attention to anything Marco93 says
He's right, see those 3 red dots by his reputation? As far as I know, he's the first person to ever accomplish that.

If you want to manage this...
Forum: C++ Sep 10th, 2009
Replies: 8
Views: 347
Posted By William Hemsworth
What did he JUST tell you!


Use code-tags.
Forum: C++ Sep 9th, 2009
Replies: 4
Views: 931
Posted By William Hemsworth
Oh, shut up.
He provided a good link, you didn't.
Forum: C++ Sep 8th, 2009
Replies: 11
Views: 639
Posted By William Hemsworth
You mean you want to know if the button is enabled or disabled?
If so that's easy, here's what i came up with after a couple of minutes of playing around with the windows api.bool enabled =...
Forum: C++ Sep 7th, 2009
Replies: 2
Views: 251
Posted By William Hemsworth
You could start off by NOT SHOUTING.
If you get the handle of that window, using simple Win32 API, you can call GetWindowText.
Forum: C++ Jun 12th, 2009
Replies: 7
Views: 328
Posted By William Hemsworth
It didn't really annoy me at all, especially when you realize that originally that post boosted my rep by 42 points, and thanks to serkan that dropped to 40... :(

Thanks tux, but remember not to...
Forum: C++ Jun 8th, 2009
Replies: 7
Views: 328
Posted By William Hemsworth
Creating a vector of char* is a dangerous thing to do, as if a pointer to a string was added to the vector in a different scope, the data that the pointer is pointing to may not be valid anymore. For...
Forum: C++ Jun 4th, 2009
Replies: 6
Views: 341
Posted By William Hemsworth
>No, YOU write it!
Don't get carried away. I think he was just quoting his question, after all, he did say "Im not here for the codes but rather someone could spur me up so that i can kickstart."
...
Forum: C++ May 26th, 2009
Replies: 12
Views: 517
Posted By William Hemsworth
while(!inFile.eof())Don't use eof() inside a loop like that, simply do what ArkM suggested and do this:while ( inFile >> ascii ) {
cout << (char)ascii;
}Hope this helps.
Forum: C++ May 26th, 2009
Replies: 2
Views: 759
Posted By William Hemsworth
I remember having problems with the wheel scroll, I think the return value is WHEEL_DELTA if the scroll is up, and -WHEEL_DELTA if the scroll is down.

Hope this helps.
Forum: C++ May 25th, 2009
Replies: 4
Views: 318
Posted By William Hemsworth
>what is the - '0' ? I mean I want to know how this works and how does it replace atio()?
Each character has a value in the ascii table, for example the letter 'a' has a numerical value of 97. The...
Forum: C++ May 21st, 2009
Replies: 4
Views: 739
Posted By William Hemsworth
Try using this code instead:PictureBox ^pBox = gcnew PictureBox();

pBox->Parent = this; // 'this' is pointing to our form (the parent)
pBox->Location = Point( 240, 210 );
pBox->Size::set(...
Forum: C++ May 17th, 2009
Replies: 15
Views: 1,010
Posted By William Hemsworth
It saves keystrokes and if used correctly, can increase code readability.enum {
A = 1,
B = 2,
C = 3
};#define A 1
#define B 2
#define C 3enum method saves keystrokes and is more...
Forum: C++ May 6th, 2009
Replies: 7
Views: 645
Posted By William Hemsworth
Split the problem into parts. If it were me, Id first make a function to convert a binary string to an integer, and then a second function to turn the fixed-point binary string into a double...
Forum: C++ May 3rd, 2009
Replies: 2
Views: 422
Posted By William Hemsworth
You can use the default copy constructor, like this:struct myObject {
int data[10];
};

int main() {
myObject a;

/* Do stuff to 'a' */

myObject b( a );
Forum: C++ Apr 23rd, 2009
Replies: 19
Views: 630
Posted By William Hemsworth
Works flawlessly :)
Forum: C++ Apr 22nd, 2009
Replies: 31
Views: 1,243
Posted By William Hemsworth
First of all, the order in which you execute your statements are wrong.return 0;
system("PAUSE");That second line is never executed as the main function returns before it has a chance to.
...
Forum: C++ Apr 22nd, 2009
Replies: 17
Views: 1,016
Posted By William Hemsworth
> Could you please explain this part of the code as it is giving me errors:

Don't just copy and paste what I wrote, use your head :) Change the name list to what ever you called your listbox. But...
Forum: C++ Apr 22nd, 2009
Replies: 17
Views: 1,016
Posted By William Hemsworth
I haven't done Windows Forms for one or two years, but with the help of google... I managed to make this small example for you.System::Void button_Click(System::Object^ sender, System::EventArgs^ ...
Forum: C++ Apr 3rd, 2009
Replies: 4
Views: 374
Posted By William Hemsworth
Huh? o.O if you want a good reply, ask a good question (give details, IDE/Compiler... ect) and explain what you want clearly.
Showing results 1 to 40 of 79

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC