|
try to find find number of rows in used.Then start write into file.
It may be help you
long row;
VARIANT varc=pRange->GetValue();
if(varc.vt==VT_EMPTY)
{
}
else
{
COleSafeArray sarect(pRange->GetValue());
sarect.GetUBound(1,&row);
}
|
|
|
|
|
Chandru080 wrote: i have already written in the first 2 columns....Later i want to write into the third column...give me some leads.
How are you writing to the first 2 columns?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I am using Excel Automation for that.. but i am trying to close the excel file and then open it again in a different function and then i am trying to append it again. that is not happening. I am using PutElement function to write the values into the excel file. but i am getting an exception there.
|
|
|
|
|
Hi,
I am developing a application in pure win32. I want to set font for Static control. How can I do this?
|
|
|
|
|
I think you can use SetFont() function in MFC and use WM_SETFONT message for pure Win32.
|
|
|
|
|
Just to expand on Rajeesh's answer, read up on CreateFont , CreateFontIndirect , as well as WM_SETFONT .
Don't forget to keep the HFONT somewhere to tidy up after the static control is gone.
To get the font, I'd recommend SystemParametersInfo[^], as that filld in a structure with various fonts the system uses. That way you can keep the look and feel consistent.
Iain.
I have now moved to Sweden for love (awwww).
|
|
|
|
|
Iain Clarke, Warrior Programmer wrote: Don't forget to keep the HFONT somewhere to tidy up after the static control is gone.
I guess he may use the WM_GETFONT message for the purpose...
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]
|
|
|
|
|
CPallini wrote: I guess he may use the WM_GETFONT message for the purpose...
Not if the static window has gone *poof* he can't...
I'm always happy for people to ignore my advice though - as long as they've thought about it before rejecting it. After all, it does not always apply! (see your sig for more details)
Iain.
I have now moved to Sweden for love (awwww).
|
|
|
|
|
Send the WM_SETFONT [^] message.
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 All,
I have created a Splitter Window in which the Right view of the splitter is further split into two parts.How to resize the views during run time i.e. I want to double the size of top view at run time and hide the bottom one.Can anybody please help me out.
Thanks.
|
|
|
|
|
hi all, how do i add or modify the jpg image's exif info ? Is there some class for modify ? thx!
|
|
|
|
|
try GDI+ Bitmap class
Bitmap::SetPropertyItem()
|
|
|
|
|
Issue is resolved!!
Thank you very much!!!
|
|
|
|
|
Hi all
I have a program written in VC6 (running on XP) that I want to stop from having multiple copies open. I want it to check whether there is another instance of itself running on start up and close if there is. Using FindWindow() doesnt work as it finds itself!
Thanks for any help
Mike
|
|
|
|
|
Consider creating a global named mutex.
Each app does this:
1) Create mutex -- give it a unique name, possibly including a GUID
2) WaitForSingleObject -- to capture the mutex. If this fails, then there's someone else holding it.
On exit, ReleaseMutex() to give it up -- and make it available again.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
You can try creating a named mutex with CreateMutex() API and checking the result with GetLastError(). When the second instance of the app tries to create it, GetLastError() will return ERROR_ALREADY_EXISTS as the mutex is already created by the first instance.
http://vcfaq.mvps.org/mfc/2.htm
|
|
|
|
|
See here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Use this code..
if(NULL!=:CreateMutex(NULL,TRUE,_T("SingleInstanceApp")))
{
long DwError = ::GetLastError();
if(dwError == ERROR_ALREDY_EXISTS)
EndDialog(IDOK)
}
Hope it helps
|
|
|
|
|
|
Hi all,
I am making an application comprising both C/C++ and .Net environments (for different modules). Both C++ and .Net modules create logs in some XML files. But I am now facing many problems in maintaining all the log files (mostly because of their sizes).
I am planning to create my logs in some database. But I am not familiar with using any database with C++ or with .Net code. Here are my requirements:
1 The very first requirement is that database should be free to use.
2 database should be able to connect with both C++ module and .Net (C# module)
Can anybody suggest me any such database that can be used freely. Also help me in knowing some tutorial by which I can connect my application with that free database.
Thanks in Advance
Aseem
|
|
|
|
|
Microsoft SQL server 2008 express[^] is the obvious answer. It integrates well with all other Microsoft products and is free.
MVP 2010 - are they mad?
|
|
|
|
|
Instead of asking in different forums in Code Project you could have performed a google search...
|
|
|
|
|
Please don't tell me, tell the person who did it!
MVP 2010 - are they mad?
|
|
|
|
|
Instead of keep replying, please do perform that fu#?@n' Google search!
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]
|
|
|
|
|
Somebody didn't like your joke, so I upped it for you.
MVP 2010 - are they mad?
|
|
|
|