|
hellogany wrote: HI i want to set a particular cell to RED color ??
Range range = sheet.GetRange(COleVariant("A1"), COleVariant("A1"));
Interior interior = range.GetInterior();
interior.SetColorIndex(COleVariant(3L)); hellogany wrote: and also while quittin the application, the excel file need to be saved....
So you might want to call Save() or SaveAs() .
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
thanks for the reply.
i have to find a value in the excel cell and should replace a new value in that cell
Can u help me on this issue?
gany
|
|
|
|
|
hellogany wrote: i have to find a value in the excel cell...
Look at the Range::Find() method.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
DavidCrow wrote: Range range = sheet.GetRange(COleVariant("A1"), COleVariant("A1"));Interior interior = range.GetInterior();interior.SetColorIndex(COleVariant(3L));
I've been looking all over for how to change the color - thanks to you it works - but just a simple question- Why is 3L = red? How does this color index thing work? Is there a way to use RGB with the 3 params to get any color?
Thank you again!
Mike
|
|
|
|
|
thready wrote: Why is 3L = red?
Because that's what the designer of that type library decided.
thready wrote: How does this color index thing work?
I'm not sure what you are asking here. Just use the OLE/COM Object Viewer to find out the other values.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
just make a dialog with mfc-wizard.
add message function like this
void CTest::OnLButtonDown(UINT nFlags, CPoint point)
{
PostMessage(WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM(point.x,point.y));
CDialog::OnLButtonDown(nFlags, point);
}
and exacute it.
1) click the client area of dialog with left mouse button.
2) move it toward screen top
3)when the some part of dialog is in off-screen, release mouse left button.
4)automatically the dialog is moved again to screen area. <= it is my problem.
normal window acts like this.
how can I disable 4) action?
I want to prevent the dialog from automatically moving back onto screen.
thank you in advance.
<hello world="">
|
|
|
|
|
david_joung wrote: automatically the dialog is moved again to screen area.
Use DM_REPOSITION message to move dialog back onto screen.
|
|
|
|
|
david_joung wrote: 4)automatically the dialog is moved again to screen area. <= it is my problem.
So what exactly are you wanting to happen?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I want to prevent the dialog from automatically moving back onto screen.
<hello world="">
|
|
|
|
|
david_joung wrote: I want to prevent the dialog from automatically moving back onto screen.
Are either of these plausible?
1) Don't process the WM_LBUTTONDOWN message, or 2) Don't post the WM_NCLBUTTONDOWN message
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
sir,
I am working on vc++ 7.0 project and it is based on MDI Compound document view architecture and I am trying to embed an active-x component into my project.
why it takes more time, when i try to create a component on the display document for the first time. The same component when i try to create subsequent time it takes less time. could you please throw some light on it.
Is there any efficient way to write code by which we reduce time while creation of Active-x component.
Below is the code which creates the component
CView* pActiveView = pInterfaceObject->GetActiveView();//getting the handle of active view
if (pActiveView)
{
COleServerDoc* pActiveDocument = (COleServerDoc*)pActiveView->GetDocument(); //assigning the handle to the COleServerDoc.
ASSERT_KINDOF(COleServerDoc, pActiveDocument);
m_pClientItem = new COleClientItem (pActiveDocument,this);//creating a container
}
m_pClientItem->CreateNewItem((REFCLSID)(clsid)); //creating the Active X control through known classid
ASSERT_VALID(m_pClientItem);
if(m_pClientItem)
{
IDualChart *pDualChart;
if (FAILED(m_pClientItem->m_lpObject->QueryInterface(__uuidof(pDualChart), (void**)&pDualChart)))
{
AfxMessageBox(_T("Query interace failed"));
return bStatus;
}
m_pChart.Attach(pDualChart);
Thanks & Regards,
Praveen A.
praveena@navayuga.co.in
pv_pravin@yahoo.co.in
|
|
|
|
|
I would like to know about how to desgin Architecture of Network security project.
Arvind kumar sharma
software Developer
|
|
|
|
|
Hi,
I have a character array and want that to be assigned to cstring object, how can i do that.
I have tried the assignment operator, but it is copying upto end line character, and leaving the other character.
Does any one know about that?
Warm Regards,
Mushq
|
|
|
|
|
Look at the constructor of the CString class,
CString( const unsigned char* psz );<br />
throw( CMemoryException );
Regards,
Paresh.
|
|
|
|
|
<br />
<br />
#include<string.h><br />
char str[30];<br />
std::string temp;<br />
CString val;<br />
<br />
strcpy(str,"Hello");<br />
temp=str;<br />
val.Empty();<br />
<br />
val=temp.c_str();<br />
<br />
Viral Joshi.
|
|
|
|
|
|
So you have a NULL inside your array. If it were possible what you want to do, CString wouldn't be a string class; A string should terminate with NULL symbol ('\0') to make itself be a string.
--
=====
Arman
|
|
|
|
|
Hi all,
I am now working on a directshow project. I am getting a mpeg2 TS (transport stream) from network. I need to put logo in the video. Anyone knows any solution , without decoding and encoding ??
i have done a prototype model using decode and encode the TS stream.
[Decoding and encoding take much time, if you know any soultion to reduce this time , please tell to me ]
Thanks in advance
kd
If u can Dream... U can do it
|
|
|
|
|
Wouldnt it be enough to put the Logo in the Output Window via BitBlt.
If you get the stream it isnt yours, so you cant do your Logo in it.
Greetings from Germany
|
|
|
|
|
Hi all,
i am playing a midi file using this code
sprintf(s8_Buf, "open \"%s\" type sequencer alias MidiDemo", neha);
mciSendString(s8_Buf, 0, 0, 0);
mciSendString("play MidiDemo", 0, 0, 0);
i have no problem in playing this file
but my problem is in stoping this file
i want that when i click on stop button sound should stop playing
what i have done for stopping this file is
mciSendString("stop MidiDemo", 0, 0, 0);
but this is not stopping the file
can anybosy help me in this
thanks in advance
|
|
|
|
|
I cannot help with those mci stuff but you could use simple wrappers over DirectMusic from here[^]
--
=====
Arman
|
|
|
|
|
How do I change the owner of a Popup window?
---
Hakuna-Matada
It means no worries for the rest of your days...
It's our problem free, Philosophy
"I think my response was 'What idiot dreamed this up?'" -- Mary Ann Davidson, Oracle's chief security officer, in typical blunt manner, remembering her reaction to the company's scheme to brand its databases as "unbreakable."
|
|
|
|
|
Have you tried SetOwner() or SetParent() ?
|
|
|
|
|
|
HakunaMatada wrote: Oh and SetParent() doesn't work.
Why not?
It's not a modal dialog popup window is it?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|