|
Here's an example: I get the CLSID of the program using CLSIDFromString, how do I get the version number?
Jonathan de Halleux, Belgium.
|
|
|
|
|
First of all, interfaces don't have version numbers, they are supposed to be immutable. You can get the version of the executable that implements the interface by using the GetFileVersionInfo and related APIs.
Look! They have the Internet on computers now! (Homer J. Simpson)
|
|
|
|
|
Thks
Jonathan de Halleux, Belgium.
|
|
|
|
|
Hello world!!!
I want to execute a last *.exe file (or *.bat) when I shutdown the OS (win2k).
How to do that???
Thank in advance...
Hello World!!!
from Raphaël
|
|
|
|
|
Write a NT service, and do a shell execute when you receive the WM_QUIT message (which is what is sent by the OS if I remember well).
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
That's a good idea... Thanks...
Hello World!!!
from Raphaël
|
|
|
|
|
Hi !!
I am new to windows programming. I've created a dialog box and placed a static control on it. The static control displays the numeric value of an int variable. So simple . Now here is my problem: Two worker threads are associated with this program and are changing the value of that variable. The variable was passed as a reference to these threads. Now what i want is that whenever the thread changes the value of variable, its new value gets updated on the static control. How can i do that ???
|
|
|
|
|
Your threads can generate a message (see WM_APP or RegisterWindowMessage) whic is caught by your main app, which updates your variable. The CStatic would show the new value after a UpdateData().
|
|
|
|
|
I'm using the WebBrowser control to display some XML file.
Do you know how could i programmaticaly select the text between two distinct positions from the file?
rechi
|
|
|
|
|
If you have the XML file and are using C++, what you can do is override the default XSL stylesheet applied by IE when the XML content is rendered. To get the default XSL code, type res://msxml.dll/defaultss.xsl in your browser.
If you are an interactive user, you may find useful to select a region based on the current html tag under the mouse cursor. For instance, in Javascript, I have a onmouseover event handler implemented like this :
var elem = window.event.srcElement;
var rng = document.body.createTextRange();
rng.moveToElementText(elem);
rng.select();
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
Thanx a lot for your advice!
The case: i have a fragment from the XML text and i want to highlight it.
Your first suggestion seems to be more appropriate but unfortunately i'm not familiar with XSL and it's gonna take some time. How could i change the default one?
Are there no other possibilities but these two?
rechi
|
|
|
|
|
Bogdan Rechi wrote:
How could i change the default one?
You've got to add this <?xml-stylesheet type="text/xsl" href="show_book.xsl"?> just below the <?xml version="1.0"> header of your Xml file.
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
I'll try to do it this way.
Thanx again.
rechi
|
|
|
|
|
I want to send ALT + S to an application, ive tried:
PostMessage ( hHandle , WM_SYSCHAR , 's' , 0 );
What im i doing wrong cos its not working
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Try passing 0x20000000 as lParam value. According to the docs, that defines the ALT key as being pressed.
Look! They have the Internet on computers now! (Homer J. Simpson)
|
|
|
|
|
PostMessage ( hHandle , WM_SYSCHAR , 's' , 0x20000000 );
didnt work? Why?
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
See SendInput, keybd_event.
|
|
|
|
|
yeah ok, but what message to send??
is there a VK_ALT cos i didnt find any
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Fill out the KEYBDINPUT structure and use .type = INPUT_KEYBOARD
or use keybd_event()
...make it about Visual C++, and don't ever mention Visual Basic. Nick Hodapp (MSFT) in Semicolon[^]
|
|
|
|
|
Yes, but please, if i want to state that the keyboard event is the ALT Key, how should i do that?
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Should be something like
keybd_event( VK_MENU,0,KEYEVENTF_EXTENDEDKEY,0);
keybd_event( 's',0,0,0);
keybd_event( 's',0,KEYEVENTF_KEYUP,0);
keybd_event( VK_MENU,0,KEYEVENTF_EXTENDEDKEY|KEYEVENTF_KEYUP,0);
...make it about Visual C++, and don't ever mention Visual Basic. Nick Hodapp (MSFT) in Semicolon[^]
|
|
|
|
|
Thank u very much, long live VC++ !
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Does VC++6.0 have problems with function templates?
I have a function template:
template < class T>
void classA::copyList(os_Dictionary< void*, T*> *pTarget, os_Dictionary< void*, T*> *pSource)
{
// some copying
}
and where i called it in one of classA's member fns:
// pList1 and pList2 are os_Dictionary< void *, float*> pointers
copyList(pList1, pList2); // C1001 error here
I get a "fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1794)"
Any idea what's the problem??
|
|
|
|
|
It might be a problem with your template definition. Make sure every line and (template) class-closing curly bracket has a semi-colon. It's usually just a typo that's causing it. (Usually, but not always... I found the non-inline template destructor bug in C++ Builder 4.0 by myself... )
|
|
|
|
|
That's not a function template, that's a member function template.
Yes, VC6 have serious problems and bugs when it comes to template handling. One of them is IIRC that member function templates must be both declared and defined within the class declaration.
One could argue that it's about time ObjectStore fixed their library to allow standard C++ operations (begin(), end(), assignment, ...), but I digress.
|
|
|
|