|
Don't do the line continuations. To the preprocessor, it sees:
#define A_THING(ARG) # define ANOTHER_THING const ARG \....
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
I'm working on a program that I'd like to be open to customization by the user. It will generate messages (to be sent over Ethernet or serial ports) and allow the user to specify a set of rules to follow when doing so. I'd like the user to be able to create a list of steps to take and also allow the user to create loops and test conditions (if, else, ...).
For now, I'm hardcoding task types but it would be nice if I could allow the user to write a script that my software could understand and follow instead of forcing the user to use my pre-built task types.
I know it's not going to be easy or quick but I'd still like to look into it further. Does anyone know where I might find information on doing something like this? Would it be possible to use an existing scripting language (PERL or other)?
Thanks for any info you might have on this.
|
|
|
|
|
The older "Visual BASIC for Applications" possibly
Or try this msdn.microsoft.com/scripting
|
|
|
|
|
I want to take the color of any pixel on the screen.
I want to simulate mouse click at any position at the screen.
I don't have idea how to do this . and I'll appreciate any idea.
Thanks in advance.
|
|
|
|
|
isn't this help CDC::GetPixel(..)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi Community,
how can i use SetAccountInformation(L"",NULL); in C++ when i create a new Task with ITaskSchedule, when i create new WorkItem wit Username and Userpassword then the task is created ok, but if i want to create a Task without a Username and Password, with Systemaccount, the Task ist created but newer started, i can't start them manualy to? What is the problem?
here litle code:
<br />
if(m_sPassword == "")<br />
{<br />
hr = pITask->SetAccountInformation(L"",NULL);
}<br />
else<br />
{<br />
hr = pITask->SetAccountInformation(m_sUserName.AllocSysString(),m_sPassword.AllocSysString());<br />
}<br />
pITask->QueryInterface(IID_IPersistFile,(void **)&pIPersistFile);<br />
pIPersistFile->Save(NULL,TRUE);<br />
<br />
What ist the error here?
regards
mirsad
|
|
|
|
|
hey all,
i need to know how many sub-directories are under a certain direcotry (could be a hard disk)...
at the moment im using the following code and just wlaking the directory tree but its pretty slow.. can some1 help me out and speed it up (or better yet, tell me the win32 api call i dont know abnout which does this all for me )
<br />
int GetFileFolderCount(char* folder, int recurse, char *ignoreFolders, int *folders)<br />
{<br />
WIN32_FIND_DATA FindFileData;<br />
HANDLE hFind;<br />
int fileFound = 1;<br />
int len = strlen(folder)+5;<br />
char *searchPath = (char*)malloc(len);<br />
if (!searchPath) return 0;<br />
if (folder[strlen(folder)-1]=='\\')<br />
folder[strlen(folder)-1] = '\0';<br />
_snprintf(searchPath,len ,"%s\\*.*",folder);<br />
hFind = FindFirstFile(searchPath, &FindFileData);<br />
if (hFind == INVALID_HANDLE_VALUE) return 0;<br />
<br />
while (fileFound && continueSearch)<br />
{<br />
if (recurse && FindFileData.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)<br />
{<br />
char *newSearch;<br />
if (!strcmp(FindFileData.cFileName,".") || !strcmp(FindFileData.cFileName,".."))<br />
{<br />
fileFound = FindNextFile(hFind,&FindFileData);<br />
continue;<br />
}<br />
len = strlen(folder)+strlen(FindFileData.cFileName)+5;<br />
newSearch = (char*)malloc(len);<br />
if (!newSearch) return 0;<br />
_snprintf(newSearch,len,"%s\\%s\0",folder,FindFileData.cFileName);<br />
if (!ignorefolder(newSearch,ignoreFolders))<br />
{<br />
(*folders)++;<br />
GetFileFolderCount(newSearch,recurse,ignoreFolders ,folders);<br />
}<br />
free(newSearch);<br />
}<br />
else if (!recurse && FindFileData.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)<br />
{<br />
fileFound = FindNextFile(hFind,&FindFileData);<br />
continue; <br />
}<br />
fileFound = FindNextFile(hFind,&FindFileData);<br />
}<br />
FindClose(hFind);<br />
free(searchPath);<br />
return 1;<br />
}<br />
thanx
|
|
|
|
|
that is exactly how I would do it, I don't see anything you can do to speed it up. There is no win32 api to do directly what you want.
-- Rocky Dean Pulley
|
|
|
|
|
hello everybody,
i know, it's been few times i've asked this already, but as i didn't took notes and apply the answers, i cannot find them anymore ...
the only thing i remember is that Mr Alok did answer usefully my request (that was a function like FilePathExists() , but i can't find it. was it really that ?).
so, the question is :
i'd like to check (when i get a File path and name throw GetSaveFileName() - MFC) to check whether the file really exist or not.
As precision, i am working both on VC++ + and .NET 2003, and still MFC.
thanks in advance.
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Shell function is PathFileExists
MFC function is CFile::GetStatus
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
Jack Squirrel wrote:
Shell function is PathFileExists
argglll, here is why i could find it
very thank you jack
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
What About Runtime Function
_access
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
:s i'm not really enjoying programming that way... but that's only my feeling
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote:
that's only my feeling
You still remember that
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
And if you want to avoid the shell altogether, then you can use the Win32 API GetFileAttributes and look for (DWORD)-1 as return code.
|
|
|
|
|
Please could you help me develop a game for my project.
It has to be in for the end of the week (Friday), all that needs to be produced is a one level game with possibly two moving characters, some sound and collision detection.
Any help would be greatly appreciated.
Cheers.
|
|
|
|
|
You can try this:
Egg Catcher Game[^]
It is written in Turbo C++, offcourse By me
needinghelpp wrote:
two moving characters
It Has.
needinghelpp wrote:
some sound and collision detection.
Yes, Both
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Thank you for your reply.
The program i need to create unfortunately has got to be made using <windows.h> and use direct x 9. (as this is what we're being taught on the course).
Thanks for your help.
|
|
|
|
|
|
|
hi
i want to place tabs at bottom of my property sheet (CPropertySheet derived class), by default they appear at top.
can any one plz help me in this regard
Azam
|
|
|
|
|
hi,
I have declared a macro as #define x 100.
i am having a text file.within the text file i have 'x'.
How can i read it as symbol constant x instaed of string "x".
otherwise is possible to convert the string "x" into symbol constant x
Thanks and regards,
chezhian
|
|
|
|
|
you concatenate the string with x, so, it is not directly written into a string. this way, it will be evaluated by the preprocessor...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
i didn't concatenate anything with x. while reading by default it is considered as a string.
|
|
|
|
|