|
Its a such a nice code its working fine.
but on some machine its not working fine.
its generate execption on this line
Excel::RangePtr pRange = pSheet->Cells;
please help me how can i solve its.
thanks in advance.
|
|
|
|
|
I would like to change the ARROW pointer to HAND (or CROSS) pointer in runtime without any physical event (no Button, Menu ...) triggered. I use this function to invoke new pointer type but it doesn't work:
void ChangePointerType(int type)
{
if(type == 0)
{
HCURSOR hCursor = LoadCursor(NULL, IDC_ARROW);
SetCursor(hCursor);
}
else if(type == 1)
{
HCURSOR hCursor = LoadCursor(NULL, IDC_CROSS);
SetCursor(hCursor);
}
else if(type == 2)
{
HCURSOR hCursor = LoadCursor(NULL, IDC_HAND);
SetCursor(hCursor);
}
ShowCursor(true);
}
Thank to any help?
|
|
|
|
|
Not exactly sure what you want to achieve but look at WM_SETCURSOR[^].
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
I did try as you suggested & it works! However, I forgot to mention that I would like to change the Pointer shape entirely ... with this method, I only can change the Pointer when my Pointer move across my GUI! If it moves out of the GUI, it returns to the default shape!
By any chance, MFC (VC++) can do the above just mentioned?
Thanks for help
|
|
|
|
|
I'm not sure if that is possible or not...why do you want to change the mouse pointer for the whole system? Other applications might want the mouse pointer to have a different shape when it is over them...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
You may want to consider the following from
http://winapi.freetechsecrets.com/win32/WIN32SetCursor.htm[^]
"If your application must set the cursor while it is in a window, make sure the class cursor for the specified window's class is set to NULL. If the class cursor is not NULL, the system restores the class cursor each time the mouse is moved."
I've had this problem in the past. I was changing the cursor when I pressed the left mouse button. When processing the WM_LBUTTONDOWN message, I would use the SetCursor() function. But as soon as I released the mouse button, the cursor would be restored. The problem was that I had a default cursor assigned, and my cursor was reverting to this default as soon as processing for that message was completed. I could 'keep' the new cursor only by continually sending WM_LBUTTONDOWN messages.
You might check your class definition to see if you have a default cursor set.
|
|
|
|
|
Thank for the reminder & the helpfull link, it really help a lot!
|
|
|
|
|
Hi,
I have an SDI application and in view class, I call a dialog by using dlg.DoModal(); There is an EditBox in the dialog and I want to use the entered value in the view class.
Now one way is that I declar a global variable and store the value in it. or declare a varibale in App class and use that variable.
Is any other fine way to do the stuff and I may avoid variable at application level/global?
THANKS
|
|
|
|
|
something like this ?
void CMyView::SomeFunc()
{
CMyDialog dlg;
if (dlg.DoModal() == IDOK)
{
m_myVar = dlg.m_editVar;
}
}
|
|
|
|
|
You can also pass the old value to its constructor as the initial value and make a "Get" method in the dialog class to return the new value.
|
|
|
|
|
|
void CMyView::SomeFunc()
{
CMyDialog dlg;
if (dlg.DoModal() == IDOK)
{
m_myVar = dlg.m_editVar;
}
}
This works fine for OK button but does not work for other buttons such as Connect having id IDCONNECT... any idea why?
if (dlg.DoModal()==IDCONNECT)
{// does not work
}
|
|
|
|
|
Hi all,
I am making my application unicode supporting one. i am using visual studio 2008.
when i try to write texts available as columns in my application in to a file using fwrite function, i am getting values like this..
239††††††††먠몭몭몭몭 test†††††††††††††††††††먠몭몭몭몭몭몭몭몭몭".. actually my column values are "239 test".
Can anyone help me why this is coming and how to get rid of this?
Code Snippet:
fwrite(Currentrow, Currentrow.GetLength()1, f) where Currentrow is CString...
Please let me know if am unclear...
Thanks,
Rakesh.
|
|
|
|
|
First thing is: If you're using MFC, why not use the CFile class instead?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi,
Is there a way to programmatically change the column width of CMFCPropertyGridCtrl?
|
|
|
|
|
Hi all,
I want to Read and Write to Microsoft Excel with xls and xlsx format.
i have read an article which works fine but its not support XLSX files.
BasicExcel - A Class to Read and Write to Microsoft Excel[^]
i want to read and write xlsx type files also.
please help me for this.
provide me any guidance and any example for xlsx files.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
|
I dont want to use any database or ODBC,please suggest me any other option for this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
|
"_$h@nky_" wrote: i have read an article which works fine but its not support XLSX files.
XLSX follows an entirely different format[^]. So, you shouldn't expect BasicExcel to work with Excel 2007.
"_$h@nky_" wrote: provide me any guidance and any example for xlsx files.
See if How to automate Excel from C++ without using MFC or #import[^] helps you.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
This library http://www.libxl.com can read and write xls and xlsx formats directly. Perhaps it will be solution for you.
|
|
|
|
|
Hello,
I'm new in OpenGl Library.I'm trying to learn Opengl to use it in Visual C++ Windows Form Application .
I can't work application in here:Creating an OpenGL view on a Windows Form[^]I can build it.But never debugging in Visual Stduio 2008.Where can I change in this code?
Another problem of mine.How can I use Opengl in PictureBox toolbox in Visual Studio 2008.I didn't come across any document on internet.Do you know any document,tutorial,code example etc. about this topic?
Could you help me please?
|
|
|
|
|
hiiiiiiiiiiiiiiii i want to read & display bitmap image using c.plz help me uptilnow i open the image ,read it ,mesure its width , hight, type etc but I cant put it in the form of array iwant to display array o image as well as i/p image also so plz help me.
|
|
|
|
|
See, for instance [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi ,
I am working on Access data base using MFC DAO classes.
Can I set/change the password of the data base programmatically.?
If yes please give me an idea.
Regards,
Sunil Kumar
|
|
|
|