|
Hi All,
Can any body help me on the usage of NetLocalGroupGetMembers method.A code snippet provided would be of immense help.
Thanks
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
Hi,
In dialog-based application, how to grey or disable the toolbar button?
Thanks in advance!
chen
|
|
|
|
|
Use ON_UPDATE_COMMAND_UI handlers, you'll have to do some extra things to get them to work in dialogs but theres plenty of articles on the subject in the Dialogs section (i think).
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Hi, I'm wondering if it's possible to take an app developed in Visual Studio .NET (Visual C++) and make an EXE out of it that can run anywhere (i.e. any Windows machine) even if it doesn't have the CLR or whatever the .NET equivalent of a JVM is? Are .NET apps always compiled into MIDL?
Bilal
|
|
|
|
|
Visual C++ in .NET can generate applications that don't require the .NET Framework.
If you write any managed code then you will need the framework.
Straight Win32/MFC/WTL apps will run fine without the framework.
Michael
Programming is great. First they pay you to introduce bugs into software. Then they pay you to remove them again.
|
|
|
|
|
You've got a tool called ngen.exe with VS.NET that is supposed to produce native code.
I haven't tested it, but it's unlikely that native code replaces the code from the framework libraries with simple non framework code.
There was a time the MS Java JDK had a jexegen.exe tool which produced true native code from any Java .class code. That's now thing of the past, unfortunately....
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.
|
|
|
|
|
so as long as one stays away from managed code, there shouldn't be any problems?
|
|
|
|
|
I guess Yes. Especially if you are only using Visual C++ 7 like you were using Visual C++ 6.
By the way, the "dependency walker" tool lists all static DLLs needed by your application, so it is easy to figure out if you've got anything from the .NET framework (either from the program files\.NET framework folder, or from the <windowsdir>\.NET framework folder).
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.
|
|
|
|
|
In abstract, I have the following code:
template <class A, bool b>
int function(A * pData, int size)
{
for(...) {
...
if (b) {
// some extra work
}
}
}
The idea is to have two versions of the templat, one with additional things to do in the inner loop.
The actual template is a bit more complex, it has four of these bools (scanning a float or double array for min, max, negative, and non-finite values)
The compiler (VC6 SP5) produces nicely optimized code - but only one version.
i.e. if I have
int a = function<float, true>(data, size);
int b = function<float, false>(data, size);
both calls go to te same <float,false> specialization.
(I haven't tried this yet with a separate project, and only with the 4 bool's mentioned above)
Any ideas?
|
|
|
|
|
Note that the C++ compiler expands templates by *type*, not *value*.
|
|
|
|
|
ok, this would break the nifty idea, but the compiler simply produces wrong code -
e.g. the call function<float,true>() going to the function<float,false>() implementation.
Auch den Schatten will ich lieben weil ich manchmal lieber frier' Rosenstolz [sighist]
|
|
|
|
|
Have anyone experience with the programming of pocketpc's
with only 256 colors? Does any mfc application are running?
I am asking that, because I want make a application and use
some GDI functions to draw some things in the view of the app
and I am using the RGB(r,g,b) marco to define the colors.
How does this work on a pocketpc with only 256 colors? Does the system convert the colors?
(I am working with eVC++ 3.0)
--
Nice greets, Daniel.
|
|
|
|
|
I've already coded something on Palm OS. Using java (j2ee) seemed the best solution. It had wrappers for your color problem
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
|
|
|
|
|
Thanks for your answer, but it is no problem for me... I only want to know something about the programming (mfc) on a pocket pc with 256 colors...
--> I have to use eVC++ because I can not programming in Java!
--
Nice greets, Daniel.
|
|
|
|
|
I developed a Microsoft Tree Control in Win32 SDK.After adding certain number of nodes i am getting Memory Problem, how can i solve this problem ?
Any help...
Thank you
|
|
|
|
|
Hi,
I've been using a CBitmap obj in my proggy to load images from within the resource file. This is making the .exe's size grow at an alarming rate !
Is there a simple way to load from a file using a CBitmap.
(I've looked through MSDN but can so far only find info regarding resources)
Many thanks
Mike
|
|
|
|
|
I do not know how to load bitmaps from a file, but another alternative pops into my mind.
You can create a separate resource dll (a dll with just a winmain and resources) then load your bitmap resources from there. This will keep your EXE size down which keeping all BMPs in the one file.
AfxSetResourceHandle might prove useful if you are using MFC.
--James Pullicino
Drinking In The Sun
Forgot Password?
|
|
|
|
|
|
How to get the previosly selected index?
|
|
|
|
|
One way is to handle the ON_CBN_SELCHANGE and then call CComboBox::GetCurSel() to get the current selection. Use a member variable inside your dialog/view class to store this value. The next time that ON_CBN_SELCHANGE is triggered you will have the last selection inside your member variable.
--James Pullicino
Drinking In The Sun
Forgot Password?
|
|
|
|
|
I have built up some classes defining my program, they work perfectly in DOS. I am moving in Windows with VC++ 6.0, I am trying to output the messages of my program in a Edit box.
The problem is the intergration part, I have port my program into VC++ environment. I just get mainfrm.cpp to inherit all my functions, and got the program running linking to a menu item.
How do I actually output the messages into a Edit box? I know of using some MessageBox will be able to do that, but the messages are supposed to update the user on the progress of the program, so pressing the "OK" button for the user is quite tedious everytime there is a message!
Any one who has some suggestions on integration into Windows?
|
|
|
|
|
You can use SetWindowText to put text into an Edit Control. Have a look at MSDN for syntax.
Michael
Programming is great. First they pay you to introduce bugs into software. Then they pay you to remove them again.
|
|
|
|
|
All right thanks for info.
|
|
|
|
|
It seems that I could create handlers in these files, that I could used. They are quite similiar in nature, seems to me most of functions are visible to all CView/CDoc/Mainfrm? Anyone care to share what's the different between these files?
|
|
|
|
|
Document hold document data
Main Frame is the main applications window
Views are windows which display the documents data and are children of the Main Frame.
I am assuming that by 'handlers' you are reffering to message handlers.
You have two options: either put your handlers in your Main Frame, or put your handlers in your View. Very rarely will you need to add handlers to your Document since it does not make too much sense.
In reality you will be putting handlers in both your mainframe and your views. Do you want your handler to work in every view or in only one type of view (this is only applicable when you have multiple views, i.e. MDI application). If you want a 'global' handler then add it to your main frame, if you want a 'local' handler (local to a view type), then add the handler to your view.
Also consider the type of access you need in your handler. If you need access to the Document data for example, it will be easier to put your handler inside your view since access to the document from a view is easier than from the main frame. This applies mostly to MDI applications. (SDI applications are much simpler since you can assume only one document, thus making it easier to locate from the mainframe)
In summery, treat every handler differently. Think about what the handler will be used for (logically) so that you can decide whether it should be a 'global' or 'local' handler. Think about the access requirements (do you need access to the document? Do you need access to the MainFrame?). One final tip: Observe and learn the code which ClassWizard generates so that you can modify it and move it around if neccessary.
James Pullicino
Drinking In The Sun
Forgot Password?
|
|
|
|