|
CTreeView has a method CTreeCtrl& GetTreeCtrl(). You fill the items into this control.
Sonork 100.15206;PavelK
|
|
|
|
|
I've tried to do that but that does not work. Here is the code i am using.
void CMainFrame::OnInsertNewroot()
{
CTreeView *pView = (CLeftView2*)GetDlgItem(1);
//CTreeCtrl *pCtrl = pView->GetTreeCtrl();
//(CLeftView2*)CTreeView::GetTreeCtrl();
}
Please comment
|
|
|
|
|
I wonder about the GetDlgItem call - returns it the view pointer really?
I would go for the left view pointer through the document and splitter view.
Sonork 100.15206;PavelK
|
|
|
|
|
How to get the Time & Date from remote WinNT LAN Server
(DomainController) in C++ programm using WinAPI functions or otherway
(not using call to command.com same as: NET TIME \\server_name /SET ).
My programm must run on Win9x, and so I can't use the
NetRemoteTOD API which supplied only in WinNT,
and I can't run DCOMserver on domain controller to
obtain the time and date from it because admin is thery angry.
May be somebody now?
|
|
|
|
|
Hi,
I need to override a function that is declared and defined in a library I'm using. The function is just a plain function, not a member of a class. Also the library should use the new definition after overriding. How can I do this?
-Janetta
|
|
|
|
|
|
I do over a control, another does not add everything, and handle its news
News inside affiliation
case WM_SETFOCUS:
{
::SendMessage(hwnd,WM_KILLFOCUS,0,0);
::AfxGetMainWnd()->SetFocus();
}
Certainly, there is WIN98 variety to mean the way, once after the VB inside add to carry come amiss, and this is the mistake in Win98;P to descend:Present the draft:In the USER .DLL inside register the mistake, but under the WIN2000 is good?Please ask to is what is the row?Please MAILTO: lihao_nx@hotmail.com
|
|
|
|
|
|
Hi, everyone!
I have got the source code of a big project. Now I
want to draw the calling chains/relationships of the
functions and modules of the project. The project is
written in C/C++. Is there a tool that I can use to
generate the calling chain picture automatically?
Cheers,
George
|
|
|
|
|
|
Thanks, Pavel pal!
Your tools are very helpful!
Cheers,
George
|
|
|
|
|
|
Hey guys,
I wanted to knwo if someone coudl show me hwo to pass variables between 2 dialog window classes. I am writing a program that has 2 dialog windows. I have the user enter the variables in one class, I'd like to display the result in another dialog window(some mathematical stuff). Basically I need to access the variables I have from MyDlg1 class in MyDlg2 class.
Could someone please show me how this is done?
Thanks,
NickOne
|
|
|
|
|
I think an easy way of doing this would be to have pointers to the dialog window.
After creating the 2 dialog windows (d1 & d2) in your main window, you can call a function in d1, passing it a pointer to d2.
After the computation is performed in d1, you can call the display function of the 2nd dialog box using the pointer to d2.
May be you can go in for the sophisticated "callbacks" if necessary.
HTH.
Logic is a systematic method of coming to the wrong conclusion with
confidence.
|
|
|
|
|
Hi.
I often use the use of typedef and tag used global struct in MFC. For example, worker threaders are often declared using a global struct.
-----
typedef struct tagWORKERTHREAD
{
...
} WORKERTHREAD;
-----
I would like to know what are the purpose of tag and typedef in a case like the example above. Why not use this declaration?
-----
struct WORKERTHREAD
{
...
};
-----
Thanks,
Kuphryn
|
|
|
|
|
In short, the first declaration is C and the second is C++. Actually you can use the second form of declaration in C, but then you must repeat the struct keyword in every definition using the type.
|
|
|
|
|
|
I'm having trouble figuring out how to save data to a disk in a MFC dialog app project. Normally when I do this, I'm using the SDI or MDI framework which does all serialization and file handling and all I do is make my data serialize itself when the framework requests it.
Unfortunatly dialog apps aren't as user friendly for me at least when it comes to this. Most of the stuff I've been able to find deal with SDI or MDI. If anyone can point to a resource that will allow me to do this I would appreciate it.
Thanks in advance friends.
|
|
|
|
|
serialization is pretty much up to you, when you're outside the Doc/View world. but, it's pretty easy to do. you can create a CFile object for the data, attach a CArchive object to it, then use the same old "<<" operations to write your data.
you'll have to provide your own file open dialogs, and you'll have to track the "modified" flag yourself, too. but that's all easy.
-c
Aiei i ea eio aoa i e eio e aigoa
|
|
|
|
|
Chris Losinger wrote:
you can create a CFile object for the data, attach a CArchive object to it, then use the same old "<<" operations to write your data.
Do you know of anyplace that has demos of this? I checked msdn, but it is only the Doc/view stuff.
|
|
|
|
|
here's something i use for one of my apps:
BOOL CMapFile::Write(const char *csFileName)
{
CFile theFile;
try
{
if (!theFile.Open(csFileName, CFile::modeWrite | CFile::modeCreate))
{
return FALSE;
}
}
catch (CException *e)
{
e->ReportError();
e->Delete();
return FALSE;
}
BOOL bOK = TRUE;
CArchive archive(&theFile, CArchive::store);
try
{
archive << m_csVersion;
m_data.Serialize(archive);
archive.Close();
}
catch (CException *e)
{
e->ReportError();
e->Delete();
bOK= FALSE;
}
catch (...)
{
bOK= FALSE;
}
theFile.Close();
return bOK;
}
inside the 2nd try/catch, i'm doing your standard archive stuff. everything around it is setup and cleanup. reading is almost identical.
-c
Aiei i ea eio aoa i e eio e aigoa
|
|
|
|
|
|
Is there any way to know the session id of a given process ?
thanx
|
|
|
|
|
the function CDC::LPtoDP
logical unit is used in case of a view. But, i don't know what the meaning of physical unit is.
for ex: LPtoDP(CPoint(0, -850)) returns the constant result (0, 540) when using MM_LOENGLISH. So, what is the screen coordinate?
there are 3 levels of coordinates: logical, physical, "?"??
thank you in advance.
|
|
|
|
|
The device points are determined by the physical size and resolution of the display device (which can be the monitor or the printer, for instance). The logical points are measured in the scaled units you define yourself by means of the mapping mode and calls to SetWindowExt/SetViewportExt (and related functions, se MSDN).
Do not confuse with client/screen coordinates: Client coordinates are relative to the client area of your window, screen coordinates are relative to the screen (and not your window).
In your example, LPtoDP will yield the same result until you change the mapping mode or the scaling.
Cheers
Steen.
"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|