|
thank you very much for your redirection, it's a beggining, now I will try to look for more information, thanks
|
|
|
|
|
|
Hi everyone
I'm currently trying to develop a product with an interface very similar to Outlook's.
My question is how would I go about doing this? Do they use a SplitterWnd to split the left and right panes? and if so is the toolbar on the lef just a custom view that draws icons vertically?
I want to change the pane on the right depending on what is clicked on the menu in the left pane. ie if you click the hierarchy icon then a tree view will appear in the right pane and if you click the users icon then a list view will appear on the right.
I am thinking of making it an SDI app and just swapping the views depending on the users selections. Does this make sense to do it this way?
i found an article that outlined how to make an outlook style menu on codeguru
http://www.codeguru.com/menu/contentmenu.shtml
but this uses a dialog resource to shape the menu. Im guessing outlook uses a custome view which is what i will have to implement i guess. Unless anyone knows of an easier way..
Thanks for any help
Ash
|
|
|
|
|
I implemented an Outlook UI using the popular BCG library - dead easy and there is also an "Outlook SDI" sample that ships with the source. Visit http://www.bcgsoft.com for more info.
Basically, you start with a splitter window, split vertically into two panes, with the Outlook bar view on the left. The right hand pane contains another splitter window which is split horizontally allowing a "list" view and a "preview" view.
Regards.
|
|
|
|
|
|
You only have to look in MSDN at CString::CString , CString::GetBuffer , CString::ReleaseBuffer
1)LPCSTR->CString
CString constructor---CString::CString( LPCSTR lpsz );
2)CString->LPTSTR
LPTSTR GetBuffer( int nMinBufLength );
Make sure you understand the ReleaseBuffer method.
|
|
|
|
|
Thank you Daniel !
Is the type LPCSTR is present in every language in windows ?
|
|
|
|
|
typedef const char* LPCTSTR
|
|
|
|
|
Is there anybody knows how to find the names of the shared files and folders on a remote computer like "network neighborhood" does?
"FindFirstFile" function doesnt seem to work. Maybe the path i use is not correct or it doesnt work at all on the subject.
Ex: FindFirstFile("\\Comp_name\\fold_name\\*.*" ,.....)
PS:
And more... Im very curios to find out how "network neighborhood" manages to obtain those shared files and folders? What's the mechanism it use?
Thank you.
|
|
|
|
|
FindFirstFile("\\Comp_name\\fold_name\\*.*" ,.....)
You're missing a slash at the beginning (well, two actually):
FindFirstFile("\\\\Comp_name\\fold_name\\*.*" ,.....)
--Mike--
http://home.inreach.com/mdunn/
"The Earth is doomed." -- Rupert Giles
your with and
|
|
|
|
|
FindFirstFile(\\\\Comp_name\\fold_name\\*.*" ,.....).
I still dont get how this function works...
|
|
|
|
|
FindFirstFile returns a handle,
so one's code would look like this... (a snipped from my production code)
WIN32_FIND_DATA fd;
CString sQualifier = sPath;
sQualifier += _T("\\*.*");
HANDLE hFindFile = FindFirstFile(sQualifier, &fd);
BOOL bBool = hFindFile == INVALID_HANDLE_VALUE ? FALSE : TRUE;
if (!bBool)
return FALSE;
int i=0;
while (bBool)
{
if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
listFiles.insert(FileList::value_type(fd.cFileName, fd));
i++;
}
bBool = FindNextFile(hFindFile, &fd);
}
Norm Almond
Chief Technical Architect
FS Walker Hughes Limited
|
|
|
|
|
I knew all the things you tell me.Thanx, anyway.In fact wanted to ask something else...
I meant how does a function on my computer like FindFirstFile managed to find out the shared resource on a remote computer? From where that function collects theese informations? What network protocol theese function use?
Why do i ask all theese questions? Just because i want to write a project... I want collect from my LAN how many information i can. All theese informations i want to monitorize on my computer. If i write a socket based client on every computer and a server on my computer then the problem is solved. BUT, I WANT TO WRITE A SINGLE APPLICATION ON MY COMPUTER IN ORDER TO GATHER INFORMATION FROM ALL COMPUTER IN MY NETWORK, ABOUT:IP ADDRESS, PROCESSES, MAC ADDRESS, FREE SPACE ON HARDDRIVES, AND MANY MANY OTHERS. Of course, i make use of SNMP (MIBII) BUT ONLY LOCAL. I dont know how to access SNMP information on remote computer.
I hope i wasnt boring and i made myself clear.
|
|
|
|
|
I think the Windows Networking (WNet) functions could be what you need. See the Platform SDK docs under Networking and Directory Services/Network Management.
|
|
|
|
|
WNet is exactly what i was thinking about!
i discovered WNet looking at "Computers enumeration" article. Now that you told me about WNet i have more trust in it. I have to say my WNet knowledge is zero.
Did you actualy use WNet on your projects? Do you know some articles except MSDN ones?
Thank you a lot!
|
|
|
|
|
FindFirstFile("\\Comp_name\\fold_name\\*.*",... ) works fine.
But FindFirstFile("\\Comp_name\\*.*,...) doesnt return anything...
Then i started the "Command Prompt" and type "dir \\comp_name" and i got the following message:" The share name was not found" !!!!!
i also mention that in Command prompt the following works fine: "dir \\comp_name\\fold_name" !!!!
If i type in Command prompt "NET VIEW \\comp_name" i get exactly what i want. Try yourself if you think i'm jocking.
So, how do i find out the parent directories on a remote computer (in my application, of course)?
Thank you... again:
|
|
|
|
|
I created by Wizard ATL COM DLL that import my MFC extention DLL(from type: base Dialog) in my ATL.
Please check my steps (describes below) and tell me if I miss something.
(because I dont success create instance of it from client program)
------------------------------------------------------------------------
1. I opened project: ATL COM Wizard. [DLL] [MFC Support]
2. I inserted to the library that created the file : MyMfcDll.dll
and attached to the ATL project the files : MyMfcDll.h , MyMfcDll.lib
3. I Added by wizard ATL class [MyClass] [single] [dual]
4. I added by wizard method [ShowMfcDialog] to IMyClass and fill it so :
___________________________________________
#include "MyMfcDll.h"
STDMETHODIMP CMyClass::ShowMfcDialog()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())
CMyDialog dlg; //from the imported dll
dlg.DoModal();
return S_OK;
}
______________________________________________
and that's all !
What is missing ?
I will be greatful if you will help me !
|
|
|
|
|
HI !
Now I see that in OLE/COM Object viewer CMyClass class present in the folder : Automation Objects but if I try open it by press on the + I gets the messageBox:
------------------------
CoGetClassObject failed
class not registered
REGDB_E_CLASSNOTREG(..)
------------------------
What is the problem ?
|
|
|
|
|
|
Is this the same machine that you compiled the ATL dll on. If not, then have you registered the dll. regsvr32 <dll filename>
Michael
|
|
|
|
|
How ?
|
|
|
|
|
from the command prompt,
regsvr32 mydll.dll
Michael
|
|
|
|
|
hi,
To Register the component in a Dll, Run:
regsvr32 yourDllserver.dll
To Un-Register the component in a Dll, Run:
regsvr32 -u yourDllserver.dll
Note:
Run the program "regsvr32" in the directory in which you have your Dll.
or,
Specify the full path to regsvr32
Firoz
|
|
|
|
|
Can you answer me on my first question in this thread also ?
I will be greatful !!!
|
|
|
|
|
When I try present the dll by a client program .
now (after the registration of the dll) it create instance successfully but when It come in to the line that execute function of the dll the computer become crazy and I gets the message :
" 'ClientProgName' caused an invalid page fault in module KERNEL32.DLL "
---------------------------------------------------------------------
In the first question in this thread I detailed my steps of creation that ATL. Is something wrong or missing in it ?
______________________________________________________________________
Or maybe the problem is in my client program ?
----------------------------------------------------------------------
Please ! Please ! Help me !!!
|
|
|
|