|
hi there..
thanks for your time..
i needed to know if its possible to know if a control is UI Activated already or not? and secondly which function is called when a control is UI DeActivated?
regards
safee
|
|
|
|
|
Hi...
I'm currently trying to creat an installer for distribution of my project. A setup project has been created for the purpose.
But the problem is that I dont want the registry setting for the application to be overwritten if the application already exist in the computer. Only d necessary upgrades will be updated to the old program.
Can anybody give me a clue on how to get it done?
Thank you
|
|
|
|
|
What installer program have you used ?
The installer programs generally have an option where you could tell it NOT to overwrite registry entries.
if urs don't have that option , don't make the entires in the installer instead make them from ur program which will be in a position to check for already made entries in registry
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
I'm sorry, I should have told this earlier. I'm creating one using the Setup and Deployment Project wizard in Visual Studio.
Under the Registry Editor, I've set the property to AlwaysCreate property to false but it still overwrites the registry keys eventhough it exist. Do I still have to add a condition?
Thank you
|
|
|
|
|
I have developed a non mfc application using vc++ 6.
I have designed the interface for this application as a vb ocx.
Now i have the vb ocx which contains all the interface for my applications
and now what i need is to know how i can use this vb ocx in my vc++ application as an interface to my vc++ application.
Just give me an idea like i create a form in vb and put some images and controls and make it into a ocx.
Now i need a solution how i can make that form visible in vc++ application
as an interface.
Thanks in advance
vimal
|
|
|
|
|
going n memory here, so forgive me if i make a mistake
with your project open in vc++
project menu
-- add to project
-- components and controls
-- registered activex controls
it should be listed there somewhere
double click in it and it should appear on your controls toolbox/bar thingy in your dialog editor
cheers
Bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
I need to send an extended ascii character to the active application with postmessage
PostMessage(msg->hwnd,WM_CHAR, 'a', 1)
Then it works where a is printed on the target window or any active window.
but when i use this like
PostMessage(msg->hwnd,WM_CHAR, 'þ', 1)
then the message is not sending the extended ascii character
I am using this in win98 and so i cannot use unicode character
i couldnt figure out the mistake i am making and so if there is anybody who can help me with this and find out and tell me out to send an extended ascii character to the application using postmessage
Thanks in advance
vimal
|
|
|
|
|
Hello most excellent CPians
My boggle [^]is thus :1 client connections the threads do not always perform properly and can "hang" when trying to accept a socket.
But it always performs properly when there is only 1 client connection.
I was wondering if anyone had any thoughts/suggestions/experience in this multithreaded nightmare on codestreet?
regards
Bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
Are the listening threads on the same port, or different ports?
|
|
|
|
|
|
What I/O model does the server utilize? You mentioned a non-blocking I/O, but which one?
In general, a design where each client corresponds to a unique workter thread on the server-side is overkill.
Kuphryn
|
|
|
|
|
|
Correct.
I was referring to the I/O model that the client/server utilizes such as WSAAsyncSelect, WSAEventSelect, Overlapped Model, and Completion Port Model.
Kuphryn
|
|
|
|
|
oh (sorry it took so long to get back to you but i was in NZ for me dad's birthday)
well
i'm not using any of the above (that i'm aware of), just using what i believe is standard berkley style sockets operations
cheers
Bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
I'm programming an application that can grab a frame from a video. DirectShow can help me to realize this function. 2 days ago I found an article named Extracting Bitmaps From Movies Using DirectShow (Written by Markus Axelsson) and downloaded its source code for reference, and then some problems accured. The source code could be built successfully in the environment of VC 6.0 and DirectX 9.0b, but could not execute properly. The application could not grab a frame from a MPEG file at all. In order to find the reason, I made test. Firstly, I ran the program in another computer, and its DirectX version was the same as my own computer's. The result was failure. Then I ran the program in a computer which DirectX version was 8.1, and I found surprisedly that a frame did have been extracted successfully from the MPEG file. The following test was to run the program in the environment of DirectX 6.4. The result was still failure. So my conclusion is that the program is only compatible with DirectX 8. The following code fragment is extracted from that source code I've downloaded. Through debug, I find the sentence "pMediaControl->Run()" will be wrong in DirectX 9. The return value of the function Run() is not 0 but 1. So my questions are:
Why does the error occur?
How to resolve the error?
>> Appendix 1:
The code fragment--
// Create graph builder
CComPtr<igraphbuilder> pGraphBuilder;
HRESULT hr = ::CoCreateInstance(CLSID_FilterGraph, NULL,
CLSCTX_INPROC_SERVER, IID_IGraphBuilder,
(void**)&pGraphBuilder);
if (FAILED(hr)) return hr;
ASSERT(pGraphBuilder != NULL);
// Create Grabber filter
CComPtr<ibasefilter> pGrabberBaseFilter;
CComPtr<isamplegrabber> pSampleGrabber;
AM_MEDIA_TYPE mt;
hr = ::CoCreateInstance(CLSID_SampleGrabber, NULL,
CLSCTX_INPROC_SERVER, IID_IBaseFilter,
(LPVOID *)&pGrabberBaseFilter);
if (FAILED(hr)) return hr;
pGrabberBaseFilter->QueryInterface(IID_ISampleGrabber,
(void**)&pSampleGrabber);
if (pSampleGrabber == NULL) return E_NOINTERFACE;
hr = pGraphBuilder->AddFilter(pGrabberBaseFilter,L"Grabber");
if (FAILED(hr)) return hr;
// Set media type
ZeroMemory(&mt, sizeof(AM_MEDIA_TYPE));
mt.majortype = MEDIATYPE_Video;
mt.subtype = MEDIASUBTYPE_RGB24;
mt.formattype = FORMAT_VideoInfo;
hr = pSampleGrabber->SetMediaType(&mt);
if (FAILED(hr)) return hr;
hr = pGraphBuilder->RenderFile(wFile,NULL);
if (FAILED(hr)) return hr;
CComPtr<imediacontrol> pMediaControl;
CComPtr<imediaevent> pMediaEventEx;
// QueryInterface for some basic interfaces
pGraphBuilder->QueryInterface(IID_IMediaControl,
(void **)&pMediaControl);
pGraphBuilder->QueryInterface(IID_IMediaEvent,
(void **)&pMediaEventEx);
if (pMediaControl == NULL || pMediaEventEx == NULL)
return E_NOINTERFACE;
// Set up one-shot mode.
hr = pSampleGrabber->SetBufferSamples(TRUE);
if (FAILED(hr)) return hr;
hr = pSampleGrabber->SetOneShot(TRUE);
if (FAILED(hr)) return hr;
CComQIPtr<imediaseeking> pSeek = pMediaControl;
if (pSeek == NULL)
return E_NOINTERFACE;
LONGLONG Duration;
hr = pSeek->GetDuration(&Duration);
if (FAILED(hr)) return hr;
int NumSecs = int(Duration/10000000);
REFERENCE_TIME rtStart = 1 * 10000000;
if (NumSecs < 1)
rtStart = 0;
REFERENCE_TIME rtStop = rtStart;
hr = pSeek->SetPositions(&rtStart, AM_SEEKING_AbsolutePositioning,
&rtStop, AM_SEEKING_AbsolutePositioning);
if (FAILED(hr)) return hr;
CComQIPtr<ivideowindow> pVideoWindow = pGraphBuilder;
hr = pVideoWindow->put_AutoShow(OAFALSE);
if (FAILED(hr)) return hr;
// Run the graph and wait for completion.
hr = pMediaControl->Run();
if (FAILED(hr)) return hr;
>> Appendix 2:
URL of the source article--
http://www.codeproject.com/audio/framegrabber.asp
|
|
|
|
|
Hi there
I got a message "Cannot access the ClassView information file. ClassView information will
not be available", when I open my workspace. can someone tell me why?
By the way, i also can not insert a new class.
Thanks
|
|
|
|
|
Your project's *.CLW file is readonly change that
Hope it helps
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
ya , thats true and it works!!! and will always work
cheers
balkrishna Talele
|
|
|
|
|
Check the propery of the *.clw file.If readonly ,it may cause the above question or u can delete *.clw file and VC6.0 will create a new *.clw file for u !
|
|
|
|
|
e.g.
int *pA = new int;
*pA = 10; //此时捕获事件?
SetAValue(10);
I don't want to overload the operator '='.
Can I do it?
or
What is the way the transaction of the database?
Best regards!
|
|
|
|
|
e.g.
int *pA = new int;
*pA = 10; //此时捕获事件?
SetAValue(10);
I don't want to overload the operator '='.
Can I do it?
Best regards
!
|
|
|
|
|
I had posted this query on COM forum, but on advise from Cata re-posting it here.
I'm quite new to VC++ programming. I need to develop an application which has independent pluggable modules (DLL ?) with the core application passing some arrays of data to the plug-ins and getting back the processed data from the plug-in. The core application should run without error even if any corresponding module (plug-in/DLL) is missing at run-time. The core application should also be able to detect any new plug-in and load it dynamically. Any changes to the plug-ins should not require the core application to be re-built.
Grateful if anyone could advise the best possible solution to the above mentioned task - use explicitly linked DLLs or use COM ? Any sample codes or articles available for this?
I'll be using VC++ 6.0. Thanks a lot in advance !
|
|
|
|
|
Keep all ur DLL's in specified Directory and enumerate all files in that directory.
Load ur DLL's at runtime via LoadLibrary and check whether it loaded successfully , if it didn't then assume it is not there and goto next DLL.
Don't use LIB files for DLL's ! otherwise if the dll is not present it will not run
you could add a special function in ur dll e.g
AreYouMine();
which can assure that the dll is urs and it is to be loaded
Hope that helps
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
Thanks Monty. I'll try that. But do you think COM would be a better solution instead of explicitly linked DLLs?
Cheers and a Happy New year....
|
|
|
|
|
I posted one article on this subject Plug-in architecture for MFC using MESSAGE_MAPS[^]
If you just need function calls etc and not the message map ability, then a lot of the code should still be applicable to what you need. especially the stuff that loads in the available plug-ins etc. It should be a good start to get yourself going if you do not use the actual technique presented.
HTH
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|