Type: Posts; User: Bond
Search took 0.03 seconds.
October 24th, 2010, 06:05 PM
You can use the WSH library, if you want.
strUser = CreateObject("WScript.Network").UserName
April 9th, 2007, 02:48 PM
Wow, this post is a blast from the past. Glad you found the information useful!
Practice safe programming.
September 2nd, 2005, 01:26 PM
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...
August 5th, 2005, 12:52 PM
char str1 = "str1";
char* str2 = "str2";
where does "str2" get stored then, if not in memory?
July 31st, 2005, 09:44 AM
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...
July 31st, 2005, 09:27 AM
"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...
July 29th, 2005, 01:10 PM
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...
July 25th, 2005, 10:47 AM
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.
July 22nd, 2005, 12:54 PM
This thread may help:
July 22nd, 2005, 12:48 PM
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):
// Get the name of...
July 13th, 2005, 09:18 AM
Good catch, kkez. My intuition told me that he was missing quotes -- I just picked the wrong spot! :)
July 12th, 2005, 04:39 PM
In my resource files, the filename of the icon is enclosed by quotes, so you might want to try this:
ID_ICON1 ICON "test.ico"
July 12th, 2005, 01:18 PM
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...
July 11th, 2005, 09:25 AM
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...
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...
If you're just using character arrays, sprintf can make things easy:
char szResult; // two digits plus null
sprintf(szResult, "%02s", szNumber);
This will always return a two-character...
June 27th, 2005, 08:24 AM
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().
June 23rd, 2005, 12:03 PM
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?
June 23rd, 2005, 11:06 AM
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...
June 23rd, 2005, 08:50 AM
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...
June 22nd, 2005, 02:57 PM
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...
June 22nd, 2005, 09:32 AM
I wasn't suggesting that he change the system font -- only inquire, then set his program's accordingly.
June 21st, 2005, 04:12 PM
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.
June 21st, 2005, 02:31 PM
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...
June 21st, 2005, 02:22 PM
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...
Click Here to Expand Forum to Full Width