|
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.
|
|
|
|
|
Hi abhi,
whatever i have seen and as long as i know..I don't think there is anything like that..you can just check it programmatically when anyone clicks any folder..check out it is type admin or not and do the rest..i Hope you knew it before but you want something which can do this in short.
Himanshu
|
|
|
|
|
Check the MSDN. Search for "ACL DACL directory". SIDCLEAN.C should point you in the right direction.
Learning is a never ending process of Life
... and learning how to use the MSDN (or Google for that matter) search facilities should be #1. Don't you agree?
|
|
|
|
|
Mike Nordell wrote:
... and learning how to use the MSDN (or Google for that matter) search facilities should be #1.
This forum is for asking Questions and giving answers, not to teach how to use the MSDN or Google search.
And by the way ppl turn up to forums only when they feel there is not much precise info on the net as in my case.
Anyway thanks for your information and the suggestion also.
Learning is a never ending process of Life.
|
|
|
|
|
|
Is there a function that exists anywhere that can take a string of a mathematical expression and parse it, returning the correct value? I am working on something in VB , however if I can implement something from C++ and then just call it from VB that would be fine. Just wondering if anything already existed so I didn't reinvent the wheel so to speak.
Nick Parker
You see the Standards change. - Fellow co-worker
|
|
|
|
|
I saw a library on the net. It takes a string and parse it. All of mathematical functions like Sin, Cos, Tan, ... and Linear Algebra supported by this library.
Search on Google to find!
A. Riazi
|
|
|
|
|
Hi all,
can somebody help me in this please?
I have to change the text of the main titlebar dynamically at runtime. But it seems its ID is changing each time.
WHat can i do ? Any code ?
thanks in advance
Hari Krishnan
|
|
|
|
|
hi,
could not understand your quetion..can you please elaborate..what is it you really want and what is your program doing!!!!!!!!!!!
cheers
Himanshu
|
|
|
|
|
Hi,
I rewrote my main window (originally derived from CWnd) as an object derived from CFrameWnd.
How come that all my menu items appear as disabled now?? I can't make any selection! Same with my pop-up menu.
I create my menu in the exact same way as before:
CMenu myMenu;
myMenu.LoadMenu(IDR_MAIN_MENU);
SetMenu(&myMenu);
myMenu.Detach();
Only sub-menus appear as enabled. Also when the command ID for an item is set to 0, it appears as enabled...
Any idea what went wrong?
Thanks
|
|
|
|
|
I finally got it to work, but I don't really understand it:
I now intercept the WM_INITMENUPOPUP-message and simply return 0.
By doing so the menus appear as enabled!
How come I have to do this? (I didn't do it in my message loop of my CWnd-window I had first and the menus didn't appear as disabled)
|
|
|
|