|
I'm a bit new to this type of programming but I was wondering if anyone could point me to some information or provide some coding ideas on how to display a message to the user on the screen within a Direct3D game from an external process. I don't have any internal access to any of the game code. It would behave similarly to how FRAPS displays the frames per second inside all Direct3D games.
Thanks for any advice.
|
|
|
|
|
How do i get the control's handle in a dialog?
is thr ny way of enumeration for this? plz provide me some sort of example.
|
|
|
|
|
Please don't post twice (or more) the same question.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
If you have the control's ID:
HWND hwndCtrl = ::GetDlgItem(hwndDlg, ID_CONTROL);
Mark
|
|
|
|
|
Actually i have to move all the controls at run time in more than 100 dialogs and in each dialog there are many controls. so instead of passing each control id i want to enumerate all the controls to get the respective handles and with this handle i m moving the controls appropriately.
so plz give me solution to get the handle of all controls in a dialog.
|
|
|
|
|
Like CPallini said:
EnumChildWindows(hwndDlg, EnumChildProc, 0);
...
BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lParam)
{
...do something with hwnd, a handle to a child window of hwndDlg...
return TRUE;
}
*EDIT* Return a value from EnumChildProc()
|
|
|
|
|
Raj Gopal wrote: so plz give me solution to get the handle of all controls in a dialog
Mark Salsbery already did. Anyway have a look also there [^] where a similar request has been posted.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Raj Gopal wrote: s thr ny way of enumeration for this? plz provide me some sort of example.
try this simple api GetNextDlgTabItem
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
if you want to get handle of all controls on a forum you can use of
CWnd *pwnd2;pWnd2 = GetTopWindow(); and on a loop use of pWnd2 =pWnd2 ->GetNextWindow();
|
|
|
|
|
hello all:
i want to run a avi files by a vc project.
there was problem, i want to rotate the radio by 180 degree,like a video in the water.
how can i do?
i need a good idea or some samples.
sorry for my poor english.
thanks in advance!
henry
-- modified at 2:11 Monday 4th December, 2006
|
|
|
|
|
|
can somebody tell me how to get object or resource id of all the controls by passing dilaog handle progrmatically.
|
|
|
|
|
You can use EnumChildWindows , calling, inside your callback function, GetDlgCtrlID .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
thank you.
actually i need an handle of all the controls in a dialog.
can you please send me an example illustrating EnumChildWindows();
i m sorry for posting the message twice.
|
|
|
|
|
CPallini wrote: EnumChildWindows, calling, inside your callback function, GetDlgCtrlID.
What about simple call to GetNextDlgTabItem!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
ThatsAlok wrote: What about simple call to GetNextDlgTabItem!
Does not work unless the control has the WS_TABSTOP set (I know, usually a control HAS this style set).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
CPallini wrote: Does not work unless the control has the WS_TABSTOP set (I know, usually a control HAS this style set).
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Hello everyone
I want to learn how can I do this :
write a recursive function member level() for class template BST that determines the level in the BST at which a specified item is located .The root of the BST is at level 0 , its children are at level 1 , and so on
and this is the code for //--- Definition of search()
Code:
template <typename DataType>
bool BST<DataType>::search(const DataType & item) const
{
BST<DataType>::BinNodePointer locptr = myRoot;
bool found = false;
for (;;)
{
if (found || locptr == 0) break;
if (item < locptr->data) // descend left
locptr = locptr->left;
else if (locptr->data < item) // descend right
locptr = locptr->right;
else // item found
found = true;
}
return found;
}
Rooro
|
|
|
|
|
Hi all,
I am using CToolTipCtrl as follows:
m_ToolTip.AddTool(this,sToolTip,rc,1);
m_ToolTip.SetMaxTipWidth(MAX_PATH);
m_ToolTip.Activate(TRUE);
m_ToolTip.SetWindowPos(&wndTopMost,0,0,0,0,SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOOWNERZORDER);
MSG msg;
msg.hwnd = m_hWnd;
msg.message = WM_MOUSEMOVE;
msg.wParam = 0;
msg.lParam = MAKELONG(point.x , point.y);
msg.time = 0;
msg.pt.x = point.x;
msg.pt.y = point.y;
m_ToolTip.RelayEvent(&msg);
the tool tip is shown 100% ok, but when i log on to this site:
http://news.sky.com/skynews/home[^]
the tool tip stops from working. i think there is a control on that site that does something to my tool tip.
what am i doing wrong?
thanks in advanced
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
How can I change font of dialog box programatically at runtime.
I tested OnSetFont() member function and SetFont method but failed.
Thanks
|
|
|
|
|
IMHO you have to propagate the WM_SETFONT message to dialog controls (that are dialog child windows). For instance, you can call (inside OnInitDialog )
EnumChildWindows(this->m_hWnd, MyFunc, (WPARAM)(HFONT)(*m_pFont));
where MyFunc is something like this:
BOOL CALLBACK MyFunc( HWND hwnd, LPARAM lParam )
{
HFONT hFont = (HFONT) lParam;
SendMessage(hwnd, WM_SETFONT, (WPARAM)hFont , MAKELPARAM(TRUE, 0) );
return TRUE;
}
and m_pFont is a pointer to a CFont object.
hope that helps.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Thank you very much.
But it does not change size of the dialog!
I want that changes after setting a bigger font for example.
|
|
|
|
|
Hadi Dayvary wrote:
But it does not change size of the dialog!
I want that changes after setting a bigger font for example.
MoveWindow()
<div class='ForumSig'>"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you </div>
|
|
|
|
|
I have a propertyPage in which I have CEdits. I want to display text entred in thoses CEdits from another CDialog.
for example in my Page I enter in the CEdit m_edit1 the CString "myName" I want that I transmit this value to an CEdit of a CDialog m_CEdit.setWindowText(m_edit1)
so they recommanded me to add message handlers to controls of this page.
what does it means ? and how I use these message in this CDialog in which I want to receive the data from this propertyPage ?
thank's
|
|
|
|
|
for example:
<br />
<br />
COleDateTime my_Time;<br />
<br />
int i = 600;
<br />
If use this method:
<br />
my_Time.Format(0000, 00, 00, 0, 10, 0);<br />
that ok, but if i = 12345, or 54321, the convert should very difficulty.
I hope obtain a easy method.
Thanks!
|
|
|
|