|
Hi,
I am currently trying to insert a picture control with more than 256 colors in a MFC dialog in a VC 6.0 project. However, when I paste the bitmap, the IDB_BITMAP resource looks correct, but when I try to reference it in a static picture control, the color depth is decreased dramatically.
How can I display a bitmap ressource with 24 or 32 bit in a MFC 6.0 dialog?
|
|
|
|
|
Try replacing the .BMP file that is created in the res sub folder with the high color bitmap file.
|
|
|
|
|
Hey,
I would like to write a c++ program that compares 2 images.In fact, I have many B&W images of a boat. I want to compare the contours, so that I could know how alike the images are. And, I want to be able to know the error percentage after comparing.
Do you have any advice or can you tell me any paper or book could help me.
Thanks in advance,
Franckesh
|
|
|
|
|
Go to Google, hit advanced search, limit the document types to .pdf, the websites to .edu, enter your search terms, and hit Search. You should get more papers than you can read in a year.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Maybe a strange tip:
Take a picture (1) and make a copy (2) of it. Now put the picture and the copy in a zip. Write down the filesize of the zip. Nex,t take another picture (3) and put it together with the original (1) into a second zip. Write down the filesize of the 2nd zip. Continue this till all pictures are put in zips. If you have 10 pictures you will have now 10 zips. Sort the zips to filesize. The zip containing your original (1) and its copy will have the smallest filesize. The next zip will contain that picture that resembles the original the most. And so on.
How this works: Zip searches for duplicate bitpatterns (this is how compression works). In the smallest zip it finds the most (coz their are 2 identical pics). The picture that resembles the first one the most is the one that has a little less duplicate bitpatterns (it compresses slightly worse). The filesize of the zip is an indicator of the resemblance.
Note: You will have to create zips for all the combinations...
The theory behind: Colmogorov complexities...
If you try this solution i would be pleased if you keep me informed of you results.
Rozis
|
|
|
|
|
Thank U, but I would like to know how to implement c++ codes to compare two b&W images pixel per pixel.
Or is there any better way to do implement the differences btw the images(if not pixel per pixel).
Thanks,
Franckesh
|
|
|
|
|
|
Hi,
In my minidump I am not getting proper call stack, but I do know one function which was called and its address comes as 0x0a415210. I want to locate the calls to this symbol, but don't know the range of memory were this could be.
Does anyone know how to locate the calls to this symbol in WinDBG?
Thanks
|
|
|
|
|
If it is the microsoft symbols that you want select File -> Symbol File Path from the Windbg menu and enter the string SRV*<your local symbol folder>*http://msdl.microsoft.com/download/symbols .
If the symbols belong to the project you created, put your PDB file in a folder and give the path to that folder as stated above. You can separate multiple statements using ; .
|
|
|
|
|
Hi ,
I have created a windows service project WindowsService1 and i have Win32 console project AppServer which is also in the same solution.
Now when i saw my service details as
Service1
LOcation: C:\testing\WindowServerice1\WindowsService1.exe
But i want to have like
Service1:
Location: C:\testing\Appserver\Appserver.exe
Your help much Appreciated.
Regds
Jain
|
|
|
|
|
Are you just wanting to change the output directory? Look into the project settings.
Correct me if I got you wrong.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Hi Rajesh,
Thanks for ur reply.
Intially , i have 2 project in my solution (1)Win32 Application- AppServer , (2) Setup project .
from this i created an MSI and installed my AppServer.exe to local & remote machine.
Now my requirement is , i have to register my application as windows services, so i have added one more project as WindowsService1
from VC++->Windowservice option,
i have builded all the 3 project and installed my Setup project , i tried to start my exe from services.msc, but here i am able to see
Servicename: Service1
Path: C:\testing\windowsService1\WindowsServcie1.exe
not C:\testing\AppServer\Appserver.exe
I need my Servicename as : Service1
& Path as C:\testing\AppServer\Appserver.exe
i mean my service has to point to my Win32 application exe.
Plz thru some light on this
Your help much appreciated.
Regds
Jain
|
|
|
|
|
I'm not sure if you need a third project, just for the sake of registering your executable as a windows service. In my opinion, the setup must have provision to register a program being installed as a service. Have you checked on that?
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Yes Rajesh, i am able to install a service thru setup project (if i select windows service project template) ,
THE PROBELM IS:
i have
solution :testing
project1: windowsservice1 (Windowsservice project)
project2: AppServer (Win32 application project)---> this is my main application AppServer.exe
project3: ServerSetup (SetupProject)
If i do run my MSI file from ServerSetup, its installing AppServer.exe to C:\program files\AppServer\AppServer.exe
and in Services i have only Servicename: AppServer , Path :C:\program files\AppServer\WindowsService1.exe (instead of AppServer.exe)
i hope nw i expained correctly
Regds
jain
|
|
|
|
|
Hi All,
How can build my project(vc8) using batch file in both type i.e debug and release?
|
|
|
|
|
Try the devenv[^] command from Microsoft. Alternatively you can create your own makefile[^] and use that.
|
|
|
|
|
Visual Studio 2008 example
"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VCExpress.exe" "C:\Projects\Error_Code\Error_Code.sln" /rebuild Debug /OUT "C:\LOGS\Debug\Error_Code.log"
Visual Studio 2005 example
cd C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE
devenv.exe "C:\Projects\Error_Code\Error_Code.sln /rebuild Debug /OUT "C:\LOGS\Debug\Error_Code.log" /projectconfig Y3 /projectconfig EHsc /projectconfig RTC1 /projectconfig MDd /projectconfig RTCC /OUT
|
|
|
|
|
Hi All,
I am getting the error while building the project. What can be cause of this error......
names.obj : error LNK2001: unresolved external symbol _f002procedure_coverage_informat
names.obj : error LNK2001: unresolved external symbol _f000close_coverage_data_output_
names.obj : error LNK2001: unresolved external symbol _f000open_coverage_data_output_s
names.obj : error LNK2001: unresolved external symbol _f000finish_coverage_measurement
names.obj : error LNK2001: unresolved external symbol _initialize_code_coverage_module
run.obj : error LNK2001: unresolved external symbol _initialize_code_coverage_module
Debug_Test/ext_tests.exe : fatal error LNK1120: 77 unresolved externals
|
|
|
|
|
Check if you added to the Visual Environment, as a first step, the correct configuration for external libreries:
* Open Visual
* Choose menu "Tools" and select "Options"
* In "Projects and Solutions" and go to "VC++ Directories"
* Show directories for "Library Files" and "Include files"
* Add your libraries and includes you need for your project.
This is the most common error while linking
|
|
|
|
|
This application is in vc6 and I have no much idea about vc6...Could you tell me how to do in vc6
|
|
|
|
|
mmmm... I would say is basically the same :S
|
|
|
|
|
Hello all,
I´m trying to multithread an application by using CreateThread function. So far I´ve done the following:
LPDWORD iID;
HANDLE hThread;
hThread = CreateThread (
0,
0,
(LPTHREAD_START_ROUTINE)OpenCVWin32::Form1::Threadi,
NULL,
CREATE_SUSPENDED,
iID);
}
static DWORD WINAPI Threadi()
{
System::Windows::Forms::MessageBox::Show("Hi there!");
return 0;
}
When I launch the application, the thread is not created, as I cannot go inside the Threadi function. I´m right now using VC++ 2008. Does anyone has a suggestion on why this could be happening?
Thanks
|
|
|
|
|
kikoso wrote: CREATE_SUSPENDED,
This is the problem. If you use this attribute then the thread is created in suspended state. More Info Here[^]
If you want the thread to start as soon as you launch the application, don't create a thread in suspended state. If you want to create in suspended state, then you can use ResumeThread() function.
|
|
|
|
|
Thank you HimanshuJoshi. I was reading in zig-zag the doc, so I didn´t realize about it.
I still have some problems. After changing it, I have a problem accessing the memory. This is the error I got (after using 0 instead of CREATE_SUSPENDED,:
<br />
Unhandled exception at 0x003628c2 in OpenCV Win32.exe: 0xC0000005: Access violation reading at position 0x0000000c.<br />
I´ve been thinking about sending the 3 parameter as
(LPTHREAD_START_ROUTINE)&OpenCVWin32::Form1::Threadi,
But I got a different error:
error C3374: Address of "OpenCVWin32:: Form1:: Threadi" can only be adopted if a delegate instance is created.
I will appreciate any suggestions. Thank you
|
|
|
|
|
LPTHREAD_START_ROUTINE is defined as:
typedef DWORD (WINAPI *PTHREAD_START_ROUTINE)(
LPVOID lpThreadParameter
);
typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
so, your thread function is to be:
static DWORD WINAPI Threadi(LPVOID lpThreadParameter)
{
System::Windows::Forms::MessageBox::Show("Hi there!");
return 0;
}
|
|
|
|