|
Sir,
I used the word "plzzzzzzzz" just to make a request n not for begging and if u r thinking so, u r on mistake. Instead of criticising if u will help other, its much better for u n other people.And thanks for the reply.............
|
|
|
|
|
jalpari wrote: Sir,
I used the word "plzzzzzzzz" just to make a request n not for begging and if u r thinking so, u r on mistake. Instead of criticising if u will help other, its much better for u n other people.And thanks for the reply.............
Regards,
Nish
|
|
|
|
|
You stand a much better chance of receiving help if you'll lose the SMS stuff.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
:|Yes it will compile! I have already got it working. I just need other instructions. It is not like drawing on a piece of paper. Computer language is not the same thing. C++
Charles Reese
|
|
|
|
|
I think he ment write the goal of the application down in pseudo code on paper. Then move to a programming language like c++.
like this
pseudo code: to draw * in triangle
draw *
draw **
draw ***
...
draw ***...* now create a function to draw a line giving the number of asterixes you need
draw_line 1
draw_line 2
draw_line 3
..
draw_line n we now see a sort of iteration meaning a loop construct (for , do, while)
for count = 1 to n
draw_line count
next the draw line code looks simular
for number of asterixes = 1 to n
draw *
next
We can now convert this into real code very easy
<code>void draw_line(int iNumberOfAsterix)
{
for(int iCount = 0; iCount < iNumberOfAsterix; iCount = iCount + 1)
{
cout << "*";
}
cout << endl;
}
int main()
{
int iNumberOfLines = 5;
for(int iCount; iCount < iNumberOfLines; iCount = iCount + 1)
{
draw_line(iCount);
}
return 0;
}</code>
just include the correct headers and it will work.
I hope that this is what you needed
codito ergo sum
|
|
|
|
|
do you know what you're talking about ?
you'd better learn C++ first
you are on codeproject since only 2 days, and you already attack the big members on this forum. tssss, it's far from being a good solution to get an answer to your problem.
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
How can I launch my COM exe server under some user?
Where can I define "username", "password"?
Thank you.
Petro
|
|
|
|
|
1) Type dcomcnfg in the Run dialog
2) Expand Component Service ->Computers -> My Computer -> DCOM Config
3) Select ur component
4) Right click and select properties.
5) Click on the Identity tab in the Properties dialog box.
6) Select "This user" readio button and enter the user credentials under which u need to run the component.
cheers...mil10
|
|
|
|
|
I am using C++ This is what I have thus far any ideas how to finish it. I know I need to use nesting, but what other instructions do I need?
int = asterisk '*';
int = counter + 1;
void main()
{
for(counter = 1; counter >= 10; counter = counter + 1)
{
cout << '*' << endl;
}
}
Charles Reese
|
|
|
|
|
How would YOU do it on paper if someone asked you to write "*" to draw a triangle ?
Once you know how to do it on paper, you will see what is missing from your small sample.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Here's one way:
---------------
// Console.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
void DoStuff()
{
string s;
for (int i=0; i<10; ++i)
{
s += "*";
cout << s << endl;
}
}
int main(int argc, char* argv[])
{
DoStuff();
return 0;
}
Steve
|
|
|
|
|
I am using C++ This is what I have thus far any ideas how to finish it. I know I need to use nesting, but what other instructions do I need?
int = asterisk '*';
int = counter + 1;
void main()
{
for(counter = 1; counter >= 10; counter = counter + 1)
{
}
Charles Reese
|
|
|
|
|
Charles Reese wrote: int = asterisk '*';
int = counter + 1;
You do realize this will not compile, don't you? The compiler will issue a C2513 error.
Charles Reese wrote: for(counter = 1; counter >= 10; counter = counter + 1)
This loop will execute 0 times.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Hi everybody.
I have developed an ActiveX control with Visual C++ 6.0. That control is used by a Visual Basic application and running in Win98 - WinXP. It works fine, VERY FINE!!
Now, I have to develop a Win CE aplication, the UI maybe with .NET, (VB.NET or C#) and I want to know if my old good control will run, (or compile), in that plataform without change the code, (or not too much).
My control implement:
- Serial communication using the standard windows API, (CreateFile(), WriteFile(), etc).
- Multithreading, (with synchronization). Important for keep the comm alive.
- A lot of MFC arrays like CByteArray, CObArray, CArray, etc.
- Serialization. Well, many of these array, (line above) are serialized.
I will save a lot of time if I could make a shortcut implementing that control instead of write a new one.
Thank you for your help.
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
There's no reason why not. CE support most of the Win32 API, and certainly supports everything you've listed there. The best test is to simply compile it targeting CE and see what happens. If it compiles, it should work - the API works practically the same in CE as in XP.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi.
I am trying to obtain the pixel colors from a webcam feed. Ideally I would be able to put the color in an array for further analysis (even though I am new to C++, I think I have an elementary grasp of array manipulation).
I am trying to use the DX Capture program I obtained from codeguru (http://www.codeguru.com/Cpp/G-M/dir...icle.php/c6973 - in the "Home >> Visual C++ / C++ >> Graphics & Multimedia >> DirectX >> DirectShow"
category and is called "Simultaneous Previewing & Video Capture using DirectShow."), using Visual Studio C++ .NET 2003. I cannot figure out how to modify the program to obtain the pixel colors. It does not have to be this program, by the way - any suggestions of better programs would be welcome.
I suspect that Convert24Image or ImageCapture might be of use.
The overall purpose is to identify lit lines on the target image, which is an instrument screen that displays a line (possibly two) whenever the instrument is used.
If I have not included enough details, or I am not being clear, please tell me so.
Any help would be very much appreciated (and please be aware that I have just begun learning the C++ language).
Lessthannovice.
"Everything is always ok in the the end. If it's not ok, then it isn't the end."
|
|
|
|
|
You could use GetFrame() to get the pointer to the BYTE array of the image data you are looking for. He does some conversions to ensure that this BYTE array is the image data in RGB24.
This is just a guess, I didn't test this code.
BYTE *pData;
GetFrame(&pData);
RGBTRIPLE *pImage = static_cast<RGBTRIPLE*>(pData);
for(int y = 0; y < m_nHeight; y++)
{
for(int x = 0; x < m_nWidth; x++)
{
(pImage+(y*m_nWidth)+x)->rgbtBlue;
(pImage+(y*m_nWidth)+x)->rgbtGreen;
(pImage+(y*m_nWidth)+x)->rgbtRed;
}
}
|
|
|
|
|
Thanks for the reply. It's nice to know someone is willing to help me.
I didn't know where to insert the code, so I put it at the end of Convert24image. Its giving me a
c:\ Projects\DX Capture\VMR_Capture.h(35): fatal error C1083: Cannot open include file: 'vmr9.h': No such file or directory
message. The code works, however (I get a feed on the screen). With the new code, does rgbtBlue give me the blue intensity, rgbtGreen the green intensity and so on? In other words, can I use them as normal variables now?
Thanks again for the reply.
|
|
|
|
|
Create a new function and call it when you need the pixel values. If you need the pixel values for every frame though, this is not a good way to go about it, and you'd be better off with using a SampleGrabber filter.
The error message indicates that you don't have the DirectShow include files in any of your include directories. Have you installed the latest Platform SDK?
|
|
|
|
|
I will be needing the pixel values for every frame, but I do not know how to use a SampleGrabber filter. I will try and look into it - any pointers/suggestions would, in the meantime, be very helpful.
I have installed the latest Platform SDK, but I will reinstall it once more to make sure this is not the problem. Thanks for the suggestion.
|
|
|
|
|
Help anyone? I can distil the problem to this: How do I get the pixel RGB color information from a webcam frame, and for all frames in a webcam feed(using any Cisual Studio C++ .NET 2003 program)?
|
|
|
|
|
Does anyone have a simple way of encoding a char* through the ASCII85 encoding and outputting another char*?
I hate to write my own if it's easy to do elsewhere.
Thanks
|
|
|
|
|
|
What would you do if ::OpenProcess(PROCESS_VM_READ, FALSE, dwProcessID) fails with error code 5 (Access is denied)? Where dwProcessID is a valid process ID. Is there any way to work around this problem?
|
|
|
|
|
OpenProcess(PROCESS_VM_READ, FALSE, GetCurrentProcessId());
if you want know dwProccessId in the example MSDN you can find one program that you can see dwProccessId from another proccess
|
|
|
|