|
|
OK thanks. I usually start with msdn.
|
|
|
|
|
I want to make tokens of a char array and save it... into an array of tokens, something like the printf() instruction what can take an "unlimited number of statements.
printf("hi World %s %s %s....",var1, var2, var3,....);
It means the array what holds the tokens is unsized...(maybe)
Please someone can help me???
I need it for a project in which i am.
|
|
|
|
|
Are variable-argument lists what you want? Lookup va_list , va_start , va_end , and va_arg in MSDN.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
i was looking what you told me, and it seems to be what i need, but can you give me an example of how i can use it????, plase
i would like do some like:
print("Text to show! some %s,another some %s","text1", "text2");
PS: The number of arguments is variable, i i like take that and recontruct them into an only string.
|
|
|
|
|
Hi people,
Is there some way to discover the process that send a print job? For example, based on the print job id, find the process id...
Thanks a lot,
Wander.
|
|
|
|
|
How would I go about getting CPoint point mouse location when in OnKeyDown (Mouse isn't moving so no OnMouseMove)
|
|
|
|
|
GetCursorPos()
Shog9
I'm not the Jack of Diamonds... I'm not the six of spades.
I don't know what you thought; I'm not your astronaut...
|
|
|
|
|
GetCursorPos gives you a POINT/CPoint where the cursor is currently.
This is tyically good enough though.
Being purist, you should use GetMessagePos which tells you where the mouse
was when the message you are dealing with got into the message queue. But it is a little
more fiddly to work with.
Iain.
|
|
|
|
|
hi, does any one know how to put a small java script code (about 10 lines) into a c code script?
what i am doing is creating a web page (by putting html in the c code)
and it works but now i want to add java in and it does not work.
i thought it was like this:
strcat( buffer,
"It is now "
"<!--"
"var currentTime = new Date()"
"var day = currentTime.getDate()"
"var month = currentTime.getMonth()"
"var year = currentTime.getFullYear()"
"document.write(day + / + month + / + year)"
"" );
any suggestions?
thanks
|
|
|
|
|
what do you mean about "work"?
need Java code similar to your c code as bellow?
String sBuf="
|
|
|
|
|
Define "does not work." How big is buffer ? Don't the lines need to be terminated with a \n character so that it is output correctly.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
by doing this, the only thing that shows up on the web page is the top part of the page i created, then "It is now" and then on the following line is "variable status" but what i wanted it to do is after "It is now" it should show the correst date on the webpage.
in powerpoint this javascript works.
.
.
.
strcat( buffer,
" "
"It is now "
"<!--"
"var currentTime = new Date();\r\n"
"var day = currentTime.getDate();\r\n"
"var month = currentTime.getMonth();\r\n"
"var year = currentTime.getFullYear();\r\n"
"document.write(day + / + month + / + year);\r\n"
"\r\n"
" VARIABLE STATUS "
.
.
.
thanks...;)
|
|
|
|
|
Show me the relevant pieces of your code that create the HTML file and then write to it.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hDevice = SetupDiGetClassDevs(pGuid,NULL,NULL,DIGCF_PRESENT);
' VB fials every time with hDevice = -1 = INVALID_HANDLE_VALUE
'and GetLastError() = 0 = ERROR_SUCCESS
hDevice = SetupDiGetClassDevs(ClassGuid, 0&, 0&, DIGCF_PRESENT)
Both pGuid and ClassGuid contain the exact same GUID data.
Does anyone have any ideas why this 'C' function would fail when called from VB?
Ya! Ya! This is basicaly a VB question, but I am a C/C++ programmer so I am asking here first.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
ClassGuid is a GUID pointer.. Did you declare the first parameter of the function as by ref?
|
|
|
|
|
Yes I did, even though that is the default in VB. I even tried some slight of hand, by changing the prototype slightly and passing the actual pointer via VarPtr(), but it made no difference in the result. What bothers me is that I had to pass ClassGuid to the SetupDiClassGuidsFromNameA function inorder to fill the GUID structure and it succedes every time. I can even use the various slight of hand modifications, I tried with SetupDiGetClassDevs, on SetupDiClassGuidsFromNameA and it still succedes.
Any way I think the guys on the VB forum may be able to help. I've been ask to post the code, and I will be doing that there on monday (since I do not have it here).
Mean while I just wrapped it up in an ATL COM object (ActiveX control), so that I could consentrate on other details for awhile.
F.Y.I. I found a free program on the www called ApiViewer.exe (ApiViewer 2004) that produces declarations for almost every thing, unlike the viewer that comes with VB. Although you need to verify that they are correct yourself, since the prototype for SetupDiGetClassDevs was incorrect (no return value specified).
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
how to add a pop-up menu (which contains a few of menu items) to shell menu of widows explorer?
(shell menu will be displayed when right-click files on windows explorer)
the new pop-up menu is not for a specified extension, it is available for all files - similar to "Send to" pop-up menu.
thx
|
|
|
|
|
|
they are sub-menus of "File", not sub-menus of context help menu which is displayed when you right-click files on Windows explorer.
I read this article before but it is not what i exactly need.
includeh10
|
|
|
|
|
I would also read Michael Dunn[^]'s other shell articles. I have them saved to my
PC, and they're a better resource than the platform SDK! I have plagiarisedused
them extensively for my own shell toys.
Iain.
|
|
|
|
|
i read all but i can not find i needed - his story told how to add sub-menus under popup menu "Open" - i want to create my own pop-up menu which is at the same level as "Open".
includeh10
|
|
|
|
|
Hello Gurus,
I am writing an AutoRun.exe for my CDs/DVDs. I am not that familiar with C++/VC++ environments. How can I reference "SYSTEM32.DLL" and use function "GetPrivateProfileString()"? Prefer in C++/VC++ 7 & Unmanaged Code.
I am trying to avoid .NET FrameWork dependencies because not every machine loaded with .NET FrameWork. Any input is greatly appeciated. Wish you a happy & thriving 2005.
Khang
|
|
|
|
|
Include windows.h and link with kernel32.lib. From there you can call the function just like any other.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Thanks so much for your quick reply. How do I "link with kernel32.lib"?
Khang
|
|
|
|