Search:

Type: Posts; User: ubergeek

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,687

    Yeah, MSDN is great, none of my Windows...

    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...
  2. Visual Basic is for programming in Visual Basic,...

    Visual Basic is for programming in Visual Basic, not C++. What specific trouble are you having with VC++?
  3. Replies
    6
    Views
    1,901

    Handle the WM_ACTIVATE message, and when the...

    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...
  4. Thread: open dlg box

    by ubergeek
    Replies
    16
    Views
    2,451

    Handle the BN_CLICKED notification in your...

    Handle the BN_CLICKED notification in your WM_COMMAND handler.
  5. Thread: edit box

    by ubergeek
    Replies
    3
    Views
    2,068

    Here is what happens: 1. user clicks on edit box...

    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...
  6. Replies
    1
    Views
    2,346

    There are a couple of ways. Most direct is the...

    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...
  7. Replies
    6
    Views
    1,269

    So in your inner loop, you need to check all the...

    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...
  8. Replies
    23
    Views
    2,361

    read the random number tutorial right here on...

    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...
  9. Thread: #ifndef

    by ubergeek
    Replies
    11
    Views
    1,578

    foo is just the generic example variable name...

    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 *...
  10. Replies
    10
    Views
    1,314

    well you don't have to return global variables....

    well you don't have to return global variables. they're global!
  11. Replies
    5
    Views
    3,421

    well the windows api works in C or C++ so it...

    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.
    ...
  12. Replies
    5
    Views
    1,563

    to add on to what hk_mp5kpdw said you need to...

    to add on to what hk_mp5kpdw said

    you need to include process.h for it to work.
  13. Replies
    4
    Views
    1,090

    should work. so you would say ...

    should work. so you would say


    apptr->SetWindowPos(&wndTopMost, m_dialogX, m_dialogY, 0, 0, SWP_NOSIZE | SWP_NOACTIVATE);
  14. Thread: #ifndef

    by ubergeek
    Replies
    11
    Views
    1,578

    almost. you have the concept right, but the...

    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:


    ...
  15. Thread: objects

    by ubergeek
    Replies
    20
    Views
    2,089

    ok this is kind of getting over my head but to...

    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...
  16. Replies
    10
    Views
    1,761

    if you're worried about whitespace, convert all...

    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....
Results 1 to 16 of 16