|
Look here[^], you'll probably found what you want.
|
|
|
|
|
mmm ...it looks a problem that I can't solve in only 3/5 minutes!
I'll study this problem later.
Thanks anyway.
Have a nice code day
|
|
|
|
|
|
|
Thank you,
I think that now I could (simply) solve my problems.
Have a nice code day
|
|
|
|
|
How to know whether one particular font is installed in my system or not?
I want to use CreateFont() for static. And if the specified font is not there then I want to set a default font. For that I want to check whether the font is installed in the system or not?
|
|
|
|
|
EnumFonts() to get ID (name) of the font.
A nice hyper tool for optimizing your Microsoft html-help contents.
A best image tool for Windows C++ programmers, don't miss it!.
Includeh10
|
|
|
|
|
Thanks.
But what exactly I want to know is can I check whether a font (say "Arial") is installed in my system?
|
|
|
|
|
Now I do something about barcode, some barcode uses Fonts, some uses draw lines.
this post is not related to barcode, but it is caused from barcode.
a vertical line can be printed by 2 methods:
1. by font (such as character '|')
2. by drawing (such as LineTo())
as I tested, vertical line is printed much clearer by font than drawing for both laser and inkjet printers, do you know why?
A nice hyper tool for optimizing your Microsoft html-help contents.
A best image tool for Windows C++ programmers, don't miss it!.
Includeh10
-- modified at 12:33 Monday 27th March, 2006
|
|
|
|
|
Well that's because of anti-aliasing I suspect. If you use a font it's scaled and a line is a line independing from the dpi. Using a line it depends on the scaling and the printer tries to optimate it, because it's graphic. So anti-aliasing will be used and the line is not not a clear as the font. For a whole picture this line is better, but as element of text or barcode it's not as good as the alternative.
Greetings,
Ingo
------------------------------
PROST Roleplaying Game
|
|
|
|
|
do you know how to create truetype font for Barcode?
I think barcode fonts are much easier to be created because they are just lines, but I don't know start point, any more help?
is anti-aliasing something about true-type?
is font graphic?
what does dpi mean?
sorry, too many questions.
thx
A nice hyper tool for optimizing your Microsoft html-help contents.
A best image tool for Windows C++ programmers, don't miss it!.
Includeh10
|
|
|
|
|
includeh10 wrote: I think barcode fonts are much easier to be created because they are just lines, but I don't know start point, any more help?
Uh well. I designed a Font using a Font-Editor. When you google for them you should find a free one. It's the easiest way. You can even create a font without an editor, but therefor you have to read the specifications and it's hard work, I think. I read parts of it, but then downloaded the editor
includeh10 wrote: is anti-aliasing something about true-type?
No. It's something about Graphics. If you draw a diagonal line it shouldn't just consist of the points in the color the line should have. You have to draw some points near to the line in color mixed from the background and the linecolor, so the line looks like a line and not only like some dots.
includeh10 wrote: is font graphic?
Well everything displayed on the screen can be called graphic. (Truetype) Fonts consist of vector-graphics. So, yes they are graphics but a printer don't uses anti-aliasing for displaying them.
includeh10 wrote: what does dpi mean?
DPI = dots per inch
includeh10 wrote: sorry, too many questions
No problem. I can stop to work for a moment to answer them. This won't make my boss happy - but I like it. :->
Ingo
------------------------------
PROST Roleplaying Game
|
|
|
|
|
Hi,
I want to create(not create but to load) activex control dynamically, so that I am using the CWnd::CreateControl function. I have to put x numbers of the control on the window. I want use all the porperties of the controls also. Can I achieve this using above methodology?
I have tried another way by inserting the active control in application(wizard option), now what I want to do is that if user says that he wants 5 controls on the window code should display 5 controls. How I can achive this?
Thanks
|
|
|
|
|
You could use the files generated by the wizard. Use a for loop to create the number of controls you need and use an array, list, or map to hold pointers to your created controls.
|
|
|
|
|
BOOL bStat=FALSE;
bStat= m_ControlWrapper.CreateControl (
strControlProgID,"",WS_VISIBLE,cRect,this,5000,NULL,
FALSE,NULL);
IOleObjectPtr pOleObj(m_ControlWrapper.GetControlUnknown ());
LPUNKNOWN lpUnknown=m_ControlWrapper.GetControlUnknown ();
now the problem is that I want to queryinterface and want to call the methods and properties. For that I have taken IDL generated by OLE view and added to the project and compiled.
IWebAgentModulecom iInterface= NULL;
the above statement gives errors "cannot instantiate abstract class due to following members"
Do I have to import the DLL??
Any Idea??
Thanks
|
|
|
|
|
Let MFC create the classes for you by adding the control to a dialog.
|
|
|
|
|
|
Giorgi Moniava wrote:
1) Is there any way to determine the maximum value that I can specify for SIZE variable ?
2GB in theory.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hello Giorgi Moniava!
Don't u know about the range of each Primary data type in C.
ex:
int -32676 to 32678 (I hope this is right)
and I don't think that u can assign a value greated than this to an int variable (ex:705301340)
|
|
|
|
|
Shoaib Patel wrote: Don't u know about the range of each Primary data type in C.
have you tried same in Windows Environment :- sizeof(int) = 32 bit = 2^32.. ok
|
|
|
|
|
Hey,
I am having trouble capturing video from my pc cammera. The directx SDK
directshow sample "Play Cap" have developed my previewing skills. But capturing is not going so well. In the DX9 Book it is said that just by making some minor changes in the ICaptureBuilderGraph2::RenderStream() we developers be able to capture live video. But thats not happening. In the
"Play Cap" sample code when i do this minor changes as told it raises an error.
<br />
<br />
IBaseFilter *pMux;<br />
<br />
hr = g_Capture->SetOutPutFileName(&MEDIASUBTYPE_Avi,<br />
L"C:\\Test.avi",<br />
&pMux,<br />
NULL);<br />
<br />
hr = g_Capture->RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Avi,<br />
pSrcFilter, NULL, pMux );<br />
<br />
pMux->Release();<br />
pSrcFilter->Release();<br />
<br />
hr = setupVideoWindow();
<br />
|
|
|
|
|
I don't see a video renderer filter, so how can you setup the video window?
You seem to have only created a graph for capturing video to disk.
|
|
|
|
|
dear hfry,
I didn't gave the whole code. In the paragraph it is mentioned that the "Play Cap" sample code which comes with dx9 SDK helped me develop some understanding of video capture. Now if you have seen the Source Code of "Play Cap" you will understand where in between that code i have inserted these lines. I have mention that after the line "g_pCapture->AddFilter()".
Which you will find in the Funtion VideoCapture() "(Play Cap)" Source code.
If even then you need the code then i will write the code for you.
Thanks for the reply.
|
|
|
|
|
I have taken the trouble to look at the sample. Did you add your capture code after
<br />
hr = g_pCapture->RenderStream (&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Video, pSrcFilter, NULL, NULL)<br />
?
Or did you modify it into your capture code?
If you render a video stream with the destination as NULL, it will render it to the default video renderer (The old video renderer usually, and VMR7 in non-mixing mode on Windows XP).
edit:
That said, if you want to do both capturing to disk and previewing to the screen, always render the preview pin first. That way in the event that there isn't a real preview pin, a smart-T filter will be inserted so you can do the capture. From memory AFAIK, I don't think the smart-T gets inserted if you render the capture pin first and there isn't a preview pin.
-- modified at 9:09 Monday 27th March, 2006
|
|
|
|
|
Million thanks,
Now it seems you have almost understood my problem. I have added the code
below before the line you have mentioned and ommited it. The code below gives error when i give "renderstream" pMux Pointer. If i leave it null the code runs but video doesn't gets saved. This code is supposed to capture the live
video.
<br />
IBaseFilter *pMux;<br />
<br />
hr = g_pCapture->SetOutputFileName(<br />
&MEDIASUBTYPE_Avi,
L"C:\\Example.avi",
&pMux,
NULL);
<br />
if(FAILED(hr))<br />
{<br />
Msg(TEXT("Couldn't create save file..."));<br />
}<br />
<br />
hr = g_pCapture->RenderStream(<br />
&PIN_CATEGORY_CAPTURE,
&MEDIATYPE_Video,
pSrcFilter,
NULL,
pMux );
<br />
pMux->Release();<br />
<br />
the code below remains as it is. <br />
|
|
|
|