There is a sample under the tree controls on this site that enumerates the network. If you get it to be able to also browse target machines, and files, please let me know. I got close, but not close enough.
Christian
Posts
-
Computers names on network -
about the keyboard eventsThe 'other' keys, like arrows, alt, etc. all have VK codes, such as VK_LEFT and VK_ALT. I *suspect* you could add these values to the values of keys, that they each set a high bit. This is just a guess, but hopefully will put you on the right track.
-
Commom ControlsLook up CFileDialog in the MSDN, or here. Basically, you've got it already, just set it up and DoModal();
-
BitBltYou need to do it in OnPaint, which is called whenever a window needs repainting.
-
How can I acces to voriables of other program?The easiest way, assuming you're writing both, is to use SendMessage to pass the variables as a string between them.
-
List boxDerive your view from CFormView and then you can make your view any combination of dialog items. OF course if you want to keep your view as it is but only add the one item, then you'll need to create a frameless dialog to simulate an item in the view itself.
-
Timer not running, where to initialiseYou want a timer to initialise when the button is pushed to wait for the dialog, or when the dialog comes up to do something else ? If the former, start the timer when the button is pushed, if the latter, in OnInitDialog of dialog 2.
-
storing a windows postion in the registry...There are a few possible issues. 1/ Where are you setting the position 2/ what sort of co-ordinates are you saving ( relative to window or relative to dialog ) ? ClientToScreen will convert your co-ordinates to ones relative to the whole window 3/ Have you checked the values going in and coming out to make sure you're reading them correctly ? 4/ Are you passing them in correctly ( MoveWindow takes a width and height, rather than x2, y2. )
-
Printing a GIFDo you know what the GIF is ? I assume not, in which case you'll need to either a/ forget it or b/ pay UNISYS a swag of money. GIF uses LZW compression, and even if your program doesn't make money, you need to pay them if you support GIF. That's why a lot of graphics software ( mine included ) does not support GIF. Assuming you chose GIF at random, the answer for any other format is you need first to read it in, which entails using a library like paintlib ( www.paintlib.de ), then it's merely a case of stretching it onto a print DC. I say stretch because printers measure size in TWIPs and a screen shot in pixels equates to enough TWIPs to make a small postage stamp. If you're using Doc/View most of the work is done for you, if not, there are classes on this page that will give you everything you need.
-
Line Drawing ControlIf I've ever needed to draw a line, I've always done a really thin control.
-
How To obtain information about the window under the cursor.WindowFromPoint The WindowFromPoint function retrieves a handle to the window that contains the specified point. HWND WindowFromPoint( POINT Point // point ); Parameters Point [in] Specifies a POINT structure that defines the point to be checked. Return Values The return value is a handle to the window that contains the point. If no window exists at the given point, the return value is NULL. If the point is over a static text control, the return value is a handle to the window under the static text control. Remarks The WindowFromPoint function does not retrieve a handle to a hidden or disabled window, even if the point is within the window. An application should use the ChildWindowFromPoint function for a nonrestrictive search. Requirements Windows NT/2000: Requires Windows NT 3.1 or later. Windows 95/98: Requires Windows 95 or later. Header: Declared in Winuser.h; include Windows.h. Library: Use User32.lib. From MSDN ;0)
-
What is a geek?> Obviously none of us fit any of these categories - so >what then defines a geek?? >Statement - applies to me >------------------------------------ >Questionable hygeine - 60% 40% >Inability to fit in socially - 90% outside computing circles 95%, inside 2% >Inability to relax - 80% 80% >Bad Posture - 80 % 100% >No dress sense - 100% 200% >Geek pasttimes (computer games, Star Trek) - 0% ? No, Star Trek fans are nerds. Geek pastimes include computer games, eating pizza, watching 3D tech demos looking for glitches. >Cheap - 20% 100% if it's not computer related. >Waht does that make me? Not sure - you don't play computer games ? I love how geek has become less and less of an insult. I regard it as a badge of honour...
-
What is a geek?> Obviously none of us fit any of these categories - so >what then defines a geek?? >Statement - applies to me >------------------------------------ >Questionable hygeine - 60% 40% >Inability to fit in socially - 90% outside computing circles 95%, inside 2% >Inability to relax - 80% 80% >Bad Posture - 80 % 100% >No dress sense - 100% 200% >Geek pasttimes (computer games, Star Trek) - 0% ? No, Star Trek fans are nerds. Geek pastimes include computer games, eating pizza, watching 3D tech demos looking for glitches. >Cheap - 20% 100% if it's not computer related. >Waht does that make me? Not sure - you don't play computer games ? I love how geek has become less and less of an insult. I regard it as a badge of honour...
-
I need some experts to help me on VC...Don't have ICQ - glad to help if you want to get specific.
-
URGENT ! Windows Media Player Detect!You've got the right idea. I had to do the same recently with IE ( need 4 or greater ), and DirectX ( need 5+ ). I found the answer was to poke in the registry, best place is HKEY_CURRENT_USER\Software\Microsoft. Get onto some machines with earlier versions and make sure you've found a key that persists across versions & gives you the info you need, and you're away.
-
Help? Anyone?Use a CFileDialog to select files, then use the GetPath function to get the path selected ( I'm not sure of the mechanics of stepping through multpiple selections ), then add then to the list box as you get them from the dialog. LMK if you have any other problems, but that should get you started. Do you have the MSDN help ? If not, get it, it is invaluable.
-
I know how software houses feel.At the end of the day it means two things: 1/ You rock 2/ Someone else has no integrity. You should be pleased about the former and regard the latter as some-one elses loss, IMHO. Anyone who doesn't give credit where it's due is probably not going to go far in any case. They'll get a job somewhere based on someone elses code, and lose it the following week when they are asking their manager what a 'Hello World' program does.
-
Stringray?ON another front, and nothing sneaky at all, but it occured to me recently that when I go to fatbrain, a type would yield fatbrian.com. Not knowing if there IS a brian out there, I typed it, and found myself at fatbrain. I'm sure this sort of thing happens often to catch customers who make a typo and might not bother retyping, but I thought it was kinda funny. FatBrian.com. I wonder if Brian has recourse to sue
-
So where does a newbie go from hereI disagree about MFC having a high learning curve - I would suggest it makes it easier to learn how to program Windows. My suggestion is learn MFC, THEN once you know how to build Windows apps, start to learn how to use the Win32 stuff that MFC encapsulates. As you say, these things will be with us for a long time, and will give you a 'handle' on how Windows itself works, and what sort of objects you are dealing with. Then you can get your teeth into ATL/COM, and (heaven forbid ) .NET if you want to. This seems to me the easiest learning curve, although I accept that might just be because that's how _I_ did it. MFC is a set of classes that encapsulate Win32, and make it easier to treat things like bitmaps as objects. It also has classes that you can use to access the Web. Depending on your level of expertise, I'd recommend buying a book like either Visual C++ in 24 Hours ( if you want to start from real basics ), or MFC Unleashed ( if you want the full treatment ). The latter book has chapters covering web access and COM, and is in my mind the best reference on MFC apart from the MSDN library. And of course sites like this have message boards full of people willing to answer your questions. Good luck - it's a hell of a lot of fun, you just might find the urge to throw your day job away ( like I just did a few months ago )
-
Make copy of DIBSection ?I have a class derived from CBitmap which contains a DIBSection, and I'm trying to write a copy function. Can anyone tell me how, given an instance of my class, which is essentially a DIBSection, how I can create a deep copy of the DIBSection ? I've looked at CreateDIBSection, but I'm unsure where to get the parameters from. Thanks Christian