|
See if GetAdaptersInfo() is of any help.
|
|
|
|
|
hello all,
Could someone show me how to expand a project in ClassView window which has more than about 4000 classes? When I tried to expand a project to view all classes in Class View window, My Visual C++ 6.0 showed a number of files left to load, then it hanged on about 20 files left, then nothing was showed, in addition, the Workspace window was empty although the project title was still there. One special thing is FileView window is OK to expand!!! but ClassView!!!
Is there any option to limit the total of classes to display in ClassView window? or my Visual C++ 6.0 version has bug? or my PC has problem?
FYI, my system : P4 1.6 Ghz, 256 MB RAM, Windows XP service pack 1, 40 GB hard drive
Thanks for any help.
khanh
|
|
|
|
|
How Can I monitor the printing queue, therefor i can
delete some queue, add queue etc. according some logic???
|
|
|
|
|
See these articles - API calls you are looking at OpenPrinter, FindFirstPrinterChangeNotificiation, SetPrinter etc.
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
|
I have a doc/view app with a static splitter and one view is a CTreeView control. I have written a Serialize routine for the Doc, and want to refresh the contents of the CTreeCtrl after loading the saved document. I have verified the the saved data is loaded correctly into the program. I can initialize the tree control just fine from OnInitialUpdate. I believe I am supposed to use OnUpdate to initialize it after the document has changed. However, nothing I do in OnUpdate seems to have any effect. Frustrated, I tried just to enter dummy entries from it. This code below does absolutely nothing, though in debug I verify that it is executed:
void CApp_TreeView::OnUpdate(CView* /*pSender*/, LPARAM /*lHint*/, CObject* /*pHint*/)
{
HTREEITEM htTest = GetTreeCtrl().InsertItem(_T("Accounts")); // TEST
GetTreeCtrl().InsertItem(_T("Subaccounts"),0,0,htTest); // TEST
}
If I do the same exact thing in OnInitialUpdate, it inserts the entries just fine. What am I doing wrong?
Thanks
|
|
|
|
|
I recently got my hands on Visual Studio.net and it came with C#. Now, I've been using C++ for a while now, and am starting to get into the nitty gritty of windows programming (using GDI, not MFC) and I wanted to know if I should learn C# instead. I mean, I plan on learning some C#, but is C++ still more powerful? I've looked for articles on the subject, but I really wanted to hear some people's oppinions. What do you guys think? Is C# as clean as C++? Is it as powerful? As fast?
Thanks for your input!
-untwisted
-untwisted
www.uber-ware.com
brian@uber-ware.com
|
|
|
|
|
I wanted to learn C# so I got a book that teaches you the language. The first thing I read was that "pointers are missing in C#". I cannot imagine a language without pointers therefore I simply refuse to program without them. You could say that this kind of viewpoint is narrow minded and I agree with you, but when I think how pointers have made my life easier and programs faster I could not care less. In any case I will read the book because it seems that C# has safe data types, arrays are bound checked, everything is initialized by the compiler, etc. Nevertheless, I still don't know how you can program without pointers.
I must add that you can program with pointers in C#, but it's considered unsafe mode.
I also don't like the fact that a class can inherit implementations only from one base class in C#.
// Afterall, I realized that even my comment lines have bugs
|
|
|
|
|
C++ and C# are languages targetted to different platforms.
I mean C++ evolved from C and it works on most of the platforms. You can do some great low level work in C++ as well as program for different operating systems using this language. C++ is a champion language.
As far as I know, C# is a language for .net. Microsoft created .net and for .net they created C#. C# does have the pointers but there are always some price for a task. You can use pointers in C# but what will happen is that resulting code will not be in control of CLR (Common Language Runtime). By using pointers, you take the responsibility of mangaing the memory yourself, so CLR garbage collector can do nothing there.
C# is a step towards safer languages like Java. Microsoft say that they have built C# from C and C++ but I think 90 percent of C# is java. It also add some of its own features like indexers, delegates etc.
In my point of view, C# is the latest result of evolution of software industry languages. People sometime used to program in machine languages. Then came assembly language. Then some high level languages. Then came the 4th generation languages like VB which revolutionised the programming world. Before C# it was Java who was dominating on internet. I think Microsoft has created this new language to compete with Java.
End result is that C++ has its own application whereas C# has its own. Programming in C++ is a bit difficult. Whereas C# behaves like an intermediate language between Visual Basic and Visual C++. Look at your problem which you are going to program and then decide which language is good for you.
|
|
|
|
|
Much thanks for your help!
-untwisted
www.uber-ware.com
brian@uber-ware.com
|
|
|
|
|
I have been creating VC++ solutions for years.
I started looking at C# about a year ago.
I have just recently implement a fairly complex solution using 5 Windows services and a Windows application to monitor the services using C#. It's LIVE in our production environment and seem quite robust. This is the first 'real' working C# code for me. I wrote the code in about two months. Most of that time was devoted to issue to solve the 'problem'... not a lot to just getting services to work. To me that's a pretty powerful language.
Here are a few of things I have found about C#.
If you want to write a Windows service I would recomend it over C++. The help system includes a great Walkthrough for creating a Windows service.
Implementing timers is very easy.
Access to the Windows event logs is very easy.
While I am still experimenting with .NET ASP you can use C# as code behind for those pages allowing you to deal with events on a web page with events in a Windows application.
So there are something that are easier in C# and some new things like code behind for ASP web pages that I don't think you can do in C++.
Others might point out other features... but if you are interested in these areas you really should look at C#.
|
|
|
|
|
Much thanks! Very helpful!
-untwisted
www.uber-ware.com
brian@uber-ware.com
|
|
|
|
|
Hi, I have programmed a program that shows information about windows services and can stop/start it. And when I compile the program in DEBUG mode the program works perfectly but not in release. ( I use a lot of C code in my MFC vc++ program)
Please Help me..
|
|
|
|
|
|
Thanks, I am going to check that out.
Where can I upload the code ?
|
|
|
|
|
Make sure you're not using the ASSERT macro where you should be using VERIFY . Remember that the ASSERT macro translates to nothing in a release build, so if you do any processing inside the macro, it doesn't happen in release mode.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Thanks, but I have already checked that possibility.
|
|
|
|
|
I'm trying to write a replacement taskbar, but I've hit a snag. When a window minimises, the caption animates towards the taskbar button. As my taskbar will keep its buttons in a different place, I need a way to control where the caption animation goes. Similarly, when a window is un-minimised, I need some way to tell Windows where to originate the animation.
I thought the WH_SHELL hook would do this, as it detects a "minimised rectangle" request; but it seems that this hook is for monitoring only - I cannot modify the rectangle.
Does anyone have a solution, please? Or even a hint?
|
|
|
|
|
maybe handle NC_PAINT ???
|
|
|
|
|
Okay, could I have a suggestion from someone who actually understands the question, now, please?
|
|
|
|
|
I am trying to add a context menu to the list portion of a CBS_DROPDOWN style CComboBox control. I started by replacing the COMBOLBOX dropdown with my own CListBox derived class (technique here[^]). The problem I have is that when my context menu pops up, the drop down list disappears. I would like it to stay visible. I tried to catch the CB_SHOWDROPDOWN message in the CComboBox class and the WM_SHOWWINDOW message in the CListBox class. both methods fail to prevent the list from closing.
Any body have any ideas (or maybe a link to a control that already does this)?
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Hi PJ,
Do you know what message is being sent to your listbox to get it to close and who is sending it? Spy++ might help. I wonder whether you could kludge the combo style and switch it between simple and dropdown on the fly!
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
The list box recieves WM_SHOWWINDOW, WM_WINDOWPOSCHANGING and WM_WINDOWPOSCHANGED messages. I do not know who is sending them, but I assume it is the combo box control. I tried overriding these messages, no luck I tried to hook these messages using WH_GETMESSAGE and WH_CALLWNDPROC hooks, also no luck I am beginning to think that the only way this will be possible is by rewriting the entire combo box control, not something I want to do.
I think what I will have to do instead is modify the combo's edit control's context menu.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
I still don't understand precisely what is causing your list cntrl to close. Is it being destroyed, sent a WM_CLOSE or ... Do you have an OnDestroy() or OnClose() and are these being called. Or who is calling the dtor (looking at stack trace).
Why did you have to use your own list box in the first place. Was it because the right click -> popupmenu closed the drop down list.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
From what I have been able to figure out, the drop list is not actually closed or destroyed, it is just hidden (in spy++ its HWND stays active, even though it is not visible). I have to use my own list control, because the drop list of the combo box (class COMBOLBOX) does not generate a WM_RBUTTONDOWN or a WM_CONTEXTMENU message when I right click on it (The edit control portion of the combo control does however). The problem I am having now is that when I handle the WM_CONTEXTMENU message in my own subclassed list control, I pop up a popupmenu and the list disappears. It is all rather annoying.
I know I am being as clear as mud, but thanks for the help anyway
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|