|
Hello there,
i have a question. I want to draw on my webcam live view.
I create a capture window with capCreateCaptureWindow(...)
and start with capPreview. Then i can see the live view on my dialog.
I want to draw on this. But it doesnt work.
Before I start the capPreview i can draw on dialog at the live view position.
But as soon as i start capPreview i can the live view but i cant see
the drawings anylonger. Then i put an extra picturecontrol on my dialog and it works.
i can draw on it and it lies over the live fiew, but it flickers.
Is there any way to draw on my live view without placing an extra picturecontrol on my dialog?
I read that there are 3 ways getting the image of a webcam throught Vfw.
First is the capPreview and another one is to avoid caPreview. Instead it uses
the capSequenceNoFile. It requires to create a DIB and draw it on the dialog.
greeintgs,
cmos
|
|
|
|
|
Hi, I'm using VC++08EE and am trying to embed a file "smile.png" in my application. It will be a texture for a cube in a direct3D application.
I right click on my project in the solution explorer, click "add existing file", select my file, and then click okay. Now the problem is, when I compile and run the application, the file is not actually included in the build. I check the file size of the .exe and it is only 11kb, yet the image itself is 52kb. How do I get this image to actually be INCLUDED in the .exe?
My other question is about how to reference files in a directory above the current one - lets pretend we have the following directory structure;
|
|
+-My Program
| |
| +-Bin
| | |
| | +-App.exe
| |
| +-Textures
| |
| +-smile.png
|
|
So if I want to access "smile.png" from within "App.exe" what path should I enter? I know I can enter the full path to the file but this is tedious and if the user changes where the program is installed to, then big troubles can arrise. Some programs would appear to use "..\" as the "Up one folder" command. I have tried setting the path to "..\Textures\smile.png" but that doesn't work either. What do I do? :S
|
|
|
|
|
I guess you have to add the file as resource by importing from resource window.
and and instead of relative path you can get current application path and then change the last folder to one which you want I hope it makes sense
|
|
|
|
|
how do i import it from the resource window? :S the VC++ help said something about referencing the file in a .rc file, but ever since I've updated to vc++2008 (from 2005), .rc files havent been an option in the add new file dialog.
and how do I go about getting the current application path? vc++ help returns nothing of value.
EDIT: Problem 2 solved - I was using ".../Textures/smile.png" instead of "../Textures/smile.png" (There's an extra period at the start there)
Problem 1 remains unsolved.
modified on Tuesday, May 27, 2008 9:06 AM
|
|
|
|
|
i mean you need to import your png file as bitmap then only it will be part of EXE.
i dont have 2008 with 6.0 - 2005 resource opens with Ctrl+R as well as from menu Insert Resource.
|
|
|
|
|
I've tried importing it as a bitmap but this doesn't make any difference.
ctrl+r isnt a valid shortcut in 2008. I also can't find this menu you speak of
|
|
|
|
|
Visual Studio Express Edition comes without a resource editor.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
is it??
|
|
|
|
|
Thanks, looks like I'll just have to place all my files outside of the executable.
|
|
|
|
|
Hi All,
Can any one tell me how to post a message from worker thread to UI thread and vice-versa.
Thanks in Advance
|
|
|
|
|
kuttiam wrote: from worker thread to UI thread
You can only post messages to UI threads.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
You can use events for worker threads.
You cant send message to worker threads.
|
|
|
|
|
kuttiam wrote: Can any one tell me how to post a message from worker thread to UI thread and vice-versa.
If you have the thread id then use PostThreadMessage . You should have a message loop running in the thread proc.
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
kuttiam wrote: Can any one tell me how to post a message...
Other than PostMessage() ?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I am using Bluesoleil sdk to get the information from a nokia phone on pc and also use the phone's services on pc. I need to get the battery level and signal strength from the phone and display on my gui.
The sdk provides an api Btsdk_VendorCommand for this. It uses a structure called BtsdkVendorCmdStru.
typedef struct _BtSdkVendorCmdStru
{
BTUINT16 ocf;
BTUINT8 param_len;
BTUINT8 param[1];
} BtSdkVendorCmdStru, *PBtSdkVendorCmdStru;
The structure BtSdkVendorCmdStru contains information about a vendor
specific command .
Ocf Specifies the OpCode Command Field value of this
vendor specific command.
param_len Specifies the size in bytes of the content in the buffer
pointer by the param element.
Param Pointer to the buffer containing the command
parameters.
I need some help as to what value should be passed to each of the members in the structure. any help would be great...
Thanks in advance.
|
|
|
|
|
Did you try to use AT commands directly??
|
|
|
|
|
Hello
Is there any way to start a program with command line parameters form MFC console application?
I appreciate any link or information about this
Tnx,
Best regards
Mihai
|
|
|
|
|
See here[^]
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hi all,
i m using a DateTimeCtrl in VC++2005.
i want initially the editbox of it is blank ,can this is possible,
or how can enter the selected date value in editbox.
please tell me.
thanks for help.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
ThatsMe. wrote: i want initially the editbox of it is blank ,can this is possible,
See MSDN article Q238077.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
its not working its show the date in shortdate format.
please tell me another answer.
thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
use the second approach in [Q238077^]
if not working you didn't exactly followed it, in the m_dateCtrl.SetFormat(" "); //one blank, have you put blank space, if you put empty string "" without space won't work.
|
|
|
|
|
Thanks, r u right , i m using this without one space thatswhy its not working.
now its working.
thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
how can enter the selected date value in editbox.
please help me for this also.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
when the date is selected in the embedded calender, this string is formatted and entered into the edit box of datetime picker control. or explain what do you want.
|
|
|
|