|
First of all, I am very sorry that my poor English.
I have some question, how make excel automation with MFC (VC6.0, Excel 2000)
I want to input APP data to Excel program Of course, Excel program is running
Range range;
Borders borders;
range = sheet.GetRange(COleVariant("A1"), COleVariant("L6"));
borders = range.GetBorders();
borders.SetLineStyle(COleVariant((short)1));
This sample is applied to all cell ..
but I want only bold outline
plese help me....
reply to: lgs99@dreamwiz.com
thank you very much..
|
|
|
|
|
Just a suggestion: Start the macro recorder in Excel, then do what you want to do and look at the code the macro recorder has recorded.
MS
|
|
|
|
|
thanks..
but I want to just excel automation..
please example sourec...
|
|
|
|
|
Hi,
Can you please let me know how to use this for the given char array.
char recode[][5]={"bare","barn","bard","Dame","born","dare","BARN","barn","dame","bORn"};
I am trying doing this however it is giving exception in execution
qsort( (char *)recode, sizeof(recode), (strlen(recode[1])+1), (int (*)(const void*, const void*))compare );
and
(char **)bsearch( (char *) &key, (char *)recode, sizeof(recode),
(strlen(recode[1])+1), (int (*)(const void*, const void*))compare )
Thank
|
|
|
|
|
sizeof(recode) should be, sizeof(recode)/5
Another way would be:
int c( const void *e1, const void *e2 )
{
return( strcmp((const char*)e1, (const char*)e2) );
}
char* a[] = {"bare","barn","bard","Dame","born","dare","BARN","barn","dame","bORn"};
long i = -1,
l = sizeof(a[0]),
n = sizeof(a)/l;
qsort(a, n, l, c);
char *k = "bard",
**p = (char**)bsearch(&k, a, n, l, c);
if( p ) {
i = ((char*)p - (char*)a) / l;
i = p - a;
}
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Thank for your input however following link error observed
error LNK2001: unresolved external symbol "int __cdecl compare(char * *,char * *)" (?compare@@YAHPAPAD0@Z)
|
|
|
|
|
You have to write a compare function for bsearch and qsort.
In my example this is int c( const void *e1, const void *e2 ) ...
...cmk
Save the whales - collect the whole set
|
|
|
|
|
yeah you are right but already did that
|
|
|
|
|
Thank's lot done forget to change earlier declaration
|
|
|
|
|
We work previously with Visual C++ 6.0 and the Add Member Variable Wizard to create basic control works fine. We bought Visual C++ .net Standard and now it does not work.
When I right click on a dialog ressource (edit control for example) I have a menu to "add a variable". This menu opens a wizard to generate codes for this control ("Welcome to the Add Member Variable Wizard ") that adds only the declaration of the variable but don't create the relation between the ressource and the variable.
DDX_Check(pDX, IDC_TRACE_FILTER1, m_filter1);
Is there a limitation between the standard and the professional version or is there an update to fix that?
Benoit
|
|
|
|
|
On the right side of the Wizard, there should be a Category combo box. Change it to Value.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
My problem is that the check box Control variable is not accesible.
Thanks
|
|
|
|
|
I have seen that member variable wizard is not available in MFC extension DLL but it is working in an application (.exe).
Is there a workaround?
Thanks
|
|
|
|
|
The error is:
"Run-Time Check Failure #2 - Stack around the variable 'dlg' was corrupted."
COurProgramDlg dlg;<br />
m_pMainWnd = &dlg;<br />
INT_PTR nResponse = dlg.DoModal();
|
|
|
|
|
yeetins wrote:
INT_PTR nResponse = dlg.DoModal();
dlg.DoModal() willnot allocate any memory to nResponse!,that may be causing the problem
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
It occurs after I have these codes in my program.
m_pSocket = new CListenSocket();<br />
<br />
if (m_pSocket->Create(PORT, SOCK_STREAM) == FALSE)<br />
{<br />
AfxMessageBox("failure!");<br />
m_pSocket->Close();<br />
<br />
}<br />
<br />
if (m_pSocket->Listen(1) == FALSE)<br />
{<br />
if (m_pSocket->GetLastError() == WSAEWOULDBLOCK)<br />
{<br />
AfxMessageBox("failure!");<br />
m_pSocket->Close();<br />
}<br />
}
|
|
|
|
|
Is above code are successful during execution!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Do you handle any user defined messages in COurProgramDlg or any other class related with it, then check their signature is correct. Or are you calling any function with a different calling conventions ?
suhredayan There is no spoon.
|
|
|
|
|
Thank you very much!
I'v manage it.
|
|
|
|
|
yeetins wrote:
I'v manage it.
Just curious. Wot was the problem, so that others are also helped from your experience.
suhredayan There is no spoon.
|
|
|
|
|
Hi
Is there a way to calculate the distance between 2 computers?
Suppose I have 5 computers located in diff. parts of the world. Now I want to send information from 1st computer (say computer A) to the farthest (say computer E). I can easily evaluate the shortest path between 2 computers if I know how to calculate the distance between 2 computers.
Now my question is ->>> Is there a way to calculate a distance between 2 computers?
Some idea, hint or code!
Please help.
Thanks
|
|
|
|
|
u could get each computer to ping each other computer and then report back, then u get "distances"
bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
1. What do you mean by 'distance' - physical (i.e. miles), or network (i.e. hops) ?
2. If you mean physical then your premise: 'I can easily evaluate the shortest path between 2 computers if I know how to calculate the distance between 2 computers' is incorrect.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Thanks for replay
I actually want to calculate the best path for sending information from one computer to another.
What I am trying is :
I am trying to build a network where several servers will be distributed to in a wide area. The purpose of these servers will be to deliver fax. I require calculating the best path for this purpose. Actually this is a final year project.
vikram
|
|
|
|
|
Then do a search for a network 'trace' implimentation.
e.g. Search on keywords: network trace route c++
...cmk
Save the whales - collect the whole set
|
|
|
|