|
Thanks for the answer, but this seems to only be available in C++ and I need to code in C.
|
|
|
|
|
Use GetDIBits to get the bitmap information of each image and then compare these informations.
|
|
|
|
|
I've been searching and I can't find any mention of GetDIBits in C, only C++. Is it available in C?
|
|
|
|
|
It is a Windows API and definitely available in C.
|
|
|
|
|
Ah. Thank you very much, but I'm afraid I should have mentioned that I am writing my program on Linux. Thanks anyways!
|
|
|
|
|
justabeagle wrote: I'm afraid I should have mentioned that I am writing my program on Linux.
Gee, you think? But no problem - I'm sure all the people who responded didn't mind wasting their time.
|
|
|
|
|
Clearly, seeing as how you wasted your time just to make sure I knew I was wasting other people's time.
|
|
|
|
|
justabeagle wrote: I am writing a program in C that compares two images taken by a camera to see if they are different.
This article may give you some ideas.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
in debug version of my program the OnKillFocus function of combobox is called,but in its release version this funcion is never called .Can anybody tell me why? PS: the combobox is a child window of a listview control.
|
|
|
|
|
vctrlao wrote: in debug version of my program the OnKillFocus function of combobox is called,
How do you check that it is called or not ?
|
|
|
|
|
I added TRACE0 in this function
|
|
|
|
|
Well, check the documentation[^]. TRACE0 does nothing in release mode.
|
|
|
|
|
Hi, i'm writing a dll for another program
i'm basically having difficulty getting the correct client rect (where x is few pixels to the right of the window x and y is below the border) of a window that i have a handle to
i'm currently using GetWindowInfo
here's the code
WINDOWINFO wi;<br />
<br />
wi.cbSize = sizeof(WINDOWINFO);<br />
<br />
GetWindowInfo(window_handle, &wi);
when I debug the dll the values of the client rect in wi aren't correct
the window isn't created with my dll, but i'm pretty sure i've got the right window handle
how do i get the correct client rect of a window, am i doing something wrong ?
thanks
|
|
|
|
|
Use GetWindowRect() function.
dimensions in screen coordinates.
|
|
|
|
|
thanks, i don't think my c++ is the problem, i must have the wrong hwnd or something, when the window's fullscreen i can get the width and height but when it's windowed, the rect appears with uninitialized values. it's game maker i'm trying to get the client rectangle for so there's probably someone in the gm forums that knows what's up
|
|
|
|
|
doug25 wrote: when I debug the dll the values of the client rect in wi aren't correct
So what is GetWindowInfo() returning?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
found the problem , i was getting the wrong window handle after all. i thought the program just used one window but the handle changes when fullscreen / 3d mode is toggled or something like that so i'm required to pass the new handle to the dll. i was getting uninitialized values in the window info stucture when i changed between windowed and fullscreen mode. now it's working ok
thanks
|
|
|
|
|
Hi all,
I am new to Microsoft Visual C++ 6.0 development environment.
So i want to do a simple application which takes the User name as a user input. and process it.
How can i do it in Win32 Application
Please some one provide me some links or samples.
Thanks in Advance.
|
|
|
|
|
Hi,
One way is to accept the string(s) as command line parameter(s) and then use GetCommandLine()[^] to retrieve the command line parameters and then process them.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Hello All,
I have a dialog derived from CDialog. Whenever I uses a groupbox, its title and boundary line is getting overlapped. Usually boundary line will not be present below title. In my case, under title boundary line is also visible.
Please help me to resolve this issue.
|
|
|
|
|
Hello,
I'm pulling my hair out trying to figure this one out. I received some native C++ code from a colleague and compiled it under VS2005. I used the Win32 configuration,and it works fine on Windows 32-bit. However, this same app fails on x64 ("Application is not a valid format"). SO I tried compiling for x64 and running it, and it fails on BOTH 32-bit and 64-bit! I following Microsoft's directions here[^], but I still get the same error. I have the 64-bit tools installed, so what am I missing? Do I have to compile this from the command line instead of from the IDE?
Any suggestions are appreciated.
Thanks,
Dybs
The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen
|
|
|
|
|
Any 32-bit app should work on 64-bit windows without any changes.
Exactly what goes wrong when you run the 32-bit version of the app on x64?
|
|
|
|
|
Richard Andrew x64 wrote: Any 32-bit app should work on 64-bit windows without any changes.
That's what I thought. It's just a simple stand-alone console app. When I try to run it, I get the error message The application is not a valid format or something to that effect. I don't remember the exact wording right now, but I can post it when I get to work in the morning.
Dybs
The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen
|
|
|
|
|
Richard,
The exact error message I get is
"This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."
I can't really "reinstall" it since it's a standalone exe. Like you said, I thought any 32-bit program would at least run on a 64-bit system. Any ideas?
Thanks,
Brandon
The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen
|
|
|
|
|
Hi Brandon,
That error usually means that the Side-by-Side (SxS) runtimes have not been installed.
Make sure you install the runtime libraries for your application.
If you go to your "redist" folder inside your Visual Studio tree, you'll find the redistributables for C++ and MFC. Install those onto the target machine, and it should work.
|
|
|
|