|
Hello!
Here is a way to do it.
1- Add the ActiveX to your project and you will get a .h and .cpp file that descripes the control.
2- Let us say the class is CMyCoontrol
CMyControl ctrlActiveX;
if(!ctrlActiveX.Create(NULL, WS_CHILD, CRect(0,0,0,0),
AfxGetApp ()->GetMainWnd(), WM_USER + 9999, NULL,
FALSE, NULL))
{
AfxMessageBox("Could not create object");
return FALSE;
}
// Control is created successfully do your work here
......
|
|
|
|
|
Hi
just add the ActivX to your project (Project / Add to project / Components / ActiveX. This will create a cpp and a header file and you can just call Create(..).
No need for a dialog at all.
Kurt
|
|
|
|
|
Is there any way of printing an adobe pdf file using vc++ 6.0?
Any response any one can give me will be greatly appreciated.
Sincerely,
Erich J. Ruth
|
|
|
|
|
I have been posting answers in CodeGuru and now I want to become a frequenter of CodeProject.
--Anthony Mai
|
|
|
|
|
Hi.
I created a cd player of my own using MCI. It is working fine on windows 9x.
I noticed a strange behaviour on windows 2000:
If i run my player and there is no CD in the drive, my app successfully open the cd device (MCI_OPEN),
but from this point windows explorer cannot access the cd drive even if I insert a data cd.
If I run my player and a cd is present in the drive everything works fine..
Any Idea?
Yaron
Yaronmiz@clockwise3d.com
|
|
|
|
|
Hi
I noticed that when I run MS CDPlayer and the cd device is already opened by another application,
the CD Player waits untill the device is free, and then take the control over it.
I wonder how are they doing it? Is it by polling and checking the MCI_SYSINFO or Is there any
notification from windows that the CD device is available for MCI_OPEN?
Hope you have any idea.
Yaron
|
|
|
|
|
There is anyone that can help me know how to implement application like microsoft money ?
I would like to know how it's developed and if there is something tools that can help me to develop like this.
Thanks
Antonio Patarozzi
|
|
|
|
|
Hi,
I wanted to know if there is a way to cause every application (installed on my computer, even those I didn't develop) to load a specific dll...
thx
Jonathan
|
|
|
|
|
Jonathan,
I found this on Deja, but not much else. Maybe someone else will have more hands-on experience with this:
>>
Hi, All!
I have following problem: When user executes particular process(console) I need insert my DLL into this process as soon as possible. I need this for NT and 98.
There are several ways to do this but none of them doesn't give full = solution.
1. Use hooks(SetWindowsHookEx). This is nice solution that works on both systems, but my hook DLL will be loaded to target process, only when one of the events i'm hooking occurs. And this is too late for me.
2. There is some registry key where I can put name of my DLL and it will be loaded to every process. Two disadvantages: works on NT only and reboot is needed.
3. Use technique used by Richter in his book using CreateRemoteThread. This one is good, but still works only on NT.
Does anybody knows other usefull technique for doing this.
Regards, Dennis
<<
|
|
|
|
|
This can not be done. And whatever your legitimate purpose is, there must be a better approach to implement it.
And your request sounds and smells suspiciously like a virus project: It fits the definition of a computer virus
|
|
|
|
|
I agree about the suspiscious smell
Actually I think it sounds and smells more like a Worm !
(technically different animals)
Unfortunatly I believe it can be done under some circumstances.
1. Using IE 4+ with low security settings,
2. Lack of a good firewall
3. Silly user,
I'm unsure how possible it is with WinNT and W2K
but it sure works with Win98.
But as to posting how it is done,
No I won't unless the person wishing to do so,
Contacts me and explains why they wish to do it,
with a legit reason etc. And then I'll only tell them
which MS-Press books to buy
Regardz
|
|
|
|
|
Hmmmm, I hadn't though of malicious uses of the information. I don't think the info is really that hard to find, MSDN documents the processes pretty thoroughly.
I've run into circumstances that would require this process, for example, imagine you wanted to add spell checking to standard edit controls, in every application.
So, Jonathan, let's hear about what you're trying to do, so we keep everyone motivated to share.
|
|
|
|
|
Hi to all Suspicious People,
My simple purpose for that is, that I have to launch a third-party application via automation, and due to some reasons that 3rd party application, crashes. In order to "avoid" that crash dialog box, and make the crash cleaner, I wanted to catch the 2nd try exception, and when caught, to shut-down that problematic application....
That's All....
Hope you can sleep better at night now...
Jonathan
P.S.
Still intereted in answers please...
thanks
|
|
|
|
|
I am learning how to use DirectX from a book (SAMS Teach Yourself DirectX 7 In 24 Hours - although it received some negative reviews, on the whole I think it is pretty good).
I have got some DirectSound code working, but only on certain WAV files. The WAV files that work properly have 8 as the wBitsPerSample member of the WAVEFORMATEX structure. The ones that don't have 0 as this value (what actually happens is that the sound plays as fast as it can go, rather than using the frequency it should be played at).
In the VC++ docs (VC++ 6) it says that that member CAN be 0 if the format is not PCM, as sometimes this member can't be used in the compression algorithm the WAV uses.
I also notice that the cbSize member can indicate that the WAVEFORMATEX structure has some extra bytes tacked onto the end, so I duly coded to allow for this and passed the extended structure to CreateSoundBuffer(). Although it didn't cause a crash, it made no difference whatsoever.
Does anyone know if I am doing something wrong? How can I overcome this problem? According to the book DirectSound can handle ANY format...
|
|
|
|
|
Hi,
I had developed a DeskBand. Now, I wish to put this DLL in download section of my website where surfer can install it from the web like Installing Yahoo! Companion. I think it can be done either using VBScript or JavaScript but need some good suggestions.
Thanks in Advance
|
|
|
|
|
You can use the VB installer or Install shield to make a package for the web. the cab will build in the registration INF which will download and install the file.
-Erik
|
|
|
|
|
in my program i need to enumerat all the drives shared in my network(a NT domain).Although the drive C is shared by default on a NT server,and i logged in as an administrator,
i could not find it in ::SHBrowseForFolder dialog.
help needed!
|
|
|
|
|
Is there any method to convert CBitmap object in to a bitmap file
|
|
|
|
|
HI..Need Help!
I created a edit box subclassed by CWnd, not by CEdit.
I did this for custom UI handling.
It works well.. But I need the control not to lose the
focus anytime.. Even another button contol clicked..
I tried to remove the code in CCmdTarget but it doesn't
work well...How can I do this?
Any Suggestion appreciated..
Regards..Bajy
|
|
|
|
|
Hello!
Include a handler for WM_KILLFOCUS message in your CWnd derived class that you use for subclassing edit box. in this handler you have to call SetFocus function to gain focus back to the control.
Alternatively you can handle EN_KILLFOCUS notification in the edit box' parent window. In the handler for the notification you have to do the same - set focus back to the edit box using SetFocus() function.
Regards,
Andrei Zenkovitch
Dundas Software
|
|
|
|
|
Hi!
I created an ATL project and checked "Support MFC" in the ATL COM AppWizard. Then, I added some code to create a CTreeCtrl object.
I had to #include afxcmn.h to compile the project(because of the CTreeCtrl).
The problem is, I'm getting debug assertion failures inside CTreeCtrl::Create because the AfxGetInstanceHandle() returns NULL.
Should I be able to use CTreeCtrl(and other common controls) inside an ATL project?
|
|
|
|
|
You don't have to use "Support MFC" in an ATL-project when you want to use the TreeCtrl.
Check my website www.braem17.yucom.be (ATL - SAWEditListCtrl). It gives you an example of how you can use common controls in ATL.
|
|
|
|
|
Although you don't need mfc to use it... when you need an instance... try _Module.m_hInst
|
|
|
|
|
I bet you're doing your CTreeCtrl stuff in an exported function or COM method, right? You need to add this line at the very beginning of the function/method:
AFX_MANAGE_STATE(AfxGetStaticModuleState());
This sets up some internal data structures so all the MFC code knows where to find resources and other stuff.
|
|
|
|
|
I am making a form-based executable with numeric edit boxes. Is there any way to make it so the contents of an edit box are selected with a single click? I want to make it easy for people to replace the contents if they're not accustomed to tabbing or double clicking, but I don't want the contents cleared or changed unless they choose to do so.
I tried using OnSetFocus with a SetSel(0,-1) command, but it didn't do anything.
|
|
|
|