CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Bond

Page 1 of 19 1 2 3 4

Search: Search took 1.91 seconds.

  1. Replies
    5
    Views
    1,612

    Re: System Process : Get currently logged on user?

    You can use the WSH library, if you want.


    strUser = CreateObject("WScript.Network").UserName
  2. Replies
    10
    Views
    55,605

    Re: what is HIBYTE, LOBYTE, HIWORD, LOWORD

    Wow, this post is a blast from the past. Glad you found the information useful!

    Practice safe programming.
  3. Replies
    6
    Views
    902

    Re: Initialization order in constructor

    The standard could have just as easily taken into account the order that the objects were initialized in the constructor initialization list and reversed that when destructing. I imagine the reason...
  4. Re: what is the diff between char str[] and char * str ?

    Ummm...


    char str1[] = "str1";
    char* str2 = "str2";

    where does "str2" get stored then, if not in memory?
  5. Replies
    2
    Views
    853

    Re: navigate internet explorer

    Here's a complete program that loads IE and navigates to a certain website (google, in this case). If you don't mind using COM, it sounds like it would work well for you, with what you're trying to...
  6. Thread: Swapping windows

    by Bond
    Replies
    2
    Views
    677

    Re: Swapping windows

    "Wizards" do this very thing. You've probably seen them used for installing programs, setting parts of the software up (Internet Connection Wizard is a popular one), etc.

    As Kirants said, you can...
  7. Replies
    15
    Views
    2,783

    Re: How do you call "func()" vs "func() const"?

    I don't see anything wrong with having two function declarations differing only in their constness. And obviously the developers of the C++ language didn't either, or else they would have chosen to...
  8. Replies
    11
    Views
    1,852

    Re: Forcing internet explorer to refresh

    WM_KEYDOWN, WM_KEYUP, and WM_CHAR are notifications. They are sent to your window AFTER a keystroke occurs. They should not be used to simulate one.
  9. Replies
    14
    Views
    9,313

    Re: Simple Win32 dialog based project

    This thread may help:

    http://www.codeguru.com/forum/showthread.php?t=306103
  10. Replies
    3
    Views
    1,099

    Re: accessing file time structures without MFC?

    Here's the OK button handler from a dialog app I wrote a while ago that updates the created/accessed/modified times for a given file (error checking removed):


    case ID_OK:
    {
    // Get the name of...
  11. Thread: Custom Icon

    by Bond
    Replies
    7
    Views
    983

    Re: Custom Icon

    Good catch, kkez. My intuition told me that he was missing quotes -- I just picked the wrong spot! :)
  12. Thread: Custom Icon

    by Bond
    Replies
    7
    Views
    983

    Re: Custom Icon

    In my resource files, the filename of the icon is enclosed by quotes, so you might want to try this:


    #include “RESOURCES.H”

    ID_ICON1 ICON "test.ico"
  13. Replies
    18
    Views
    7,579

    Re: Timeout with RPC calls?

    Can you think of any other way to determine if the server is available other than calling your RPC method? Maybe you can run a series of shorter tests to ensure that the server is available and...
  14. Replies
    3
    Views
    3,279

    Re: Multiple Files with ReadDirectoryChangesW

    Looks okay to me, but the buffer used by ReadDirectoryChangesW may hold more than one filename, so you must loop through the buffer until there are no more entries to process. Use the...
  15. Replies
    15
    Views
    22,341

    Re: Adding char to beginning of string

    You are correct. Based on his original question where he states it will be "sometimes 2, but also sometimes 1" and the fact that he only wants to pad the number to fill a two-character field, I was...
  16. Replies
    15
    Views
    22,341

    Re: Adding char to beginning of string

    If you're just using character arrays, sprintf can make things easy:


    char szResult[3]; // two digits plus null
    sprintf(szResult, "%02s", szNumber);

    This will always return a two-character...
  17. Replies
    5
    Views
    15,335

    Re: _tcslen header file

    Also, if your going to use _tcslen() and TCHAR in order to be Unicode-safe, you'll probably want to use _stprintf() instead of sprintf() and _tcscat() instead of strcat().
  18. Replies
    4
    Views
    1,055

    Re: Disabling a toolbar button with longish text

    Never seen that before but are you allowing the toolbar to size the buttons itself (TB_AUTOSIZE, I think)? If so, what happens if you manually specify the width of the button?
  19. Replies
    2
    Views
    3,157

    Re: error creating balloon tip for tray icon

    Yes, as Wang suggested, you need to define your version BEFORE you include windows.h. Also, depending on what version of VC++ you're using, you may need to download the Platform SDK from Microsoft's...
  20. Replies
    2
    Views
    1,237

    Re: pointers to chars + sprintf

    Not sure about your delete[] statements but where are you testing for the string length of buffer? I don't see it anywhere in your code.

    If you're testing it after your new char[] operation, the...
  21. Replies
    37
    Views
    4,519

    Re: What is the Output of this program?

    The output is:
    'cout' : undeclared identifier

    because you forgot to include <iostream.h>


    Seriously, though, it should be:
    13, 12, 12, 10

    Starting at the right, the variable value is...
  22. Replies
    6
    Views
    939

    Re: Normal vs. Large size fonts problem

    I wasn't suggesting that he change the system font -- only inquire, then set his program's accordingly.
  23. Replies
    6
    Views
    939

    Re: Normal vs. Large size fonts problem

    I think you can use the SystemParametersInfo() function with the SPI_GETNONCLIENTMETRICS flag. This should fill a NONCLIENTMETRICS structure that contains LOGFONTS for the current system fonts.
  24. Replies
    2
    Views
    1,036

    Re: Create a Service...

    Also, you can register your service using the SC.EXE application. Not sure of its availability but I know it's on XP (for W2K, it may be in the resource kit). If you're deploying it, then you'll...
  25. Re: How to retrieve a name associated with Edit Box

    If hDlg is a handle to your dialog and IDC_EDIT1 is the identifier of your edit control (textbox), then this code should work:


    // Create a buffer to hold the text...
    TCHAR szText[64];

    //...
Results 1 to 25 of 458
Page 1 of 19 1 2 3 4





Click Here to Expand Forum to Full Width

Featured