|
kumar sanghvi wrote: but when the font is increased it"s not calculated properly..
Have you tried using CDC::GetTextExtent[^] to calculate the string width?
Best Wishes,
-David Delaune
|
|
|
|
|
Hi All
How can i copy excel sheet?I have a two excel file(ExcelSource.xls and ExcelDes.xls).ExcelDes.xls have allready two sheet(Sheet1 and Sheet2).Now i try to copy sheet1 from ExcelSource.xls to ExcelDes.xls in sheet3.
Plz give me tips.
Thanks in Advance.
|
|
|
|
|
You said it worked[^], right?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
yes it's working but when i write more than 50thousend rows in sheets(more than one sheet) then it's showing error.
Unhandled exception at 0x7c812a6b in Excel.exe: Microsoft C++ exception: CMemoryException at memory location 0x0237e2b4..
In dbgheap.c line pvBlk = _heap_alloc_dbg_impl(nSize, nBlockUse, szFileName, nLine, errno_tmp);
Can you give me tips for that?
|
|
|
|
|
I'm not sure how is it implemented (I think that it does not free the heap memory until the last bit is read into its buffer). You might want to take a look at the code and modify it to add some sort of paging mechanism.
Have you tried XLW? Is that not working as well?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Thanks for responce.
Have you tried XLW? Is that not working as well?
No i havn't tried.Can you tell me how can i use XLW.
|
|
|
|
|
i try it but i have got error.
error LNK2001: unresolved external symbol "private: static class xlw::XlfOperImpl * xlw::XlfOperImpl::instance_" (?instance_@XlfOperImpl@xlw@@0PAV12@A)
error LNK2001: unresolved external symbol "public: double __thiscall xlw::XlfOper::AsDouble(int *)const " (?AsDouble@XlfOper@xlw@@QBENPAH@Z)
error LNK2001: unresolved external symbol "private: int __thiscall xlw::XlfOper4::Allocate(void)" (?Allocate@XlfOper4@xlw@@AAEHXZ)
error LNK2001: unresolved external symbol "public: class xlw::XlfOper4 & __thiscall xlw::XlfOper4::Set(char const *)" (?Set@XlfOper4@xlw@@QAEAAV12@PBD@Z)
error LNK2001: unresolved external symbol "public: class xlw::XlfOper4 & __thiscall xlw::XlfOper4::Set(class xlw::CellMatrix const &)" (?Set@XlfOper4@xlw@@QAEAAV12@ABVCellMatrix@2@@Z)
error LNK2001: unresolved external symbol "public: __thiscall xlw::XlfOper4::~XlfOper4(void)" (??1XlfOper4@xlw@@QAE@XZ)
error LNK2001: unresolved external symbol "public: class xlw::XlfOper4 & __thiscall xlw::XlfOper4::SetError(unsigned short)" (?SetError@XlfOper4@xlw@@QAEAAV12@G@Z)
error LNK2001: unresolved external symbol "private: int __thiscall xlw::XlfOper12::Allocate(void)" (?Allocate@XlfOper12@xlw@@AAEHXZ)
error LNK2001: unresolved external symbol "public: class xlw::XlfOper12 & __thiscall xlw::XlfOper12::Set(char const *)" (?Set@XlfOper12@xlw@@QAEAAV12@PBD@Z)
error LNK2001: unresolved external symbol "public: class xlw::XlfOper12 & __thiscall xlw::XlfOper12::Set(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (?Set@XlfOper12@xlw@@QAEAAV12@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z)
error LNK2001: unresolved external symbol "public: class xlw::XlfOper12 & __thiscall xlw::XlfOper12::Set(class xlw::CellMatrix const &)" (?Set@XlfOper12@xlw@@QAEAAV12@ABVCellMatrix@2@@Z)
error LNK2001: unresolved external symbol "public: __thiscall xlw::XlfOper12::~XlfOper12(void)" (??1XlfOper12@xlw@@QAE@XZ)
error LNK2001: unresolved external symbol "public: class xlw::XlfOper12 & __thiscall xlw::XlfOper12::SetError(unsigned short)" (?SetError@XlfOper12@xlw@@QAEAAV12@G@Z)
error LNK2001: unresolved external symbol "public: static class xlw::XlfExcel & __cdecl xlw::XlfExcel::Instance(void)" (?Instance@XlfExcel@xlw@@SAAAV12@XZ)
error LNK2001: unresolved external symbol "public: class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > __thiscall xlw::XlfOper::AsWstring(int *)const " (?AsWstring@XlfOper@xlw@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@PAH@Z)
error LNK2001: unresolved external symbol "public: char * __thiscall xlw::XlfOper4::AsString(int *)const " (?AsString@XlfOper4@xlw@@QBEPADPAH@Z)
error LNK2001: unresolved external symbol "public: class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > __thiscall xlw::XlfOper12::AsWstring(int *)const " (?AsWstring@XlfOper12@xlw@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@PAH@Z)
error LNK2001: unresolved external symbol "public: class std::vector<double,class std::allocator<double> > __thiscall xlw::XlfOper::AsDoubleVector(enum xlw::XlfOperImpl::DoubleVectorConvPolicy,int *)const " (?AsDoubleVector@XlfOper@xlw@@QBE?AV?$vector@NV?$allocator@N@std@@@std@@W4DoubleVectorConvPolicy@XlfOperImpl@2@PAH@Z)
error LNK2001: unresolved external symbol "public: bool __thiscall xlw::XlfExcel::IsCalledByFuncWiz(void)const " (?IsCalledByFuncWiz@XlfExcel@xlw@@QBE_NXZ)
error LNK2001: unresolved external symbol "public: int __cdecl xlw::XlfExcel::Call(int,void *,int,...)const " (?Call@XlfExcel@xlw@@QBAHHPAXHZZ)
error LNK2001: unresolved external symbol "public: class xlw::XlfRef __thiscall xlw::XlfOper::AsRef(int *)const " (?AsRef@XlfOper@xlw@@QBE?AVXlfRef@2@PAH@Z)
error LNK2001: unresolved external symbol "public: __thiscall xlw::XLRegistration::XLFunctionRegistrationHelper::XLFunctionRegistrationHelper(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct xlw::XLRegistration::Arg const * const,int,bool,bool,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0XLFunctionRegistrationHelper@XLRegistration@xlw@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@000QBUArg@12@H_N20@Z)
error LNK2001: unresolved external symbol _xlAutoClose
error LNK2001: unresolved external symbol _xlAutoOpen
Simply i added xlwExample.cpp file and xlw folder.
|
|
|
|
|
Hi, in my Form1_Load thing, i'm trying to call a function with a while loop in it. When I run the program, it will just circulate through the loop over and over again, and the form won't load.
Here's the function I'm calling: (Yes I know it's an infinite loop)
<br />
void myFunction (void)<br />
{<br />
while (1)<br />
{<br />
MessageBox::Show("Example", "Title");<br />
}<br />
}<br />
<br />
and in Form_Load I just have<br />
<code><br />
myFunction();<br />
How do I do this so that the form loads first?? Thanks.
|
|
|
|
|
You may post an application defined message from within your 'Form1_Load thing'. BTW what on earth is 'Form1_Load thing '?
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]
|
|
|
|
|
tension666 wrote: Form1_Load thing
tension666 wrote: MessageBox::Show("Example", "Title");
I am smelling C# or Managed C++ not sure(May be that is why voted 1 .. This is C/C++/MFC forum.
Try posting it in appropriate forum for better answers.
Regards,
Sandip.
modified on Tuesday, July 28, 2009 3:54 AM
|
|
|
|
|
you call the message-box over and over again...
that is absolutly what you wrote: while (1)
comment the while out:
//while (1)
so you call the Box once
havent you step with the debugger trough your code.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
public bool bFirstTime;
void Form_Load()
{
bFirstTime = true;
myFunction();
}
void myFunction()
{
while (1)
{
if( bFirst )
{
MessageBox::Show("Example", "Title");
bFirstTime = false;
}
}
}
Now it will be called only once
Величие Бога не может быть недооценена.
|
|
|
|
|
Do you want to show a message box after the form loads?
If so use the Form_Shown event and don't use the while (1) loop.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Thank you very much last two post. And the first guy, I am using the vc++ ide, so i dont think it's c# 0.o
|
|
|
|
|
hi,
i want to make dialog based application (GUI) in vc++, to communicate to the multimeter through rs232 interface.
in which dialog, port configuration is there and read/write/close/open function is also there , i m new in the vc++.
so i want code for dialog based application.
|
|
|
|
|
|
Are you sure the best solution will be found posting and posting again your question int this forum?
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]
|
|
|
|
|
1. write "serial port" in the search box (at top of this page)
2. hit enter and look yourself
Please explain me why you havent DONE that?
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
KarstenK wrote: 1. write "serial port" in the search box (at top of this page)
2. hit enter and look yourself
Please explain me why you havent DONE that? OMG
Because I don't need it.
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]
|
|
|
|
|
the message was for the initial asker of this thread.
I am really very curios about this kind of questions. Why the hell they dont search for themselfes?
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
1. write "serial port" in the search box (at top of this page)
2. hit enter and look yourself
Please explain me why you havent DONE that? OMG
(Reposted)
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Dear Friends,
I have created a system tray icon. i am using Visual studio 6.0.
This icon is working for a alarm application. Now what i want to do is i should show a pop up message when it is a alarm time.
For example when Network connection goes down we get message as "LOCAL AREA DISCONNECTED " .. I want same thing.. Can anybody please help me out...
Thanks in advance
|
|
|
|
|
You can either dynamically create and destroy a new window or you can pre-create a window and keep it hidden to show when the time comes.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
any help on code. actually as an an alarm i m opening a web browser. but user wants pop up also so i dont want to use one more window concept
|
|
|
|
|
No, simply use native Shell popups apis
|
|
|
|