|
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.
|
|
|
|
|
long double is there for backward compatibility only - it's now the same as double (15 digits of precision).
Anna
Homepage | My life in tears
"Be yourself - not what others think you should be"
- Marcia Graesch
"Anna's just a sexy-looking lesbian tart"
- A friend, trying to wind me up. It didn't work.
Trouble with resource IDs? Try the Resource ID Organiser Visual C++ Add-In
|
|
|
|
|
Hi,
I faced really weird situation.
I wrote a code that opens some target file with Shellexecute() like following line.
ShellExecute(NULL, "open", szTargetName, NULL, NULL, SW_SHOWNORMAL);
This is written in independent cpp file which is included in some project.
I compiled it, and it was working in WIN 2K.
However, When I try to close MS WORD(***.doc) file which is opened by this project, windows freezes.
After long time, there was a pop up message that indicates "this process takes long time, do you want to continue?"
Everything is fine except MS WORD on WIN98.
I really wanna know what's going on and how to solve this problem.
PLEASE HELP ME.
Thanks in advance.
|
|
|
|
|
I've had this problem too - try putting in a wait for a few seconds after the open, and see what happens.
|
|
|
|
|
Hello.
I'm writing a forms processing app, using MFC, which reads form data
from an XML file. By form data I mean - what the form is supposed to look like, coordinates
of where each form element is located, type of form element (button, textfield, table, etc.)
So far I had no problems creating controls on a CDialog - I just used CreateWindow with preset classnames (COMBOBOX, EDIT, etc). However there are two elements I'm not quite sure how to display:
One is a Table, for which I thought I'd use MSFlexGrid and another - DataControl, for which I was going to use the Microsoft ADO Data Control.
The thing is I cannot find any docs on how to display those without making use of dialog templates.
Could anyone help me out?
Thank you.
Marat Garafutdinov.
|
|
|
|
|
MSHFlexGrid has a create function:
virtual BOOL Create(LPCTSTR lpszClassName,
LPCTSTR lpszWindowName, DWORD dwStyle,
const RECT& rect,
CWnd* pParentWnd, UINT nID,
CCreateContext* pContext = NULL)
Try using this function, and I think that the Class Name is not that important because I don't see it being used in the function's body.
// Afterall I realized that even my comment lines have bugs
|
|
|
|
|
I am having problem with accessing a particular location of bitmap.
what i want to do is store the x,y coordinates of black pixels on a perfectly white background. The error code is "GetPixel' : cannot convert parameter 1 from 'struct HDIB__ ** ' to 'struct HDC__ *'"
I tried GetPixel (x,y) but it doent work neither.
Does anyone know?Thanks!
POINT* p=new POINT[length];
POINT* p2=new POINT[length];
int w=cxDIB;//the width of the image
int h=cyDIB;//the height of the bitmap
i=0;
for(w=0;w<=cxDIB;w++)
{
for(h=0;h<=cyDIB;h++)
{
p[i].x=w;
p[i].y=h;
i++;
}}
i=0;
for(w=0;w<=cxDIB;w++)
{
for(h=0;h<=cyDIB;h++)
{
if(GetPixel(m_hDIB2,p->x,p->y)==RGB(0,0,0)) p2[i] =p[i];
i++;
}}
delete [] p;
delete [] buf;
|
|
|
|
|