|
I know how to find the location of the system tray itself (thanks to Chris' article on the subject), but how can I find the location of a specific icon? Microsoft can do it, but I can't find any information on how to do it myself.
____________________
David Wulff
Jason Jystad wrote:
You sir, are a nut.
Jason Jystad also wrote:
You, sir, are very nearly the most terrifying individual I have ever had the honour of meeting.
|
|
|
|
|
I am trying to call VB COM Dll from ATL C++ Dll. I am importing VB dll into my C++ project but when I am trying to use VB interfaces, C++ does not seem to be able to recognize them. Does anybody know how to do this?
Michael
|
|
|
|
|
The easist way is to use the #import statement for the VB ocx in your cpp file. THsi will create a set of wrappers for the dll that you can use to access all of the functions. The wrappers also make the syntax that is used in VB available which simplifies the use of COM.
What I mean is that you will be able to call this:
long count = pList->count;
Instead of this:
HRESULT hr = pList->get_count(&count);
if (FAILED(hr))
{
_com_raise_error(hr);
}
the import statement will wrap that for you.
The other possiblity is to use the #inport statement in your IDL file, and the headers for the typelibrary will be generated by MIDL for you and you can use the interfaces the regular COM way if you prefer that method.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Thanks for your help. But smth I am doing wrong. I am using VB dll.
This is my code in the cpp file:
#import "SuperStripperVB.dll"
//##ModelId=3D05003F0087
SSMessenger::SSMessenger()
{
// create instance of SuperStripperVB
_MessageWindow* pMsg;
}
The error I am getting is:
'_MessageWindow' : undeclared identifier
Even though, I have interface _MessageWindow in SuperStripperVB.tlh (tli) which are created by the #import statement.
Thanks,
Michael
|
|
|
|
|
I am currently trying to automate word into my application. I am currently capable of opening the word document but I need some answers to a couple of (possibly easy) questions:
1) Why are most of the control buttons (Open, New, Save, etc) disabled but the menu options are not disabled. I would like all the features of word that would be allowed if user opened word him/herself.
2) I am having problems with the WinWord remaining in memory. I need to ReleaseDispatch, but where? From OnDestroy, because the doc and app are localized in another functions, should I make these global to do this?
3) The view of the document is really bad. When the document comes up, it is smaller than the window. Also, the only view I have is teh Print Layout, the Normal, Outline, and Web Page are all disabled and I don't know why.
Please Help, I have been stuck for a while!!!!!!!
|
|
|
|
|
I am having a problem with scrollbars. I am currently using automating MS Word into an application. It brings up MS Word but the scroll bars are there for about 1 to 2 seconds, then they disappear. What could be causing this? I looked through the documentation and found a lot about changing to CScrollView and it worked as far as keeping the scrollbars on the screen. But if I resize the document in the window (not resize the window itself), I lose the scroll bars. What could be my problem?
|
|
|
|
|
check CScrollView::SetScrollSizes()
|
|
|
|
|
Where should I be checking it at? When I resize the document (not the window), it goes into the OnDraw and OnSize functions. Should I have some code in OnSize to do the SetScrollSize. I read somewhere in these posts not to do it in the OnDraw function. Sorry if I am confused, I am new to Word Automation...
|
|
|
|
|
Also, I have to change it from CScrollView back to CView. It is putting the scrollbars on the actual window, instead of leaving them on the document. Any ideas how I can get them to stay on the document...
|
|
|
|
|
I need to know if it is possible to hook hardware interrupts with C++. If not, does anyone have a recommended way of doing it?
thanks
|
|
|
|
|
Depends on what operating system or platform you're using. If you're using DOS on PCs, it's not hard. If you're using Windows then you can't do it unless you have a driver. If you're talking about a common port i.e. serial or parallel, then the Win32 APIs or equivalent functions in MFC will work. What do u want to do?
|
|
|
|
|
yeah, it's win2K, and i'm trying to monitor an interrupt from a PCI card so it sounds like i would have to re-write the driver then
|
|
|
|
|
Well they have software tools now to help you write drivers like WinRT. Good Luck!
|
|
|
|
|
does anybody know about libraries to use OCR?, if they are free better, thanx
|
|
|
|
|
If you right mouse click in on any of the column in Windows Explorer (NOT IE), you can add or remove columns, like file size, date, attribs, etc. Any way to add your own column?
Thanks
Ralph Krausse
|
|
|
|
|
|
Please also tell me how can change the caption text at run time. Please give me the code.
Thankyou
|
|
|
|
|
pWnd->SetWindowText("MyNewCaption");
Cheap Oil. It's worth it!
|
|
|
|
|
SetWindowText()
Renjith True CP ian
|
|
|
|
|
I create an control using CreateWindow. The class name is edit. Then I set a procedure for it by using SetWindowLong fn GWL_WNDPROC. Even though, control goes there, its normal operations are affected. I clearly called DefWindowProc for message i dont want to handle. Then what is the right procedure, Pl. reply me.
|
|
|
|
|
I guess you must retrieve the previous window proc with GetWindowLong and GWL_WNDPROC and use this as your default proc instead of DefWindowProc .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
What you need to do is when you call SetWindowLong, save the old WindowProc that is returned from that window.
Then if you do not want to handle that message you need to call the window proc that you cached. But you cannot call it directly, you will need to call CallWindowProc with the previous window proc as a parameter. CallWindowProc shields you from the possibility that you are dealing with a UNICODE window when you have create an ansi version. Windows automatically thunks all of the parameters for you.
CAlling DefWindowProc is not the answer because this is the default window procedure for all windows. There is very little processing that is done in DefWindowProc.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
What is the data type I can use to identify a variable that is 8 bytes. I get a warning that states my data will be truncated because I didnt allocate enough memory. I have used long, double, long double, but nothing works. I am setting a variable equal to a hex value.
double long rhs = 0xBFF074003BA3D70A;
This is how I have assigned my variable. Can I get some help on this. Thank you.
Josh
|
|
|
|
|
Heya,
try LONGLONG or __int64
/WW
|
|
|
|
|
__int64 for a signed number, or unsigned __int64 for unsigned.
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|