|
Hi friends
I want to pass a SAFEARRAY of BSTR from a unmanaged code to a managed assembly. My constraint is I can accept just an IntPtr in the managed code. I tried passing SAFEARRAY*, but could not convert it to Array or string[] in the managed code. Can anybody suggest how to achieve it?
vikram
|
|
|
|
|
hi there..
i am enabling mfc in an activex control and what happens is that when i debug it ..it throws an access violation in OLE32.lib..
dont know why..ne ideas?
regards
safee
|
|
|
|
|
hello
i work on MFC project SDI,and i have add to my window a new DIALOGBAR ,and i want to add in it some control like slider and button but i have a problem how i can get message from a slider because the new DIALOGBAR is child and not main and one of this problem is:
when i add slider and one EditBox and i want to watch the progression number of the slider in the Edit no thing happned.
can you help me please?????
|
|
|
|
|
Hi,
Because the dialogbar is a child, you have to catch the message from the slider control into the parent window.
You have to catch the slider message with onHScroll() or onVScroll().
So into your parent window (probably the mainframe) you can put into your mainframe.h:
CSliderCtrl myslider;
and
void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
into your
mainframe.cpp
DDX_Control(pDX, IDC_MYSLIDER, myslider);
ON_WM_HSCROLL()
and
void mainframe::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
CSliderCtrl* slider = (CSliderCtrl*) pScrollBar;
int position = slider->GetPos();
OnHScroll(nSBCode, nPos, pScrollBar);
}
so after having the position, you can put the value into the edit box.
It's up to you from now
bye
Everything's beautiful if you look at it long enough...
|
|
|
|
|
i was made all what you tell me but it have an error in DDX_Control(pDX, IDC_MYSLIDER, myslider);
it's ask that pDX undeclared identifier,why?and when i must put it in the constructor or where exactely.
|
|
|
|
|
Hi,
DDX_Control(pDX, IDC_MYSLIDER, myslider);
into DoDataExchange(CDataExchange* pDX)
ON_WM_HSCROLL()
into the MessageMap
bye
Everything's beautiful if you look at it long enough...
|
|
|
|
|
Hi,
I am using Microsoft DataControl Grid 6.0. While clicking on a cell, I have to display a combo Box in that cell.
The width and height of the combo box should be the same as the cell.In the grid ,the column and row size are resizable.But the combo Box placement and size both are not coming properly. I have used the following code.Help me.
CRect objRect;
float nRowHeight = m_DBgrid.GetRowHeight();
float nDataColLeft = objDataGridColumn.GetLeft();
float nRowTop = m_DBgrid.RowTop(nRowNo);
float nColWidth = objDataGridColumn.GetWidth();
CRect objRect1;
m_DBgrid.GetWindowRect(objRect1);
ScreenToClient(objRect1);
objRect.left = (int) (objRect1.left + 22);
objRect.top = (int) (objRect1.top + (-nRowTop) + (nRowNo + 2) * 2 ) ;
objRect.right = (int) (nColWidth + 22);
objRect.bottom = (int) (nRowHeight + objRect.top);
m_cCombo.ShowWindow(SW_SHOW);
m_cCombo.SetWindowPos(NULL, objRect.left, objRect.top, objRect.right, objRect.bottom, SWP_SHOWWINDOW);
m_cCombo.SetItemHeight(-1,(int)(nRowHeight - 1));
|
|
|
|
|
Hello!
I have a little problem: I want to access an acount on the web(using IE), from my Visual C++(6) application, knowing the url, user-name & password.
For example:
url: http://mail.yahoo.com
user: dorutzu
pass: the_password
All I want to happen is a new browser window to appear with my account opened in it.
Any ideea how this can be made possible(for any web-site)?
Thank you in advance...I'm waiting for your answers here or eventualy at dorutzu@yahoo.com
|
|
|
|
|
Search MSDN for IE Automation.
|
|
|
|
|
Unfortunately, that did'n help too much...if you could be a little more specific... 10x
|
|
|
|
|
|
void CHtmlView::Navigate2( LPCTSTR lpszURL, DWORD dwFlags = 0, LPCTSTR lpszTargetFrameName = NULL, LPCTSTR lpszHeaders = NULL, LPVOID lpvPostData = NULL, DWORD dwPostDataLen = 0 );
I assume that the login page uses a , so you need to construct the post data parameter block and pass it as the lpvPostData param. As for opening in new window, see the lpszTargetFrameName param.
|
|
|
|
|
hello friends,
i have to incorporate communication in my vc++ application, for this i have to execute SCP script through VC++ code.Pls give me idea how to do it.
thanks
|
|
|
|
|
Service Control Point?
If this is just a file, will ShellExecute() or CreateProcess() work for you?
|
|
|
|
|
i tried to use following code to execute a .scp file :-
#include <afxwin.h>
#include <iostream.h>
void main()
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory(&si,sizeof(si));
si.cb = sizeof(si);
ZeroMemory(&pi,sizeof(pi));
//TCHAR szCommandLine[] = TEXT("Notepad");
//start the child process
if(!CreateProcess(NULL,"c:\\WINNT\\system32c\\ras\\testscp.scp",
NULL,
NULL,
FALSE,
0,
NULL,
NULL,
&si,
&pi)
)
{
cout << "creating process failed\n";
return;
}
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
but it is not invoking the ,c:\\WINNT\\system32c\\ras\\testscp.scp ,file.Howere if i simply invoke "Notepad" or "windeff"instead of above file ,it worked.
Pls suggest me how to execute a .scp saved in a given folder.
regards
akshay
|
|
|
|
|
Can you run c:\WINNT\system32c\ras\testscp.scp from a command prompt or the Start/Run box? If not, you won't be able to run it from code either.
|
|
|
|
|
hi,
i am able to invoke c:\winnt\system32\ras\testscp.scp through start|run but it is not working in CreateProcess(NULL,"c:\\winnt\\system32\\ras\\testscp.scp",............)
|
|
|
|
|
Then you will also need to supply the name of the application that is associated with .SCP files. This can be done in either the first or second parameter.
|
|
|
|
|
|
hello
i use the class CWinApp and the run methode to start my apllication ,and i want to add a button for suspend and re-run the apllication.
how i can make that?
|
|
|
|
|
Hi!
Is there perhaps a header file that I could use that would allow me to use very long numbers in my calculations? Something that could take up to 20 digits would be nice, though more would be appreaciated.
Thanks,
Selevercin
If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.
|
|
|
|
|
|
There are some arbitrary precision numeric libraries on the net. Check for instance GMP[^].
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
You can use Decimal data type and Decimal arithmetic functions: VarDecAdd, VarDecMul etc. They are declared in oleauto.h. Decimal variables are stored as 12-byte signed integers and can store values from 0.0000000000000000000000000001 to 79,228,162,514,264,337,593,543,950,335
Alexander
|
|
|
|
|
for floating point, look up long double in the doc. Range is +/–1.2E4932 with at least 19 digits of precision.
|
|
|
|