|
the missing include is #include <stdio.h>
Joao Vaz
|
|
|
|
|
Other basic question,Have your sure that your CreateInstance is something like this :
HRESULT hr=CoCreateInstance(CLSID_Something, CLSCTX_SERVER, NULL, IID_IDataObject, (void *)&m_pIDataObjImage);
It seems that your idataobject pointer is illegal ? you checked the value ?
Joao Vaz
|
|
|
|
|
Hi,
The bad thing is that to add the ActiveX to word I have to create it calling the automation method:
m_pWord->GetSelection()->InlineShapes->AddOLEControl(vClassType);
But I will try that in a dummy program and see if it returns the right pointer.
Braulio
|
|
|
|
|
Hi Joao !
The problem with all the picture stuff, was finally that my object used msxml as well,and I had a problem with the versions... ( DLL Hell with this MsXML), I remove the entries for the XML and it seems that it works fine... ( so the article that I wrote is still right )
Thanks Joao for all your help!
Braulio
|
|
|
|
|
Usted no tiene qué
(I hope this make sense )
Cheers,
Joao Vaz
|
|
|
|
|
hi,
i have some vc++ managed code and i cuse it from c#~, but there is some functions that takes a parameter by reference, the functions declarations shows like that
bool GetValorDouble (LONG lVarId, double &dValue)
when i try to use it in c# the function requires i pass a double* parameter.
now i see two possible solutions, but i have no solutions for none.
a) the way to pass parameter from c# (pass a double*)
b)modify the function in vc++, so i can pass in a simple way a double in c#.
I am with this problem a lot of days and i don't see nothing similar in the net.
Any Idea is welcome, thanks a lof in advance, and sorry my english.
|
|
|
|
|
Try putting the call in an unsafe block
Nish
I am looking for a free racing game. Old style racing game without any complicated 3D stuff. Around 4 MB download. If anyone has such a game, please inform me.
|
|
|
|
|
Hi,
I'm doing a web project which requires a way to send a huge number of emails to subscribers (like a mailinglist). and this point is very important : mails must be sure to be sent.
I now write a C++ app. on Windows 2000 server, use CDONTS component to send mail. this is very convenient, but i faced a problem : CDONTS relies on SMTP service of IIS, and in pretty poor internet connection, IIS's SMTP service seems stucked for pretty long and seems not reliable.
Do you have any better solutions ? many thanks
trieuhainguyen@pyramid-consulting.com
|
|
|
|
|
Ok I know how one function can write multiple lines with \r\n but I want multiple functions writing to one edit box with no previous data being overwritten. for example I have a dialogbox with two buttons and an edit box.
When the first button is clicked:
CString S1 = "William Jefferson";
CString S2 = "Bill Clinton";
m_Multilines.Format( "%s\r\n%s", S1, S2);
UpdateData(FALSE);
And when the second button is clicked I want to display another string underneath this one but I can never do it without erasing the previous data, can someone please help me to implement this correctly?
comimh
|
|
|
|
|
UpdateData(TRUE);
m_Multilines += "\r\nAnother line";
UpdateData(FALSE);
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Two UpdateData calls eh?
The purists will frown
Nish
I am looking for a free racing game. Old style racing game without any complicated 3D stuff. Around 4 MB download. If anyone has such a game, please inform me.
|
|
|
|
|
Nish [BusterBoy] wrote:
The purists will frown
I'm looking forward to it
Anyway, here's another version:
CString strx;
GetDlgItemText(IDC_EDIT1, strx):
strx += "\r\nAnother purist bites the dust";
SetDlgItemText(IDC_EDIT1, strx);
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Look up CEdit::SetSel
Nish
I am looking for a free racing game. Old style racing game without any complicated 3D stuff. Around 4 MB download. If anyone has such a game, please inform me.
|
|
|
|
|
How can i create fancy dialogs as that we can see in MSN messenger. In MSN messenger various dialogs consist of property tabs/sheets. But these are not of the style of standard win32 type tabs. Instead their structure is like fancy picture. How can i achieve this ????????
Farheen Shah
|
|
|
|
|
Do you meant the tabs for the Options?
According to SPY++, these are a standard windows control. It is possible that they have used some custom draw techinques. Have a look here http://www.codeproject.com/tabctrl/ for more info.
Michael
|
|
|
|
|
No, i didn't mean the "options dialog tabs" you mentioned !!!
The correct example is that of "send file or photo" dialog.
Farheen Shah
|
|
|
|
|
Okay, I see the ones you mean know.
This is a pretty simple trick. According to SPY++, these are button controls and not tabs. I'm guessing it's just an ownerdraw bitmap button with maybe use of the RGN GDI stuff to shape the button. I'm sure there must be an article on CodeProject which shows how to do this.
Clicking the buttons must just hide one set of controls and show the others.
Michael
|
|
|
|
|
Hi an need to spy on a text window that is displaying strings. Everytime this window displays new text i need to retrieve the new text and save it to a database in my app. I suppose i need to set up a hook to accomplish this?
I can get a handle to the window and when using Spy+ and when the window is displaying text the only message i can see is WM_PAINT..
How can i get the text beeing displayed in the window? Dont want all text in the window, just the latest string that was displayed.
|
|
|
|
|
This text window is in your process or in some other process?
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
It's in a different process, a different application that i don't have the source to...
So im not sure it's possible to do what i want, but maybe i can do it with a hook?
|
|
|
|
|
OK - hook will do.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Thanks!
I'm not very familiar with hooks tho... do you have some sample code for this?
I do have a sample of a mousehook so i know where to start, but I'm not sure how to set it up so i get the text i want.. what message to spy on...
What type of hook do i need to set with SetwindowsHookEx?
|
|
|
|
|
If you plan to monitor changes in edit box, it's probably best to hook its parent and wait for EN_CHANGE notifications, which are sent through WM_COMMAND.
The hook you need is WH_CALLWNDPROC. Search MSDN for SetWindowsHookEx - there should be some examples.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
How to get the applicatin path of the programm? in MFC and win32
Gaurika Wijerane
|
|
|
|
|
GetCurrentDirectory
or
GetModuleFileName
|
|
|
|