|
Could you post the definition of OpenHR__DLL_Tabs_COM_ ? virtual void BeHappy() = 0;
|
|
|
|
|
Standard MFC with AFX_EXT_CLASS macro added, using MFC default constructor:
class AFX_EXT_CLASS OpenHR__DLL_Tabs_COM_ : public CWnd
{
// Construction
public:
OpenHR__DLL_Tabs_COM_();
// Attributes
public:
....
|
|
|
|
|
What error is coming,
when you try to place OpenHR__DLL_Tabs_COM_ cTab; , please ? virtual void BeHappy() = 0;
|
|
|
|
|
Eugen,
when I do this
OpenHR__DLL_Tabs_COM_ test;
I get this error:
error C2079: 'test' uses undefined class 'OpenHR__DLL_Tabs_COM_'
Anyway, check the following exchange with Avi.
I am using the DLLs wrong. It can be done but it is not that simple.
MSDN calls it "Mutual Imports". Here is the link if you are interested:
"http://msdn.microsoft.com/en-us/library/fdy23fx6(VS.71).aspx"
Thanks for your help.
Vaclav
|
|
|
|
|
I can not understand, how it can be possible,
if you have placed #include "..\HeaderOfTab.h" correctly...
(OK, I will read your link, thank you !)
For example: I have implemented the following stage :
TOOLDLL <- EDITDLL <- APPEXE -> TOOLDLL virtual void BeHappy() = 0;
modified on Tuesday, March 16, 2010 10:55 AM
|
|
|
|
|
Eugen Podsypalnikov wrote: For example: I have implemented the following stage Smile :
TOOLDLL <- EDITDLL <- APPEXE -> TOOLDLL
I believe that what Vaclav_Sal was trying was more like:
----------<---------
| |
EDITDLL <- APPEXE -> TOOLDLL
| |
---------->---------
In other words, he wasn't linking one DLL to the other, but was trying to have them use each other by virtue of his knowing that they were both being used by the same exe.Please do not read this signature.
|
|
|
|
|
I'm not sure about your design here. A library provides services to the program that uses it. in general, a dll will not know about, or be able to use anything from a "sibling" dll. I would suggest reconsidering your partitioning into modules so that this is not necessary and you have better encapsulation. Try for independent, service providing modules. If this is not possible, than perhaps these groupings really shouldn't be dlls.
Not necessarily a recommendation, but an alternative might be to make them static libraries.
If this is really necessary, then you could have the first dll dynamically link to the second. (Only one way - I don't really think you want circular references.)
Under some circumstances you might do something with callbacks or passing in a object.Please do not read this signature.
|
|
|
|
|
Thanks Avi.
I think my "problem" is that I am looking at it from user , mechanical , point of view.
The DLL s are "placeholders" for property sheets.
I have a main property sheet with secondary property sheet underneath.
In plain talk - I have a tab control with sub-tabs.
I would like to keep them in separate DLL , and so far they are.
But I am trying to link them because that is the way it looks to the user.
This is where I am wrong, and I need to rebuild it so they are just accessible from the main application only. They are both “connected” to the document anyway and need to communicate only with the document.
Avi , I appreciate your comments, you made me think about my wrong way of approaching this.
You are very helpful.
Thanks
Vaclav
|
|
|
|
|
You're welcome. Thank you for that link in your post to Eugen Podsypalnikov. I didn't know about that possibility.
Vaclav_Sal wrote: They are both “connected” to the document anyway and need to communicate only with the document.
Sounds good to me. Being somewhat simple minded , I prefer to keep things as simple and straightforward as possible. Keep in mind that you will also have to maintain what you create. I've found that locating a problem when data flow is passing between 8 components, as it does in some software I get to maintain, can sometimes be interesting.
Another approach you might consider if you have to notify other windows of some action, but the document's UpdateAllViews() isn't appropriate, is to play "chain of command". Implement a custom message that is sent to the parent window for handling or rebroadcast to siblings of the originator. I've done this with mix-in classes for splitter windows to keep the panes in sync. This has let me reuse views on different tab pages with different - or no - siblings.
Oh, I just noticed your reference to VC++ version 6. Are you aware that the dialect of C++ used in 6.0 is non-standard? You might want to consider shifting your development to a later version that is more standard conforming.
Good luck.Please do not read this signature.
|
|
|
|
|
Hi,
I'm having a small issue with associating the extension of my files with my application.
I'm wanting to use a 2 character extension for my files.
Is this inherently wrong, or should it associate?
My resource string is as follows and seems to be ok
IDR_MAINFRAME "Ext File\nFile\nExt\nInstall Files (*.a1)\n.a1\NewFile.Document\nNewFile Document"
Any ideas?
Tony
|
|
|
|
|
What's the problem?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi David,
When double clicking on a file with a ".a1" extension it doesnt launch my application. I'm assuming therfore that it isnt associated with my application. It also does not display the application icon, which I understood it should.
My complete code, for what it's worth, to load the SingleDocTemplate is as follows
CSingleDocTemplate* pDocTemplate = new CSingleDocTemplate(IDR_MAINFRAME,
RUNTIME_CLASS(CProgDoc),
RUNTIME_CLASS(CMainFrame),
RUNTIME_CLASS(CProgView));
AddDocTemplate(pDocTemplate);
IDR_MAINFRAME is as per the original post
Thanks
Tony
|
|
|
|
|
maycockt wrote: When double clicking on a file with a ".a1" extension it doesnt launch my application.
Does HKEY_CLASSES_ROOT\.a1 exist in the registry? If so, does it have a default value?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
maycockt wrote: IDR_MAINFRAME "Ext File\nFile\nExt\nInstall Files (*.a1)\n.a1\NewFile.Document\nNewFile Document"
isn't it assocaited? "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
OK, problem partially solved.
I added RegisterShellFileTypes after my AddDocTemplate(), but the assocation is shown with a small sized icon, not the standard size icon you would expect to see if you were viewing a file list with "details" selected from Windows Explorer.
How can I affect the associated icon?
TIA
Tony
|
|
|
|
|
Check the icon file that you are using. It does not/should not contain just one image. It should contain multiple versions with different color depths and sizes. (You may have to look around in your icon editor to see how to move between these versions.)
You may be missing a needed size/color depth version, so Windows is trying to make due with something else. For some more information see here[^] and here[^].Please do not read this signature.
|
|
|
|
|
i want to read data from a wav file and then i want to use fft on that data in c.is there any method plz help and guide me.
thanks
|
|
|
|
|
Well, at lest the WAV file format is documented [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hello,
I have to add some blank spaces at the end of line.
How to add blank spaces at end of line while file writing?
Which file class i have to use CFile or CStdioFile?
for e.g.
suppose i have to write string
"Hello, how are you "
I have to add 10 space after the word "you".Abhijit
|
|
|
|
|
CStdioFile::WriteString("Hello how are you ");
10 spaces after 'you'; I don't understand what your difficulty is with this. Please try and clarify what you are trying to do.txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
If you're going to read and write on a line by line basis, then use CStdioFile . It exists for this purpose.
And what's your problem writing 10 spaces? Write it like you would write normal characters.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Hi There,
You could do this in one or more ways.
One way is to us the \t escape routine. Which works a little like this:
Somefile << "Some text to write to file\t";
That would add one tab space after the word file. So you could add a couple of \t escapes.
or use formatting functions instead. one example thereof is:
printf ("Width trick: %*d \n", 5, 10);
You would just have to figure out which is best for you.
Though printf() is routed to the console by default, you could use it or its counterparts to route to a file
object instead.
Hope this helps
Louis
|
|
|
|
|
Hi All,
I am using VS2005. In my application i am finding a window and enumerating its childs. Now i need to send messages to each one. I have tried to send WM_COMMAND, WM_CLOSE, etc..I have a doubt regarding sending keystroke messages to a window.
How to Send the Combination Key "Ctrl + P" to a window.
Please give your valuable suggestions...
Regards,
Spk
|
|
|
|
|
you have to something like this
WM_KEYDOWN -Send CTRL
WM_KEYDOWN - SEND P
WM_KEYUP-SEND P
WM_KEYUP- Send Ctrl "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Besides what Alok suggested, there's also SendInput()[^]
“Follow your bliss.” – Joseph Campbell
|
|
|
|