|
Hi,
Your question is not clear. Explain more.
Abbas Riazi
|
|
|
|
|
Hi,
Am trying to add the Scroll Bars to a PropertPage dialog.
i Added the Scrolling from the styles of the dialog, when i test the dialog the Scroll Bars appears but when i run the PropertyPage ofcourse its liked to a PropertySheet the ScrollBars doesnt appear. this is the problem.
thank you very much for your help.
|
|
|
|
|
It seems like that one of my programs disables Drag&Drop after running some time on a Win2000 machine, i've seen it also on one Win98 machine, but its running without this problem on 100's of other installations ?
This happens if a user is working for some time with the program, he's doing nothing special, but than "double click" and Drag&Drop on the desktop isnt working anymore. If you stop the program in this situation you can not restart this programm, but you get the following windwos message "Windows Explorer - Unable to run this command"
Only a windows-restart solves the problem
|
|
|
|
|
At the moment problem occurs
1. Start Task Manager
2. View->SelectColumns. Select "USER Objects", "Handle Count",
"Thread count", "GDI Object"
3. Note the numbers for each of the columns above
Repeat the test, see if you reach a "limit" on any of them. Limits are not documented in MSDN, but I know for sure "USER Objects" can not be more than 10000. I suspect that other columns have some kind of limit per process as well. Watch memory usage as well.
|
|
|
|
|
thanks, i've already done that, all this values remain
more or less the same. 150 handles, 150 user objects, 6 threads, 300 gdi.
memory is growing a little bit, but not as much that this could be the
problem.
the other problem is that i cannot reproduce this problem on one of my
machines, but some of my costumers can do that. ok i can ask them to send
me there resources if this problem occurs.
any other ideas, dll's, i've static linked the mfc libs.
|
|
|
|
|
Can somebody tell me how to insert a CView in another CView or many CView in another one CView?
And how to switch from a CView to another?
Best regards,
Margaria Ivano
|
|
|
|
|
CSplitterWnd might be what you are looking for, see MSDN for sample code.
|
|
|
|
|
I know, thanks.
I have an SDI application. My application use the CSplitterWnd. I'm a beginner in C++ programming and I have no experience, but these Views aren't on a CView, altought on a CFrameWnd.
Sorry for my English.
Best regards
Margaria Ivano
|
|
|
|
|
Hi all,
It looks like a simple question, but I can't find a clean answer.
How is it possible to get in the cleanest way as possible a pointer to the active document (as it is a SDI, only one!) from everywhere, especially from the class associated to a dialog (CDialog).
Thank you,
loic
|
|
|
|
|
Uhm... would this be of any help?
CYourApp* theApp;
theApp = (CYourApp*)AfxGetApp();
CYourView* pView = (CYourView*) ((CFrameWnd*) theApp->m_pMainWnd)->GetActiveView();
CYourDoc* pDoc = pView->GetDocument();
First get a pointer to the application, then with that a pointer to the active view, and through the view pointer to the document.
Or did you say the cleanest possible way?
------------------------------------------
Experience is the name every one gives to their mistakes.
-- Oscar Wilde
Experience is one thing you can't get for nothing.
-- Oscar Wilde
|
|
|
|
|
In fact, if you take your code and put it in a new app, this is not fun...
I keep this reciep for next time, but here I found the way to do that. I just store a pointer to the document in a member var of my dialog class at creation time in CMainFrame or whatever, so I can directly access it after.
Thank you for your answer, it gives me also the links from theApp to pDoc...
loic
|
|
|
|
|
I am writing an AddIn for Visual Studio ver 6.0 running on Windows 98.
Part of my AddIn needs to search through files. However it is only able to search through the current working directory. I need it to look under all the other directories. I know one can set the search directories for include files under the Tools.. Options.. settings in the IDE.
I have tried using _searchenv(filename, "INCLUDE", pathbuffer) but this seems to only work for the current working directory.
Has anybody got any ideas or answers.
|
|
|
|
|
There's also
Project Settings -> C/C++ (tab) -> Preprocessor (Category) -> Additional includes directories:
Maybe you could build your own environment variable with SetEnvironmentVariable() called MYINCLUDES by collecting the directory settings from Tools, Project Settings, and the current directory and then use
_searchenv(filename, "MYINCLUDES", pathbuffer)
Todd Smith
|
|
|
|
|
The problem is that this is to be used in an AddIn that anybody can use so I can't hardcode my directories in.
|
|
|
|
|
how to call a user defined dialog from the menu like from file,new ........
|
|
|
|
|
After creating the user dialog using resource editor, goto ClassWizard and create a class for this dialog. then come to the main window and in the menu handler function , write the following code.
UserDialog Dlg1(this);
/* Assume UserDialog is the class name of the user defined dialog. */
Dlg1.DoModal();
I hope this will work for you.
|
|
|
|
|
I want to put a toolbar into floating controlbar,but it did not work correctly. so can anyone help me ?
with many many thanks
|
|
|
|
|
What does not work correctly ? Post your code so we can help ...
~RaGE();
|
|
|
|
|
thanks for your reply.
the problem is:
when the controlbar if floating,the toolbar is grayed and doesn't work.
Only when the controlbar is in docking state,the toolbar will work well. I don't know what the matter, please help me.
thouthands of thanks
|
|
|
|
|
dear all,
how can i check the filesystem, partition and harddisk information through my mfc app.
thanx
|
|
|
|
|
This is already answered on the forum, please browse through it.
|
|
|
|
|
|
Hi:
It's me again well now I have a new one for everyone here.
I have been working with an MFC Sample and I want to add a Dialog, Resource Files from 'original' MFC Sample have .C extension but when I add a new Dialog it has .cpp extension, until then there is no problem, i can add member variables, write code and almost a happy developer life.
The problem is when I run app the code (for example of a Push Button) isn't recognized or isn't executed!!! And, when I put a breakpoint in the code of the new resource and Run app I get next Message "One or more breakpoint cannot be set and have been disabled. Execution will stop at the beginning of the program"
I have tried to change manually .cpp files to .c but VC++ isn't such fool hehe.
Hope your help.
This is the strangest life I've ever known.
|
|
|
|
|
hi,
if you can then change all .c files to .cpp files i mean if there is no problem as such. You can change them and add again into the project.
Your breakpoint I guess is not on valid place. Put it where you write the code for pushing the button or where you are displaying the dialog. then debug. I hope this solves your problem.
cheers
Himanshu
|
|
|
|
|
Hi,
I need to change the folder access permissions for a particular folder such that only the members of the administrator group can access the folder. Is there any Win API/ Methods available which can help me perform such a task programmatically.
Thanks and Regards,
Abhishek.
Learning is a never ending process of Life.
|
|
|
|