|
|
Hi, I need to do some image processing with bitmaps. Predominantly 2 things: Read the bitmap and get the color value for all the pixels and their positions(and write another bitmap) but I'm not allowed to use any image libraries. Any suggestions please. It's quite important, and thanks in advance.
|
|
|
|
|
What about using the standard Win32 API functions for loading images into memory (a bitmap structure), and then directly examing the memory of the structure?
A simple MSDN search will help you there.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
The bare minimum you will have to use is GDI. To read the pixels create a DibSection (search for DIB wrappers on CP), this builds an array of the bitmaps pixels/color indexes which you can loop through.
|
|
|
|
|
If you can't use of classes see CXImage on codeproject and see how it reads graphic files
|
|
|
|
|
Guys:
I added refeence to system.web.dll in a VS project, and put "using namespace System::Web::Mail;" in StdAfx.h, but when I buiild solution , it gave me error says "system is not a class or namespace name" and " Mail a namespace with this name does not exist". I change the project properties, I changed "Use managed Extensions" from No to Yes, it says Command line error D2016:'/RTC1' and '/clr' command-line options are incompatible.
Anyone can give a reason of why it is working for all other dll but it does not work for system.web.dll? And how to solve this probelm.
Thanks A lot .
pom
|
|
|
|
|
Hello,
I presently use Visual C++ 6 for coding. I am planning to upgrade to a higher version. I am confused between VS 2005 and VS.Net
What is the difference between the two? Is there anything like VS8? Is VS2005 the latest version of Visual Studio, or is it VS.NET?
Please help.
Fortitudine Vincimus!
|
|
|
|
|
Tara14 wrote: Please help.
Well I bet these guys[^] can help
led mike
|
|
|
|
|
VS.NET is an umbrella term. VS2005 is the latest version to fall under this umbrella.
Be ready for lots of breaking changes, VC6 is a BAD C++ compiler.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
There are three versions after VC6: VS.Net 2002 (or 7.0), VS.Net 2003 (or 7.1), and VS 2005 (8.0). The ".net" (or lack thereof) in the name is really meaningless, all versions of VS from 2002 on support .Net programming. There was just a time when MS was putting ".net" on the end of all their product names (even the OS at one point) so the ".net" got added to the 2002/03 versions.
If you are dead set on not using 6 anymore, I'd go straight to 2005. Don't even think about 2002.
|
|
|
|
|
Thank you.
Fortitudine Vincimus!
|
|
|
|
|
|
I want to write the code for put the data to edit control of another program.Such as the log in windows.
I want to random put the charactor for search the right password.
How to do this?
|
|
|
|
|
Max++ wrote: How to do this?
Which part specifically?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
How to inject the character to edit control of the target windows.
|
|
|
|
|
What's wrong with SetWindowText() ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
But how to know ID. of that edit control.
|
|
|
|
|
Max++ wrote: But how to know ID. of that edit control.
Why would you need to know that?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
SetWindowText() use for change caption of target windows.
|
|
|
|
|
Max++ wrote: SetWindowText() use for change caption of target windows.
Yes, that's what that function does. SetWindowText() uses a window handle.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
You can find an article on codepoject it gets ID and Class of another programs
|
|
|
|
|
Well, at least the thread topic is spot-on!
Mark
|
|
|
|
|
Max++ wrote: Such as the log in windows.
That's not gonna happen.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
The short answer is to do the following:
1: Have your application get access to the WinLogon desktop
2: Enumerate the windows to determine the handle of the password edit control (HWNDs are unique across the system, IIRC).
3: Inject keypresses (SendEvent(...) ) to enter keystrokes for the characters you want to try
4: See if the actve desktop switches from the WinLogon desktop to another one (if so, you likely successfuly logged in)
5: If not, simulate a keypress to dismiss the "login failure" window and go back to step 2 (because the login window may have closed) and try again
Now, if you expect to be handed code to do this, I do not think so. Most of the people that contribute to this site are not going to help you do something that is illegal. I only mention the steps because I am fairly sure that you will not be able to do this on your own. :P Step #1 is hard enough believe me, and I am not going to tell you the way I use to detect desktop switches to/from the WinLogon desktop.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
i am wondering where root_p->data come from? no initialzation in root_p->data. anyone can help me?
here is code:
<br />
#include <stdio.h><br />
#include <stdlib.h><br />
<br />
struct tree_node{<br />
int data;<br />
struct tree_node *left_p, *right_p;<br />
};<br />
<br />
<br />
struct tree_node *<br />
t_search(struct tree_node *root, int v){<br />
<br />
while(root){<br />
printf("looking for %d, looking at %d\n",<br />
v, root->data);<br />
if(root->data == v)<br />
return(root);<br />
if(root->data > v)<br />
root = root->left_p;<br />
else<br />
root = root->right_p;<br />
}<br />
<br />
return(0);<br />
}<br />
<br />
int<br />
t_insert(struct tree_node **root, int v){<br />
<br />
while(*root){<br />
if((*root)->data == v)<br />
return(1);<br />
if((*root)->data > v)<br />
root = &((*root)->left_p);<br />
else<br />
root = &((*root)->right_p);<br />
}<br />
<br />
if((*root = (struct tree_node *)<br />
malloc(sizeof (struct tree_node)))<br />
== 0)<br />
return(2);<br />
(*root)->&data = v;<br />
(*root)->&left_p = 0;<br />
(*root)->&right_p = 0;<br />
return(0);<br />
}<br />
<br />
main(){<br />
<br />
struct tree_node *tp, *root_p = 0;<br />
int i;<br />
<br />
<br />
t_insert(&root_p, 4);<br />
t_insert(&root_p, 2);<br />
t_insert(&root_p, 6);<br />
t_insert(&root_p, 1);<br />
t_insert(&root_p, 3);<br />
t_insert(&root_p, 5);<br />
t_insert(&root_p, 7);<br />
<br />
<br />
for(i = 1; i < 9; i++){<br />
tp = t_search(root_p, i);<br />
if(tp)<br />
printf("%d found\n", i);<br />
else<br />
printf("%d not found\n", i);<br />
}<br />
exit(EXIT_SUCCESS);<br />
}<br />
~~~@@@###EZRA###@@@~~~
|
|
|
|