|
I believe these are called singleton classess. Be sure the constructor is private .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Yes and that's basically what he did. But I don't understand what is his problem...
|
|
|
|
|
Yes I now but my class work in my project very good I get only one instance but now I have put my "singleton" class into a DLL and the instance that I get from main app is not the same that instance that I get from a class into a other DLL.
That is my problem !
AutreChien
|
|
|
|
|
Each user app of the dll will get its own data memory so oneinstance will be different for each app.
You need to look at using shared memory in the dll so that all apps share some or all of the dll's data. It may be a much more difficult issue than it seems because of synchronising access and so on.
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
|
|
|
|
|
Thank,
I understand now but how can I do that or do you have any sample to show me the way that I have to go..
AutreChien
|
|
|
|
|
|
Thank for the link !
AutreChien
|
|
|
|
|
How to retrive the path of current running application.Is there any function to get the path.
Thanks.
|
|
|
|
|
|
I have run the application in ATLCOM and i have given the debug path as C:\windows\explorer.exe.When i use the above i will get the path of the executable file.But my application is running in another drive.How to get the path of the application.
Thanks.
|
|
|
|
|
Hi,
Did you try to put HANDLE GetCurrentProcess() instead NULL in GetModuleFileName?
-----------
Mila
|
|
|
|
|
radhika28 wrote: But my application is running in another drive
Huh?
So you don't want the path of the running executable?
You want the path of another running executable?
Are you talking about GetCurrentDirectory()?
|
|
|
|
|
I think he needs to path of his program
|
|
|
|
|
WhiteSky wrote: I think he needs to path of his program
But his "application is running in another drive"
|
|
|
|
|
I read first his question "retrive the path of current running application"
|
|
|
|
|
ya you are correct.I want to retrive the path of the running application not the path of executable file path.Because i gave the path of executable file different(C drive).But my application is in D drive.
Thanks.
|
|
|
|
|
If I understood you want to get path of procceses on memory,right?
|
|
|
|
|
Hi,
Here's the problem:
(a) I'm wanting to have multiple child windows showing different aspects of a single document
(b) I've created some CFrameWnd objects as children of the main view (main view is the primary CView object created by visual studio sdi app. wizard)
(Problem) They are always in an inactivated state - even when clicked on. They have been created with the WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW styles and they seem to do other stuff o.k. (resize etc). Creating my frames as children of the top level frame doesn't help either.
(d) I think its the same problem as posted on the MFC archive at:
http://microsoft.ease.lsoft.com/scripts/wa-msn.exe?A2=ind9811d&L=mfc&T=0&P=4761
which never got a response
If anyone could offer any help or advice it would be great
Thanks,
Ben
|
|
|
|
|
b_e_n_82 wrote: I'm wanting to have multiple child windows showing different aspects of a single document
Use the MDI application model. The MDI model has everything you want already built into it.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
I can't find Windows Media Player Activex. where can i download this activex?
|
|
|
|
|
|
hi i want to read n write the pdf file without using the 3rd party libraries but it does not give the desired results,can abybody help me how to do that.
Tasleem Arif
|
|
|
|
|
tasleem143 wrote: hi i want to read n write the pdf file without using the 3rd party libraries
Doesn't adobe provide SDK(which have API's for such things) for this ? I'm not sure, but there should be one.
|
|
|
|
|
|
Hi everyone,
Now, i can create the View into the Frame like this :
CCreateContext CC;
CC.m_pNewViewClass = RUNTIME_CLASS ( FCalc);
FCalc* ActView = DYNAMIC_DOWNCAST( FKundensucheView, this->CreateView(&CC) );
if(ActView) {
ActView->ShowWindow(SW_SHOW);
ActView->OnInitialUpdate();
// Set this view active
SetActiveView(ActView);
RecalcLayout();
ActView->ResizeParentToFit(TRUE);
RecalcLayout();
}
But the View is not at the same size as the Frame
and the _ □ X Symbols of the Frame won't rest at the right corner
I see this kind of "Adding a View" in diff examples, but why does it not work?
Anyone an idea ?
THANKS
|
|
|
|