|
|
While it's true that you couldn't have:
parent
/ | \
child child child You could easily have:
parent
|
child
|
child
|
child I read his question as "all child windows," regardless of the immediate parent window.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Right. I read it the other way.
Which is why I said I hope not. I never claimed to make sense
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
|
Hi,
take a look in the posts of this link[^]
I have implemented an override of CanCloseFrame checking out if the view/window to be closed id the main or not. And closing all the child windows/secondary views if the Close comes from the main view / parent window.
I think you can easily modify my code to adapt it to your conditions.
If you don't understand how it works take a look to the posts I wrote (Search autor: nelek, keywords: Child Window) to see where and why I am using it.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
I use get_selection to get the source code selected by mouse,and then I try to match it in whole html text source code,and now I hope to let the matched html block to be translated into corresponding IHTMLELEMENT,how can I do next step?
For example,there is the following code:
help
I selected "" and want to use red line to surround the table,who can give me some advices?thks.
|
|
|
|
|
I'm trying to simulating a button containing in a form.By reading some reference articles,I'd seen that most of them suggested to use webbrowser control,and then acquire htmldocument2 dispatch to get IHTMLInputButtonElement interface.But I'm now doing real time system,it demanded to get infos as soon as possibly,so I must use multiple threads to solve it.From some articles,I heard that webbrowser control cannot be used in multiple threads environment.So what's the better way?
|
|
|
|
|
Hi,
I've posted the same question in ATL/WTL section also, but did not get any response.. posting again.
I'm planning to implement a chat server + a chat client as a learning exercise for my ATL/COM/DCOM.
As part of that first I would implement a chat server which is a local server and a chat client. Please suggest if the following is possible, if true how.
Clients register their callbacks by using Advice() (Of course, I would do FindConnectionPoint(), before that ). My doubt is is there any way to send the notification from the server to all the clients? and also can the server select the client to which it has to send the notification.
For Example: User1, User2 are currently logged in. If user1 sends a message to User2 by using SendMsg(from, to, msg) of IChatServer, can the server alert client of User2.
Otherwise can server broadcast the event??
Thanks and regards,
Raja Pratap
|
|
|
|
|
Raj Prathap wrote: I've posted the same question in ATL/WTL section also, but did not get any response
Well if you are asking about using DCOM for remote communications maybe you should try the "COM" forum?
|
|
|
|
|
LTNS led mike!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hey Mark... was on the road for a few days and then playing catch up
|
|
|
|
|
ROTFLMAO
Five hours old but I just saw this[^].... nothing changed much in my absence eh?
"Code Project... best entertainment value on the Web!"
|
|
|
|
|
led mike wrote: "Code Project... best entertainment value on the Web!"
!!
I came close to opening that can of worms (the link)
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I want to disable and enable menu items depending on conditions. Say for eg.
if menu is
File Input Analysis Help
There are many items under each menu. If 1st item under File is clicked, Input menu has to be enabled.
|
|
|
|
|
There's two messages attached to a menu item. One is a click event, the other is a callback, which is called just before it is shown, you set those things there.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
This is the best way:
<br />
BEGIN_MESSAGE_MAP(CYourFrame, CMainFrame)<br />
ON_UPDATE_COMMAND_UI(ID_MENU_ITEM_1, OnUpdateMenuItem1)<br />
END_MESSAGE_MAP()<br />
<br />
void CYourFrame::OnUpdateMenuItem1(CCmdUI *pCmdUI)<br />
{<br />
pCmdUI->Enable([TRUE or FALSE here depending on condition]);<br />
}<br />
Hope it helps
|
|
|
|
|
Hello, I tried to use CFileDialog to choose a folder path in my program but it this way user has to select a file and then I have to use GetFolderPath() to get the path but it may not be very sensible to user to select an arbitary file within a directory to select that directory on the other hand the directory can be empty that creates an additional problem. How can I open a dialog so user can select a folder path? is it possible to select from a tree structure of directories?
Thanks
|
|
|
|
|
Electronic75 wrote: How can I open a dialog so user can select a folder path?
Did you have a look at SHBrowseForFolder API.
It returns a pointer to an item identifier list (PIDL) specifying the location of the selected folder relative to the root of the namespace.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanks alot _AnShUmAn_, though I have programmed for more than four years with MFC I still do not know some APIs and when I looked in help with keywords: "choose folder" it returned nothing useful. you helped me a lot god bless you.
|
|
|
|
|
Electronic75 wrote: though I have programmed for more than four years with MFC I still do not know some APIs
FYI, SHBrowseForFolder is not MFC, it is part of the Windows API - Windows Shell programming, to be specific
|
|
|
|
|
My Pleasure
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
Hello All,
Actually i am using in my application "PropertyPage and PropertySheet" so i have to set bitmap on PropertySheet header and footer for every page so for that i am trying as follows:
constructor of my propertysheet class
CMyPropertySheet::CMyPropertySheet(CWnd* pParentWnd,
UINT iSelectPage, HBITMAP hWatermark, HPALETTE hpalWatermark,
HBITMAP hHeader)
: CPropertySheet(what i have to give caption ID here, pParentWnd, iSelectPage, hWatermark, hpalWatermark, hHeader)
and i am calling that as follows:
Bitmap bmWatermark;
CBitmap bmHeader;
if(!bmWatermark.LoadBitmap(IDB_BITMAP1))
return FALSE;
if(!bmHeader.LoadBitmap(IDB_BITMAP1))
return FALSE;
CMyPropertySheet MyPropSheet(NULL, 0, bmWatermark, NULL, bmHeader);
for this i am only unable to understand what i have to caption id into CPropertySheet(....) constructor if i am giving some integer than it got crashed
so if anybody have idea please share with me..........
thanks
|
|
|
|
|
The ID would be a resource ID of the string resource to use as a caption.
There's also a constructor that takes a LPCTSTR so you could pass something like _T("My Caption").
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I have a class derived from CWinThread, which have a CWnd* member which would recieve message from the thread. In the class also has a socket member,it would send network message to the CWnd* member.
I use such class in a Dialog,it works well.But when the main dialog create a new child dialog and show it using DoModal() function, and I want to make the child dialog correspond to the thread message and network message. In the child dialog,I send data to somewhere,but the class does send the data when the child dialog closed. Why?
Thanks
Good Luck.
|
|
|
|