Search:

Type: Posts; User: C_Sparky

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    19
    Views
    1,841

    Exactly, I have now been proven correct.

    Exactly, I have now been proven correct.
  2. Replies
    19
    Views
    1,841

    Nope, a good programmer wouldn't even consider...

    Nope, a good programmer wouldn't even consider the thought.
  3. Replies
    19
    Views
    1,841

    Both of you just relax, anyone good programmer...

    Both of you just relax, anyone good programmer would be able to survive this pain.
  4. Replies
    19
    Views
    1,841

    I don't think it's dangerous for this little...

    I don't think it's dangerous for this little project, as long as he eventually understands that scanf() is terrible to use.
  5. Replies
    19
    Views
    1,841

    You could just simply: scanf("%s", &z); ...

    You could just simply:


    scanf("%s", &z);


    This will grab the newline character was well, you'll still have the character you need in z.
  6. Thanks for the replies, I will have to look for...

    Thanks for the replies, I will have to look for an alternative solution. And adeyblue don't worry I'm not trying to directly interact with the user from a service.
  7. [Win7] SetWindowsHookEx() as a Windows service - SetThreadDesktop()

    I realize that in order to set a global hook the process must have access to the user's desktop. And if a process is running as a Windows service (under the SYSTEM account), it doesn't have access to...
  8. For those wondering what the solution is: ...

    For those wondering what the solution is:

    Create a new function to call during the message loop:


    int process_keydown(HWND hwnd, MSG* msg)
    {
    if(msg->message == WM_KEYDOWN)
    {
    ...
  9. Thanks for the suggestions. I'll just make a...

    Thanks for the suggestions.

    I'll just make a single global HWND variable, it only takes up 4 bytes :)

    And GetDlgItem() is incredibly useful to this case
  10. Which is a better practice? (Global handle or finding handle)

    For a rather large program, with probably close to a hundred controls or maybe even more:
    Would it be more practical to just store a global HWND variable for the main window, or to call FindWindow()...
  11. I'm not familiar with using accelerator tables....

    I'm not familiar with using accelerator tables. However I just tried to implement one and have failed to make it work properly.

    I'm following the procedure here: Using Keyboard Accelerators...
  12. WM_KEYDOWN and GetAsyncKeyState() for parent window

    I have an application which displays files in a listview, and has several buttons to press for various functions.

    I wish to capture the F5 key and the backspace key for the entire parent window,...
  13. Thread: Playing Music

    by C_Sparky
    Replies
    5
    Views
    1,467

    If you are using an IDE add "winmm" to the linker...

    If you are using an IDE add "winmm" to the linker in project options.

    You might also want to check out the music section in Charles Petzold's book, Programming Windows. You can find the code...
  14. I'm really glad you brought this up. I am...

    I'm really glad you brought this up. I am rewriting my functions to use the listviews(I have several for other parts of the program) to be used without global structures.

    I'm still working on...
  15. Thread: Petzold

    by C_Sparky
    Replies
    8
    Views
    1,975

    The Windows API helped me learn a vast amount...

    The Windows API helped me learn a vast amount about programming in general. It is good to know for anyone, since it is so rigorous compared to .NET, Qt, etc...

    @OP:
    I'd highly suggest Programming...
  16. I do have it set up to when the user clicks on a...

    I do have it set up to when the user clicks on a treeview item, it goes up the parent nodes to the root node and gets the full key path, then calls a separate function to enumerate the values in the...
  17. Not sure if I'm on the same page as you, but the...

    Not sure if I'm on the same page as you, but the treeview holds one value for each item(key name), which is stored in the treeview control. And the listview has 3 columns in which a global structure...
  18. Dynamic memory and realloc(), freeing memory

    I've made a registry editor with a treeview for the keys and a listview for the values.

    I use a global pointer to a structure to hold the list of values:


    // in registry.h
    struct value_t{
    ...
  19. Replies
    5
    Views
    2,512

    For Windows: Set a windows hook with...

    For Windows:

    Set a windows hook with SetWindowsHookEx() (keyboard hook)

    then use a callback procedure to process the keys being pressed
  20. Replies
    2
    Views
    2,804

    What compiler are you using?

    What compiler are you using?
  21. Replies
    9
    Views
    21,100

    Download the Windows Help...

    Download the Windows Help files to the Win32 API

    It comes in pretty handy.
  22. Replies
    3
    Views
    2,169

    Using the Win32 API: -Create a function with...

    Using the Win32 API:

    -Create a function with a return type of VOID or DWORD WINAPI
    -The function's parameter must be the type of LPVOID or void*
    -Make a call to CreateThread() while passing the...
  23. Replies
    11
    Views
    11,414

    May not always be the case. I like Win32 for the...

    May not always be the case. I like Win32 for the full control, it's more difficult, but it's worth it to me.

    I heart Win32. :)
  24. Replies
    6
    Views
    1,295

    Question about :: operator

    whats the difference between:

    return ::CallNextHookEx(sg_hGetMsgHook, code, wParam, lParam);

    and

    return CallNextHookEx(sg_hGetMsgHook, code, wParam, lParam);
  25. Replies
    0
    Views
    2,881

    [SDL] A Pong Example

    Here is SparkPong, I made it with a decent and simple AI. You can change the speed of the paddles and the ball, as well as alter the difficulty of the AI.

    Enjoy :)

    Picture:...
Results 1 to 25 of 51
Page 1 of 3 1 2 3