|
hi,
1.how to find weather the item clicked is a root or leaf in a tree.
2.should the menu resource be initialised or something before loading it to diaplay popup menu because I get run time error saying the handle is null. I use the same procedure said all over this site.
help
|
|
|
|
|
Regarding (1):
Handle WM_LBUTTONDOWN. Use CTreeCtrl::HitTest to get HTREEITEM. CTreeCtrl::GetRootItem returns root, so simple comparison of HTREEITEMS will answer your question. If you need to check if item is leaf, call CTreeCtrl::GetChildItem and pass clicked HTREEITEM - if it returns NULL, your item is a leaf.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Hi,
I have a dialog-based MFC application. In response to a button
click on the dialog I need another dialog to popup. So far so good.
I also need the text in an edit field in Dialog_1 to appear in an
edit field in Dialog_2.
In short, I need parameters to be passed from one window to another.
How can I do this?
With best regards,
Sayan Mukherjee
(sayanmukherjee@indiatimes.com)
|
|
|
|
|
Add data members do dialog2 and initialize them before calling DoModal.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Your comment is FILTHY You are SICK
|
|
|
|
|
Did you forget to take your pills today?
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Hi Tomasz
Initially I was confused as to his post too. The I guessed.
The sig must have upset him. Or if I guess right "upset her".
The anonymous poster is in all probability a woman
Your sig :- "** If you're going to rape, pillage and burn, be sure to do things in that order. **"
Nish
p.s. don't worry Tomasz. different people have different senses and levels of humor.
I am looking for a free racing game. Old style racing game without any complicated 3D stuff. Around 4 MB download. If anyone has such a game, please inform me.
|
|
|
|
|
Nish [BusterBoy] wrote:
don't worry Tomasz. different people have different senses and levels of humor
I'm absolutely not worried. Actually, I was thinking about changing the sig - it's about week old. But now I'll keep it for another week
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Hi,
Thanks for the answer. It was really helpful.
A related question:
In Windows SDK, each window has a place where a 32 bit pointer can be passed
which is accessible from other windows. Using the heap, one can pack any
amount of data and pass it.
Is there any equivalent to that under MFC? I am sorry if the question is
vague.
With best regards,
Sayan
Email:sayanmukherjee@indiatimes.com
|
|
|
|
|
Sayan Mukherjee wrote:
In Windows SDK, each window has a place where a 32 bit pointer can be passed
which is accessible from other windows.
I'm not sure what you're referring to - WPARAM/LPARAM passed with messages or extra bytes per window which you request during class registration?
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Sayan Mukherjee wrote:
Is there any equivalent to that under MFC?
To the best of my knowledge, no. If you're using MFC, your Window subclassed object should have a data member that you can set and get. Of course, you could always access a CWnd derived class' public m_hWnd member, but that's nasty!
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
hi,
If you want a very stable mechanism,go for user defined messages.
else
get the data from one dialog and store it in mainframe and display it in the second dialog.Mainframe because it is present as long as the app is running;you may also use App class.
hope it helped
Rajendra Gowda
|
|
|
|
|
I'm using a dynamic splitter window to display multiple views. I would like to create a window similar to the MS Outlook window, with one view on the LHS and two views on the RHS, one above the other.
m_wndSplitter.Create(...) arguments insist that you create a number of rows and columns for the views.
My question is, given that I must create a splitter window with 2 rows and 2 columns in order to achieve the desired effect, How do I hide/remove(?) the unwanted view?
Many thanx
funbag
skydiving....if at first you don't succeed, you're fecked!
|
|
|
|
|
No, you achieve the Outlook-like layout with *two* splitters. First splitter splits window vertically. LHS is a view and RHS is another splitter which splits horizontally and hosts two views.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
In addition to what Tomasz said you should use CSplitterWnd::CreateStatic, since you'd want different views for each pane.
Nish
I am looking for a free racing game. Old style racing game without any complicated 3D stuff. Around 4 MB download. If anyone has such a game, please inform me.
|
|
|
|
|
hello every body
when i tried to add a member variable for a datetimepicker the following error happen:'DDX_FieldDateTimeCtrl' : undeclared identifier
how can i avoid this error.
any help
Best Regards
|
|
|
|
|
Do you have #include <afxdtctl.h> in stdafx.h?
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
yes i have this include file
Best Regards
|
|
|
|
|
I've just noticed that 'Field' in DDX_FieldDateTimeCtrl. AFAIK, there's no such thing, at least in VC6. Are you adding this manually or with ClassWizard?
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
It's added with ClassWizard and I work VC6.
Best Regards
|
|
|
|
|
KB article Q195073 has the solution for your problem - you'll have to manually change DDX_FieldDateTimeCtrl to DDX_DateTimeCtrl
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
hi Tomasz
thanx , it's working now
best regards
Best Regards
|
|
|
|
|
BUG: Error C2065: 'DDX_FieldDateTimeCtrl': Undeclared Identifier
Q195073
--------------------------------------------------------------------------------
The information in this article applies to:
Microsoft Visual C++, 32-bit Enterprise Edition, version 6.0
--------------------------------------------------------------------------------
SYMPTOMS
When using the Date Time Picker Control in a Microsoft Visual C++ 6.0 AppWizard (exe) Database project, you may receive the following error:
Compiler Error "Error C2065: 'DDX_FieldDateTimeCtrl' : undeclared identifier"
CAUSE
The database dialog data exchange cover routine generated by the Microsoft Visual C++ 6.0 AppWizard for exchanging data between the Date Time Picker control and the recordset member variable is DDX_FieldDateTimeCtrl( ). This function is omitted from the Visual C++ 6.0 release code.
RESOLUTION
Replace the database dialog data exchange cover routine DDX_FieldDateTimeCtrl( ) with the AFXAPI DDX_DateTimeCtrl( ). Remove the fourth parameter in the DDX_DateTimeCtrl() call.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
|
|
|
|
|
Hi,
I have created one ActiveX Full control, and I'm using it through a TLB in my MFC client App, I need to get the interface to IDataObject, but it didn´t work out, I have tried two ways, the "smart one" ( pBaseMeta is an smart pointer to my control BSREPORTCTRLSLib::IBsMetafilePtr pBaseMeta):
IDataObjectPtr DataObj;
DataObj = pBaseMeta;
The good old one...:
IUnknown *pUnk = NULL;
IDataObject *pDataObj = NULL;
pBaseMeta.QueryInterface(IID_IUnknown, (void **)pUnk);
pUnk->QueryInterface(IID_IDataObject, (void **)pDataObj);
Here even a QI to IUnknown returns me NULL !
Should I forget TLBS and all that wrappers and directyle use CLSID's... and GUIDS and AddRef and..., is so sh*tty this ?
Thanks in advance
Braulio
|
|
|
|
|
Use debugger to step into pBaseMeta.QueryInterface - you'll be able to check what's exactly going on. Maybe smart pointer isn't initialized correctly.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|