|
This is a dynamically created control.is there any style or method to do that.
bhw
|
|
|
|
|
I dont understand what you said can you more explain.
|
|
|
|
|
WhiteSky wrote: I dont understand what you said can you more explain.
The control is created at runtime rather than design time.
"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
|
|
|
|
|
No I want to know his question was about control or color.
|
|
|
|
|
Hello
Use WinProc or PreTranslateMessage to catch the message WM_CTLCOLORSTATIC
and compare the control id with the id that you give to your static.
And then is just the same as if you use the designer.
Something like this:
BOOL CYourDialog::PreTranslateMessage(MSG* pMsg) <br />
{<br />
if(pMsg->message == WM_KEYDOWN && pMsg->wParam==VK_RETURN)<br />
{<br />
if(IsWindow(m_YourStatic.m_hWnd))<br />
{<br />
if(pMsg->hwnd==m_YourStatic.m_hWnd)<br />
{<br />
DoSomething();<br />
}<br />
}<br />
}<br />
}
|
|
|
|
|
I am new to window programming and I need to do a task which is to know whether all the child dialogs have been exited before closing the main dialog. Can you please direct me, how can i do it?
Further explanation is the main dialog should not exit of ESC key unless all the child dialogs are properly closed.
Thanks in advance.
S.S
-- modified at 8:53 Tuesday 12th June, 2007
|
|
|
|
|
Are the child dialogs modal or modeless?
"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
|
|
|
|
|
DavidCrow wrote: Are the child dialogs modal
I hope not
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Mark Salsbery wrote:
I hope not
Why?
"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
|
|
|
|
|
|
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
|
|
|
|