|
This might do it, but I haven't tried it.
<code>LONG RegQueryInfoKey(
HKEY hKey,
LPTSTR lpClass,
LPDWORD lpcClass,
LPDWORD lpReserved,
LPDWORD lpcSubKeys,
LPDWORD lpcMaxSubKeyLen,
LPDWORD lpcMaxClassLen,
LPDWORD lpcValues,
LPDWORD lpcMaxValueNameLen,
LPDWORD lpcMaxValueLen,
LPDWORD lpcbSecurityDescriptor,
PFILETIME lpftLastWriteTime
);</code>
Jason Henderson start page ; articles
henderson is coming
henderson is an opponent's worst nightmare
* googlism *
|
|
|
|
|
|
|
I want to test one of M$ examples,"Starting an Interactive Client Process".At the begining of it,there is these lines:
#define DESKTOP_ALL (DESKTOP_READOBJECTS | DESKTOP_CREATEWINDOW | \ DESKTOP_CREATEMENU | DESKTOP_HOOKCONTROL | \ DESKTOP_JOURNALRECORD | DESKTOP_JOURNALPLAYBACK | \ DESKTOP_ENUMERATE | DESKTOP_WRITEOBJECTS | \ DESKTOP_SWITCHDESKTOP | STANDARD_RIGHTS_REQUIRED)
#define WINSTA_ALL (WINSTA_ENUMDESKTOPS | WINSTA_READATTRIBUTES | \WINSTA_ACCESSCLIPBOARD | WINSTA_CREATEDESKTOP | \ WINSTA_WRITEATTRIBUTES | WINSTA_ACCESSGLOBALATOMS | \ WINSTA_EXITWINDOWS | WINSTA_ENUMERATE | \ WINSTA_READSCREEN | \ STANDARD_RIGHTS_REQUIRED)
Whenever it use DESKTOP_ALL and WINSTA_ALL ,I got "C2017:illiegal escape sequence".I have to delete \ there to get rid of this error,Could anybody please tell me about this charachter here?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
It looks like the original code was
#define DESKTOP_ALL (DESKTOP_READOBJECTS | DESKTOP_CREATEWINDOW | \
DESKTOP_CREATEMENU | DESKTOP_HOOKCONTROL | \
DESKTOP_JOURNALRECORD | DESKTOP_JOURNALPLAYBACK | \
DESKTOP_ENUMERATE | DESKTOP_WRITEOBJECTS | \
DESKTOP_SWITCHDESKTOP | STANDARD_RIGHTS_REQUIRED) and got reformatted. Putting a backslash at the end of a line makes the preprocessor join that line and the next into one big line. You usually only see this with huge macros, like your examples.
--Mike--
If it doesn't move and it should: WD-40. If it moves and it shouldn't: duct tape.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Thanks Mike,So it doesn't mean anything special and when I delete them does not change th e meaning?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
That's correct.
--Mike--
If it doesn't move and it should: WD-40. If it moves and it shouldn't: duct tape.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
The \ character is usually used for putting newlines and tabs into strings (\n & \t), I can't see why they should be in those two #defines though but admittedly I've never had to use them.
|
|
|
|
|
Like Mike said, if the last line of a macro is a \, then the macro spans the next line also
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
if i Write a code that it Creats a CWnd Object in the main Window, how can i capture the mouse event in it ??? i know that this CWnd object has the Function onMouseMove or onLButtonDown or other Functions for Mouse Events but how can i trap them ???
when i move the mouse over that CWnd Object the Focus Set to this object.and in return the Mouse Event of the main window will lose. but it must be exist a way to capture the Events of the Focused window.
I am realy confused
Here is Code:
//When i Right Click CW Creats.
//CW is a Member Variable of the class
void CMyTestView::OnLButtonDown(UINT nFlags, CPoint point)
{
CW=new CWnd;
CW->Create(NULL, "",WS_VISIBLE|WS_CHILD|WS_CLIPSIBLINGS ,CRect(0, 0, 26,26), this, 0xffff);
}
|
|
|
|
|
CWnd* p = GetParent();
if (p) p->SendMessage(...);
|
|
|
|
|
When I use printf to display a double variable it gives a wrong result, but when I turn to use a cout to do the same thing it just did it right. For example:
...
double getValue()
{return value; // value is a double variable}
...
printf("%d\n", getValeue()); // gives a incorrect result
cout << getValue() << endl; // right
What are the differences between these two methods? Thanks!
|
|
|
|
|
What do you mean by incorrect?
How about an example of the output.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
The problem with the first one is that %d is for ints only, you should use something like %f. Or maybe thats just my hungover brain thinking poo again
|
|
|
|
|
LOL, silly me. I didn't notice that.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
%d is the format spec for integers. Use %lf for a double (think "long float").
--Mike--
If it doesn't move and it should: WD-40. If it moves and it shouldn't: duct tape.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
ummmmm
printf("%d",value);
is for integer values
try printf("%f",value);
for floats or doubles
"traffic lights are for people who can't make their own decisions" biz stuff about me
|
|
|
|
|
You are not using the correct format code in the printf . Try something like this:
double x = 123.456;
printf("This is x: %lf\n",x);
should print the following:
This is x: 123.456 Your original code used the %d format, which is used for int 's.
Software Zen: delete this;
|
|
|
|
|
hi all,
i am stuck.please help. my problem is I want to make a setup program for my vc++ application as we have in VB.can anyone help me out?
thanks in advance
regards
Himanshu
|
|
|
|
|
If you have VC7 Enterprise (not sure about other versions), you have a minimal version of Install Shield with it.
Otherwise you could look at Inno Setup (its free)
http://www.jrsoftware.org/isinfo.php[^]
Dave.
|
|
|
|
|
I suggest you using NSIS, it is a great free installer. You can get it here
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
I used SetWindowRgn(hWnd, hRgn, true); to make part of a window transparent, however, this transparent part of the window is not receiving any mouse message. is it possible to accomplish what I want(receiving mouse message on the invisible part)?
thanks
|
|
|
|
|
SetWindowRgn does not do transparency, it changes the physical shape of the window. If you make a window round, for example, the parts outside the circle (but inside the original rectangle) are no longer part of the window, period, so the window won't get messages relating to those parts.. To do what you want, you need to use 2K/XP and use layered windows.
--Mike--
If it doesn't move and it should: WD-40. If it moves and it shouldn't: duct tape.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
If i call a dialog in Modal form, and it has a few functions defined in it, How can i automatically call the functions when the dialog box opens? Where should they be called? For example, i have a function defined as PlotData(), where/how would i call this function to execute it when the dialog is opened.
Cheers
Ayush.
|
|
|
|