Yeah, MSDN is great, none of my Windows programming projects would go anywhere without it (I mean come on, who can actually remember the parameters to CreateWindow?). Just search for any structure or...
Type: Posts; User: ubergeek
Yeah, MSDN is great, none of my Windows programming projects would go anywhere without it (I mean come on, who can actually remember the parameters to CreateWindow?). Just search for any structure or...
Visual Basic is for programming in Visual Basic, not C++. What specific trouble are you having with VC++?
Handle the WM_ACTIVATE message, and when the wParam is WA_INACTIVE, save the active control handle (GetFocus(), that is) somewhere, and when the wParam is WA_ACTIVE or WA_CLICKACTIVE, set it back to...
Handle the BN_CLICKED notification in your WM_COMMAND handler.
Here is what happens:
1. user clicks on edit box
2. edit box sends an EN_SETFOCUS notification to parent window, through the WM_COMMAND message (look it up on MSDN for more info)
3. your...
There are a couple of ways. Most direct is the TerminateThread function. This is basically brute-force kill the thread, no questions asked. Note that this is NOT recommended a number of reasons: for...
So in your inner loop, you need to check all the values in the vector except the current one -- the definition of a duplicate. I modified your code a bit:
for ( int i = 0 ; i < friends.size...
read the random number tutorial right here on cprogramming.com :P
http://www.cprogramming.com/tutorial/random.html
this is what you need to do: var = rand() % (HIGH - LOW + 1) + LOW;
var is the...
foo is just the generic example variable name etc. like if someone is explaining pointers sometimes they will make an example like:
int foo = 5; //this is an int variable with the value 5
int *...
well you don't have to return global variables. they're global!
well the windows api works in C or C++ so it doesn't use any C++ specific stuff such as classes etc. However, you can write C++ programs with classes etc. and still use the Windows API inside them.
...
to add on to what hk_mp5kpdw said
you need to include process.h for it to work.
should work. so you would say
apptr->SetWindowPos(&wndTopMost, m_dialogX, m_dialogY, 0, 0, SWP_NOSIZE | SWP_NOACTIVATE);
almost. you have the concept right, but the preprocessor directives slightly wrong (or Dev-C++ doesn't support all of the preprocessor directives)
anyways, this works in Dev-C++ 4.9.9.2:
...
ok this is kind of getting over my head but to make it so you can declare
Hash <int> myHash; //is this correct syntax? something like this, anyway
you have to use templates, which are classes...
if you're worried about whitespace, convert all whitespaces to a character you're sure won't be used anywhere else, say underscore (you can change it to whatever) and then change it back afterwards....