Click here to Skip to main content
       

C / C++ / MFC

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
AnswerRe: can you help mememberJoan Murt2 Oct '12 - 23:18 
Take a look at this link[^] and get some ideas.
 
Apart of that, with the amount of information given, anyone here can recommend you to go and find a work at the construction sector near your house...
 
Read the posting guidelines, be specific...
 
i.e: which fields are you interested in? which is your background? language to be used? time you want to put into that project? ...
[www.tamautomation.com] Robots, CNC and PLC machines for grinding and polishing.

QuestionRe: can you help mememberDavidCrow3 Oct '12 - 2:28 
A programming project?

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous


QuestionGet all substrings from an applicationmemberBrandon T. H.1 Oct '12 - 3:43 
How do you get every string from every element, control and window from a running process. I am creating an app that keeps people focused and on-task, and what I wanna do is scan every running process, and if the process contains a restricted word from anything (whether be buttons, text boxes, the window title, the text on the window of the application process), it will be closed immediately.
Simple Thanks and Regards,
Brandon T. H.
 
Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst).
 
Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison

AnswerRe: Get all substrings from an applicationmemberpasztorpisti1 Oct '12 - 4:18 
You can't do that universally for controls that are owner drawn. However with standard controls you could periodically enumerate (every second or every 5 seconds) all HWNDs and child HWNDs and check some of their parameters for example their window class and you can then do some control-type specific checks.
 
Window enumeration:
EnumWindows()[^]
EnumChildWindows()[^]
 
Getting the window class: GetClassName()[^]
 
In general you can use GetWindowText()[^] to get the titlebar, or button text, editbox text, and so on, but depending on the result of GetClassName() you can do control specific checks.
 
Conclusion: If you want to handle a lot of controls then you have to check the api of every controls and you will still be unable to handle owner draw controls in some cases.
GeneralRe: Get all substrings from an applicationmemberBrandon T. H.3 Oct '12 - 8:34 
pasztorpisti wrote:
(every second or every 5 seconds)

 
Every second? The CPU usage would be skyrocketing, you don't want your application being seen, hogging up the resources of a computer, it looks very unprofessional, guess I'll do it every second. On top of that maybe a system driver, that can intercept execution, just like Faronics(R) Anti-executable or other anti-virus programs.
 
Maybe the main module or main part of my program should be the driver, since applications cannot reach or even "touch" an app until it runs as a process. But the driver can touch the application before it executes or becomes a process. But it doesn't matter what order it comes in, because the driver will be the first thing to prevent the app from executing. So, the application module of my program will be back up.
Simple Thanks and Regards,
Brandon T. H.
 
Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst).
 
Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison

GeneralRe: Get all substrings from an applicationmemberpasztorpisti3 Oct '12 - 10:26 
Because of custom controls you won't be able to solve this problem perfectly. Any solution to this problem will be a big HACK. Smile | :) The 1 second was just a random interval put there, of course you should tweak it and measure it as a delay between the end of the current "scan for strings" and the beginning of the next one instead of between the beginning of two scans.
QuestionRe: Get all substrings from an application [OT]memberDavidCrow1 Oct '12 - 6:27 
Exactly what problem are you facing?

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous


GeneralRe: Get all substrings from an application [OT]memberpasztorpisti1 Oct '12 - 8:52 
Thumbs Up | :thumbsup: Totally valid question, I should have asked this in my previous post. My solution is just a dirty brutal-force hack. Smile | :)
AnswerRe: Get all substrings from an application [OT]memberBrandon T. H.3 Oct '12 - 8:38 
Making people stay on task, since some people could be brilliantly smart with computers or maybe they could even more than that, and be computer programmers and write their own programs to do things that are off-task and/or intercept my software.
Simple Thanks and Regards,
Brandon T. H.
 
Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst).
 
Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison

AnswerRe: Get all substrings from an applicationmvpCPallini1 Oct '12 - 10:33 
Only keenness keeps people focused and on task. Your Super-Cop application is going to fail.

(bit philosophical, this time)

Veni, vidi, vici.

JokeRe: Get all substrings from an applicationmemberChris Meech1 Oct '12 - 13:11 
CPallini wrote:
Only keenness keeps people focused and on task

 
At one place that I worked at, there was this giant ogre about 8 feet tall that would walk around the office with a whip in his hand. He kept everyone very keen and focused upon work. Smile | :)
Chris Meech
I am Canadian. [heard in a local bar]
 
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
 
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

