|
Hi,
Now I have a trouble on how to detect a script
variable changed.
In my page, I use activeX control to do something
,and it will return a value. But, I don't know when
it will ? Because my control will return it asynchronously.
So, I decide to try to get the value by using
an event; but, how to do this ? And, I must do it
in ActiveX and send notification to IE or I must
do it in custom event in HTML ?
Thanks for your help
|
|
|
|
|
I want to have in my window a CStaticCtrl.
this->m_static.Create(NULL,WS_VISIBLE|WS_BORDER,CRect(0,0,0,0),this,IDC_STATIC);
Sometimes i need my control. It should lay over the CStaticCtrl!
ActiveX.Create(NULL,WS_VISIBLE|WS_BORDER|TVS_SHOWSELALWAYS,CRect(0,0,0,0),this,ID_TEST);
void CFgServerViewRight::OnSize(UINT nType, int cx, int cy)
{
CView::OnSize(nType, cx, cy);
m_static.MoveWindow(0,0,cx,cy);
ActiveX.MoveWindow(0,0,cx,cy);
}
But i don't see my ActiveXControl? Whats the problem?
|
|
|
|
|
You're setting the identical dimensions for both controls in OnSize handler. Probably static control obscures activeX.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi every Body.
I want to Define a Pointer to point to a function.
for example:
int f(char b){
// Some things
}
Thanks a lot.
Iman Ghasr-e-fakhri
|
|
|
|
|
int (*FuncPtr)(char);
FuncPtr = f;
--Mike--
http://home.inreach.com/mdunn/
"Make sure that if you are using a blow torch that you don't set anything on fire."
-- Chris Maunder
|
|
|
|
|
How can i highlight/select the root element of a CTreeCtrl?
|
|
|
|
|
tree.SelectItem ( tree.GetRootItem() );
--Mike--
http://home.inreach.com/mdunn/
"Make sure that if you are using a blow torch that you don't set anything on fire."
-- Chris Maunder
|
|
|
|
|
Hi
I have a problem getting to my CDoc member variables from a CDialog.
If i use GetDocument from my view I can get the document variables data but if I open a dialog and tries to get the document data via the view - GetParent->GetDocument - all variables is empty. Why? Is the original document temporarily destroyd while the dialog is active and then restored after the dialog is gone? Is there a way around this or am I making something wrong?
Thanks in advance, Per
|
|
|
|
|
The best solution to solve your problem would be passing the document pointer to dialog. You can add the pointer as a public member of dialog class:
class CYourDialog : public CDialog
{
CYourDoc *m_pDoc
};
Before calling DoModal, you should init m_pDoc:
CYourDlg dlg;
dlg.m_pDoc = GetDocument();
if (IDOK == dlg.DoModal())
{
}
For more object oriented solution, make m_pDoc a private data member initalized in CYourDlg constructor.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi,
is there a way to change the title and subtitles of
CPropertyPage objects during run time? thanks.
|
|
|
|
|
|
How can I determine the name of user with which user is logged in into the domain. Also, is it possible to get the domain name in which user is logged in?
Atin.
|
|
|
|
|
Check out GetUserName(), GetUserNameEx(), and the IADsADSystemInfo interface.
--Mike--
http://home.inreach.com/mdunn/
"Make sure that if you are using a blow torch that you don't set anything on fire."
-- Chris Maunder
|
|
|
|
|
See HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
The GetUserName function retrieves the user name of the current thread. This is the name of the user currently logged onto the system. But if use this function from working service (when user was alredy logged in) You retrieves user name "SYSTEM" while current logged in user name be found in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
|
|
|
|
|
I am currently trying to change from using the Borland C compiler to Visual C++ however I have run into a problem. Borlands C compiler allows you to typedef functions, for example typedef BOOL(MYFUNC)(VOID *data) gives you a function that takes a VOID * and returns a BOOL. The Microsoft compiler doesn't appear to like this. Is there any setting you can change to allow this in the Microsoft compiler?
Thanks in advance for any help you can provide.
Steve.
|
|
|
|
|
You're missing an asterisk:
typedef BOOL (*MYFUNC)(void*);
--Mike--
http://home.inreach.com/mdunn/
"Make sure that if you are using a blow torch that you don't set anything on fire."
-- Chris Maunder
|
|
|
|
|
No thats not it.
I have a function defined as:
typedef BOOL(MYFUNC)(DATA *data);
</pre
I then try to use this as follows:
<pre>
MYFUNC somefunction
{
if (data->flag)
{
someotherfunction();
return(TRUE);
}
return(FALSE)
}
The compiler error is 'typedef cannot be used for function definnition'.
I dont think I am going to be able to get around this problem so I would appreciate any ideas on how to change these declarations in a lot of source files quickly. Would a macro or script be able to handle it?
|
|
|
|
|
You define a function pointer data type as:
typedef BOOL (MYFUNC *)(DATA *);
<pre>
which says "Any variable declared as MYFUNC is a pointer to a function that takes a DATA pointer as its parameter, and returns a boolean."
<pre>
MYFUNC func;
DATA d;
d.flag=SOME_FLAG;
if (func(&d))
MessageBox(NULL, "Success", NULL, MB_OK);
Jamie Nordmeyer
Portland, Oregon, USA
|
|
|
|
|
No thats not it.
I have a function defined as:
typedef BOOL(MYFUNC)(DATA *data);
I then try to use this as follows:
MYFUNC somefunction
{
if (data->flag)
{
someotherfunction();
return(TRUE);
}
return(FALSE)
}
The compiler error is 'typedef cannot be used for function definnition'.
I dont think I am going to be able to get around this problem so I would appreciate any ideas on how to change these declarations in a lot of source files quickly. Would a macro or script be able to handle it?
|
|
|
|
|
> Would a macro or script be able to handle it?
Yes, I think so - except for the fact that now you have to go through all the decls adding brackets around the function name:
#define MYFUNC(fn_name) BOOL(fn_name)(INT *data)
MYFUNC(somefunction)
{
if (*data)
{
return(TRUE);
}
return(FALSE);
}
I don't have my trusty Stroustrup handy - wonder which compiler is doing the right thing here?
|
|
|
|
|
For a second I thought I was logged in to Celebrity Deathmatch !!!
Christian
#include "std_disclaimer.h"
The careful application of terror is also a form of communication.
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
|
|
|
Hi,
I'm using Crystal Report 8.0 ...
I need to find a record its Code field is 120 ...
So, first i made the new report with Standard expert ...
Then i choosed all fields that i need ...
But i don't know where i can write SQL !!!
So, please tell me how can i write SQL in my report ...
Thanks,
Hadi Rezaie
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
for hardcoded values you can use Select Expert from the Report menu or the Select page from the Report Expert. or you can change the query at Database/Show SQL Query
setting the where and the order by part at runtime, set the SQLQueryString property of the Report object (RDC) or SQLQuery property (OCX). use must use the exactly same format as Database/Show SQL Query shows
|
|
|
|
|
Hi,
I used of SetSQLQuery, but won't work !!!
m_Crystal.SetSQLQuery("SELECT * FROM PERSON WHERE [CODE] = 1");
What is my wrong ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hi.
I'm trying to manage a listbox vertical scroll bar and I have a problem with the function OnVScroll when I drag the scroll box.
In OnVScroll(), when the first parameter nSBCode is SB_THUMBPOSITION or SB_THUMBTRACK, the second parameter nPos is expected to indicate the position of the scroll box. nPos (which is a UINT) can be cast to an int, and then I realized that after 32768, (int) nPos is -32768 ! Then, (int) nPos increases up to 32768 and then -32768 again !!!
How should I proceed to manage the scroll box position when the range of my vertical scroll bar is over 32768 ?
Thanks.
|
|
|
|