|
Microsoft Visio...
or Dia if you like awful GUIs
|
|
|
|
|
Check the "Rational Rose" application. But it's not shareware. some times u can evaluate it...
its a good one
nave
|
|
|
|
|
check http://meesoft.logicnet.dk/ for their nice free diagram designer.
|
|
|
|
|
|
If you're looking for a UML diagram editor, I've been playing with StarUML[^], and I'm rather impressed with it -- although I've only done a couple of class diagrams so far.
Another reasonable alternative for UML diagramming is ArgoUML[^].
|
|
|
|
|
I double click on a file (eg: C:\MyFileName.pdf ).
Now in my MFC code, I want to check if that file is already open.
One way of doing this is using CFile::Open function with CFile::shareExclusive mode.
Is there any better way to acheive this?
|
|
|
|
|
ArtiGujare wrote: Is there any better way to acheive this?
Not that I am aware of.
"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
|
|
|
|
|
ArtiGujare wrote: ne way of doing this is using CFile::Open function with CFile::shareExclusive mode.Is there any better way to acheive this?
thats the only way, but there are many api that se same logic to achive that
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
|
See the "Extras" section of this article.
"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
|
|
|
|
|
1.Create a CFont object( This object should not be created with in local scope. Its better to create this object as memeber variable of the class )..
2. call CreateFont function of this object
3. Create the member variable of the static control( for this u have to change the id of static control from IDC_STATIC to some other name )
4. Call the SetFont function of the static control to change the font.
nave
|
|
|
|
|
Thanks NaVin.
Leya
|
|
|
|
|
Hi All,
Using Timeline in DirectShow Editing services I did video and audio mixing.
I want to save it in avi format.
This is the code I used to save it. But it is not saving anything localy. At run time it creates an empty avi file.
It disappears automatically.
IRenderEngine *pRender = NULL;
hr = CoCreateInstance(CLSID_RenderEngine, NULL, CLSCTX_INPROC,
IID_IRenderEngine, (void**) &pRender);
hr = pRender->SetTimelineObject(pTL);
hr = pRender->ConnectFrontEnd( );
CoCreateInstance(CLSID_CaptureGraphBuilder2, NULL, CLSCTX_INPROC,
IID_ICaptureGraphBuilder2, (void **)&pBuilder);
// Get a pointer to the graph front end.
IGraphBuilder *pGraph;
pRender->GetFilterGraph(&pGraph);
pBuilder->SetFiltergraph(pGraph);
// Create the file-writing section.
IBaseFilter *pMux;
pBuilder->SetOutputFileName(&MEDIASUBTYPE_Avi,
OLESTR("Output.avi"), &pMux, NULL);
long NumGroups;
pTimeline->GetGroupCount(&NumGroups);
// Loop through the groups and get the output pins.
for (i = 0; i < NumGroups; i++)
{
IPin *pPin;
if (pRender->GetGroupOutputPin(i, &pPin) == S_OK)
{
IBaseFilter *pCompressor;
// Create a compressor filter.
IBaseFilter *pCompressor;
CoCreateInstance(CLSID_AVICo, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void**)&pCompressor);
pGraph->AddFilter(pCompressor, L"Compressor");
// Set compression parameters.
IAMStreamConfig *pStreamConfig = NULL;
IAMVideoCompression *pCompress = NULL;
AM_MEDIA_TYPE *pmt;
pBuild->FindInterface(NULL,NULL,pCompressor,IID_IAMStreamConfig, (void**)&pStreamConfig);
pStreamConfig->GetFormat(&pmt);
if(pmt->formattype == FORMAT_VideoInfo)
{
((VIDEOINFOHEADER *)(pmt->pbFormat))->dwBitRate = 10000;
pStreamConfig->SetFormat(pmt);
}
pStreamConfig->QueryInterface(IID_IAMVideoCompression, (void**)&pCompress);
pCompress->put_KeyFrameRate(4);
Note: I am converting BMPs into video file and adding wav file for audio.
Please help me on this.
Thanks in advance
Poornima
// Connect the pin.
pBuilder->RenderStream(NULL, NULL, pPin, pCompressor, pMux);
pCompressor->Release();
pPin->Release();
}
}
|
|
|
|
|
Just a thought, I'm just guessing here:
Is it possible that the output file isn't closed properly? That usually gives a zero-length file.
Is there such a thing as:
pBuilder->Release();
?
|
|
|
|
|
Hi
Does anyone know how to set the default theme to an application
I write a SDI applications, they are always in XP Style, can
the application be set to start up in a different theme ??
thanks
Si
|
|
|
|
|
u can use SetWindowTheme function
nave
|
|
|
|
|
|
|
if I have rand() function which returns integers within 0...MAX, how to convert them to smaller scale like thru % or / operator or something very simple to say whole range of 0...MAX to scale to just 0,1,2,3 four numbers etc...
9ine
|
|
|
|
|
Your question is not so clear...
Did you mean that you want to get a small range of random numbers? Then use
num = rand() % MAX;
where MAX can be the upper limit.
- NS -
|
|
|
|
|
rand() % (MY_MAX+1) if you want the values between [0 : MY_MAX]
otherwise, like this :
(rand() % (MAX_BOUND - MIN_BOUND + 1)) + MIN_BOUND
|
|
|
|
|
Use this:
MINVAL + rand()%(MAXVAL-MINVAL)
Where MINVAL and MAXVAL are the range for your number.
|
|
|
|
|
thats good for splitting range of 0...MAXRAND to adjacent regions but how to split it to
MAXVAL=4
MAXRAND=100
[0...24][25...49][50...74][75...99] whole MAXRAND range divided to 4 regions
so if number from range [0...24] will result in 0, [25...49] in 1, etc...
if this will get more random like seq of 0,1,2,3 numbers MAXVAL-1
9ine
|
|
|
|
|
I don't understand what you are trying to do. When you want a random number, in general you want it to be between two bounds. What is the purpose of having several 'regions' ? And how to use that ? I mean if you to retrieve a random number from the 3 region, you know that this will be between 50 and 74. So, where is the problem ?
|
|
|
|
|
to not to produce
if(r<a)
else if(r="">=A && r<b)
else if(r="">=B && r
|
|
|
|