JokeRe: Get all substrings from an applicationmvpCPallini1 Oct '12 - 21:10 
So Rajesh was your workmate!
Laugh | :laugh:
Veni, vidi, vici.

JokeRe: Get all substrings from an applicationmemberJoan Murt2 Oct '12 - 23:22 
CPallini wrote:
Only keenness kneenness keeps people focused

You know with a whip, a hot iron to leave marks and impossible deadlines...
 
Eveyone on their knees! MUWHAHAHAHAHA!
 
PS: this also works, the only drawback is that it is difficult to maintain people alive without eating and so... and it happens that you spend a lot of whips on formation...
 
Roll eyes | :rolleyes:
[www.tamautomation.com] Robots, CNC and PLC machines for grinding and polishing.

GeneralRe: Get all substrings from an applicationmvpCPallini2 Oct '12 - 23:25 
Laugh | :laugh: Thumbs Up | :thumbsup:
Veni, vidi, vici.

QuestionHow to get a C++ console application run in a terminal/powershell type of environment?memberinfectedprof30 Sep '12 - 13:53 
The title says it all. I am a noob at c++/c programming and I want to get a console application run in a powershell/terminal kind of environment. Please help!
AnswerRe: How to get a C++ console application run in a terminal/powershell type of environment?memberRajesh R Subramanian30 Sep '12 - 21:39 
You can just "open" one of those .PS1 (PowerShell script) type files using ShellExecute: A newbie's elementary guide to spawning processes[^]
"Real men drive manual transmission" - Rajesh.

AnswerRe: How to get a C++ console application run in a terminal/powershell type of environment?memberjschell1 Oct '12 - 8:59 
infectedprof wrote:
run in a powershell/terminal kind of environment.

 
Where "kind of" means exactly those?
Or you want to write your own environment?
GeneralRe: How to get a C++ console application run in a terminal/powershell type of environment?memberinfectedprof1 Oct '12 - 16:16 
Yeah its own environment.
GeneralRe: How to get a C++ console application run in a terminal/powershell type of environment?memberjschell2 Oct '12 - 8:38 
Then investigate the system/process command.
 
Then learn how stdio/stderr/stdin work.
Then write a app that does the following
- Takes user input for "dir"
- Execute the OS dir (shell command)
- Return the output to the user.
- Do the input and output in a gui display box.
 
Once you do that successfully then you will have a better basis for doing something else.
AnswerRe: How to get a C++ console application run in a terminal/powershell type of environment?mvpRichard MacCutchan1 Oct '12 - 21:25 
Just open a powershell or terminal window, and type the program name at the command prompt. If you have not worked with commands before then type 'help' at the prompt and it will list the available commands.
One of these days I'm going to think of a really clever signature.

GeneralRe: How to get a C++ console application run in a terminal/powershell type of environment?memberinfectedprof1 Oct '12 - 21:48 
I have worked on Powershell,command prompt and the Linux terminal before. I am just wondering how people make environments like mintty. Is there a way I can make my own or call another one that's already pre-written?
GeneralRe: How to get a C++ console application run in a terminal/powershell type of environment?mvpRichard MacCutchan2 Oct '12 - 2:51 
I'm not familiar with mintty, although I have worked on Linux and used cygwin. Maybe if you gave some more details of exactly what problem you are trying to solve we could make some better suggestions.
One of these days I'm going to think of a really clever signature.

Questionproblemmemberemanalshboul30 Sep '12 - 9:42 
how i can use any project to work at it
and i entered my email
eman

AnswerRe: problemmemberAlbert Holguin1 Oct '12 - 4:09 
Your question isn't very clear. Try rephrasing...
QuestionGeneric Get and Set as interfacememberDurga_Devi30 Sep '12 - 1:13 
Hi all,
 
I want to have an interface for setting and getting the different value from/to com dll.
The value can be of any datatype, i,e it support int, char, long, short, string.
Can any one suggest how to handle this.
I know we cant have virtual template function or interface as a template.
Any idea is highly appreciated.
Thanks in advance.
 
regards,
Durga

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 25 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid