|
I solved my problem.
If you want to know how to do it, check the following web side (unfortunatly in german):
http://www.differentpla.net/~roger/devel/tips/vc/resources_in_libs/
|
|
|
|
|
Ups, sorry,
the webside is in english )
Ciao,
f.o.b
|
|
|
|
|
I'd like to create an application (a DialogBased or SDI) that has the main window splitted into two parts.
The first part is a treeview and the second is a form that shows details of an item selected in the treeview.
There is one form for every different type of an item.
The problem I've come across is to how to make the second part of window dynamic? I mean how to visualize the detailed form and changing (replacing) it into another dynamically once the item in the tree view is changed?
Many thanks for any hint in advance.
misiek
|
|
|
|
|
I suppose you are using MFC.
I've solved it with a view which owns hidden modeless dialogs for each type of item. When an item in the tree is selected, the proper dialog is shown and filled.
Pavel
Sonork 100.15206
|
|
|
|
|
I beg your pardon
But let me describe your solution more closely.
Your application is based on Doc/View core.
You splitted the main window into two "subwindows"
One of the windows owns hidden modeless dialogs for each type of item.
Am I right?
Once more thx a lot.
misiek
|
|
|
|
|
I'm using a CSplitterWnd MFC class to implement multiple pane windows.
See this[^]
or MSDN for more info.
Some excerpts of the view with dialogs:
class CDlgView : public CView
{
...
CEmbeddedDlg* m_curdlg;
CEmbeddedDlg* m_emptydlg;
CTableDlg* m_tabledlg;
CProtocolDlg* m_protocoldlg;
CDataView* m_dataview;
...
void ShowDlg(IXMLDOMElementPtr node);
...
};
void CDlgView::OnSize(UINT nType, int cx, int cy)
{
CView::OnSize(nType, cx, cy);
m_emptydlg->SetWindowPos(NULL,0,0,cx,cy, SWP_NOMOVE | SWP_NOZORDER);
m_tabledlg->SetWindowPos(NULL,0,0,cx,cy, SWP_NOMOVE | SWP_NOZORDER);
m_protocoldlg->SetWindowPos(NULL,0,0,cx,cy, SWP_NOMOVE | SWP_NOZORDER);
}
int CDlgView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
m_emptydlg = new CEmbeddedDlg();
m_emptydlg->Create(IDD_EMPTY,this);
m_curdlg = m_emptydlg;
m_emptydlg->ShowWindow(SW_SHOWNORMAL);
m_tabledlg = new CTableDlg();
m_tabledlg->Create(IDD_TABLE,this);
m_protocoldlg = new CProtocolDlg();
m_protocoldlg->Create(IDD_PROTOCOL,this);
return 0;
}
void CDlgView::ShowDlg(IXMLDOMElementPtr node)
{
m_curdlg->ShowWindow(SW_HIDE);
if(node==NULL) m_curdlg = m_emptydlg;
else
{
_bstr_t name = node->nodeName;
if(name == _bstr_t("table")) m_curdlg = m_tabledlg;
else if(name == _bstr_t("protocol")) m_curdlg = m_protocoldlg;
else m_curdlg = m_emptydlg;
}
m_curdlg->ShowWindow(SW_SHOWNORMAL);
m_curdlg->Fill(node);
}
Pavel
Sonork 100.15206
|
|
|
|
|
|
I want the non-MFC versions of CString and COleDateTime classes. These should be free and the exact replica of original MFC classes. Anyone having some information in this regard then please tell me.
|
|
|
|
|
CString is part of WTL template library, but I not sure about the licence - it's free for VC++ users.
Pavel
Sonork 100.15206
|
|
|
|
|
WTL has CString class that is non-MFC, or std::string can be used as a replacement. I've never come across a good COleDateTime replacement that wasn't MFC. Although it isn't hard to convert the code in the MFC src to something useable - depending which functionality you require.
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
I wrote a little clipboard application and I want that every time
a CTRL+V is pressed to perform some action in my application that will
affect the data in the clipboard, repost it to the clipboard and display
it on the screen.
lets say, that I did CTRL+C on "hello" and now pressed CTRL+V.
my application will convert to upercase "HELLO" and I want it pasted
on screen (of course without the smallercase "hello")
I have talked to people who said maybe catching an interrupt of CTRL+V
and creating one after manipulation - but, can I make sure my CTRL+V
interrupt is done before it is pasted by the OS on the screen ?
if so, how do I catch and throw such an interrupt ?
thank you in advance,
MA.
|
|
|
|
|
I don't know a lot about it, but you can use ole classes, first to catch the CTRL+V operation (OnKeyDown ?), and then create a COleDataObject , attach it the Clipboard AttachClipboard retrieve the data from the clipboard GetData . Modify your data, create a COLEDataSource , and use CopyToClipboard .
That'S the first I would try.
~RaGE();
|
|
|
|
|
Don't need to talk about interrupt ( Yuck!)
in your application, you need to handle the CTRL-V message ; either as an acceleration, which should already be in the accelerator table of the resources, and with the menu entry.
the accelerator and menu will have the same ID, for example IDM_EDIT_PASTE, and your code, in the CWnd derived class that you want to receive the message, you will have to add something like ( manually or with the wizard ):
ON_COMMAND(ID_EDIT_PASTE, OnEditPaste)
...
void CMainFrame::OnEditPaste()
{
}
|
|
|
|
|
Hello,
INTRODUCTION:
I've derived a CListCtrl in order to be able to edit items, subitems... in order to do so the list control creates at runtime an editbox and a combobox...
Now I create them using the ID's of two existing controls.
I'm sure there must be a solution in order to get free ID's and in order to generate controls using those free ID's.
This is my code:
CRect r;
if (this->m_cedParametritzacio.GetSafeHwnd() == NULL)
{
this->m_cedParametritzacio.Create(WS_CHILD | ES_AUTOHSCROLL,r,this,IDC_ED_PARAMETRITZACIO_LCTRL); <code>Here I use the IDC_ED_PARAMETRITZACIO_LCTRL ID...</code>
}
QUESTION:
Is this possible?
Could you write down a litlle example (little)
Thank you in advance.
|
|
|
|
|
I would suggest to use ::GetDlgItem() to determine if a given ID is used or not.
In pseudo code:
int gnMyCtrlID = ID_WHATEVER;
... some code
if (this->m_cedParametritzacio.GetSafeHwnd() == NULL)
{
while(::GetDlgItem(this, gnMyCtrlID))
gnMyCtrlID++;
this->m_cedParametritzacio.Create(WS_CHILD | ES_AUTOHSCROLL,r,this, gnMyCtrlID);
}
You have also to adapt the message handlers to use this ID.
I don't think this is a serious possesion, and the evil most likely comes from your hand. Colin J Davies, The Lounge
|
|
|
|
|
Hi
I am created a electronic device like a joystick now wat i need to do is use this joystick to send messages to games (directx/OpenGL) My joystick currently supports four directions the joystick works OK with the normal window based application like notepad and others but it does not work with games that are created using OpenGL or Directx anyone with an answer or a solution i would be very much thankful
Thanks in advance
bye
Asif Iqbal
|
|
|
|
|
If you really want an answer, please don't post twice the same things. Seems to me like your emulating a driver, or something ? I might write crap, but I don't think that OpenGL or DirectX are the cause of the not functionning of your SendInput, but i think that the games themselves maybe do not use the input stream the same way as "normal" windows based apps. So it seems to me like you will have to write a _real_ driver ...
~RaGE();
|
|
|
|
|
Hi
My project involves sending messages to different windows in the Windows XP environment that is i am communicating with different window by using the SendInput() function now the problem is this that i cannot send messages to games that are developed using OpenGL or Directx All the other application like the windows work all fine I used SendMessage to to an OpenGL game and i havent tried it by sending messages to Directx
based games so isnt SendInput() function powerful enuff to send messages to OpenGL games or directx games please help me out with this problem Thanks in ADVANCE
Ahmed Ajmal
|
|
|
|
|
My program chang windows setting when running,it return this sittng when it has not been active-may be user Alt+Tab
or program termination,my problem is my program consider my help file as new program then it return windows setting while help active?
salah
gis member
|
|
|
|
|
I'm searching for a good reference to include cumulative histograms in my program.
Can anyone help me?
Thanx,
Geert
|
|
|
|
|
How could I manage a app according with the user profile logged in a Server Operational System ??
I need functions to get the current profile name and get the directories of all user profiles.
Thanks,
Cris.
|
|
|
|
|
GetUserProfileDirectory() and GetAllUsersProfileDirectory()
I don't think this is a serious possesion, and the evil most likely comes from your hand. Colin J Davies, The Lounge
|
|
|
|
|
"No topic found" for these functions in MSDN Library Visual Studio 6.0. Another idea ??
[]'s
|
|
|
|
|
olhar aqui[^]
Look in the right place
I don't think this is a serious possesion, and the evil most likely comes from your hand. Colin J Davies, The Lounge
|
|
|
|
|
Ok, Andreas ... Thanks !!
But, Do you know where could I take the 'userenv.h' file ? And abount Windows CE, these functions have compatibility ?
Thanks a lot ...
Cris.
|
|
|
|