|
Below is my code but note working same header footer is set to all page, please suggest best solution for this.
oWorkSheets2007 = oWorkBook2007.GetWorksheets();
oWorkSheet2007 = oWorkSheets2007.GetItem(COleVariant((short)sheetNum));
XLS2007::Window owindObj = oApp2007.GetActiveWindow();
XLS2007::Pages oPages = owindObj.GetPanes();
oPageSetup = oWorkSheet2007.GetPageSetup();
oPages = oPageSetup.GetPages();
long a = oPages.GetCount();
int l=0;
for( l=l+1;l<=a;l++)
{
oPage= oPages.GetItem(COleVariant((short)l));
oPageSetup = oWorkSheet2007.GetPageSetup();
oPageSetup.SetPrintErrors(1);
oPageSetup.SetAlignMarginsHeaderFooter(HFI.bAlignWithMargins);
oPageSetup.SetScaleWithDocHeaderFooter(HFI.bScaleWithDoc);
oPageSetup.SetCenterHeader(LPCTSTR(HFI.FirstCentreHeader));
oPageSetup.SetCenterFooter(LPCTSTR(HFI.FirstCentreFooter));
oPageSetup.SetLeftHeader(LPCTSTR(HFI.FirstLeftHeader));
oPageSetup.SetLeftFooter(LPCTSTR(HFI.FirstLeftFooter));
oPageSetup.SetRightHeader(LPCTSTR (HFI.FirstRightHeader));
oPageSetup.SetRightFooter(LPCTSTR(HFI.FirstRightFooter));
oPageSetup.SetCenterHeader(LPCTSTR(HFI.OddCentreHeader));
oPageSetup.SetCenterFooter(LPCTSTR(HFI.OddCentreFooter));
oPageSetup.SetLeftHeader(LPCTSTR(HFI.OddLeftHeader));
oPageSetup.SetLeftFooter(LPCTSTR(HFI.OddLeftFooter));
oPageSetup.SetRightHeader(LPCTSTR(HFI.OddRightHeader));
oPageSetup.SetRightFooter(LPCTSTR(HFI.OddRightFooter));
|
|
|
|
|
The (incomplete) for() loop looks a bit odd in that it is using the same values for the header and footer and the set methods are called twice. If you are wanting the header/footer on the even pages to be different than the header/footer on the odd pages then you are going to have to check whether l is odd or even and use a different value accordingly.
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Message Closed
modified 18-May-23 10:18am.
|
|
|
|
|
|
Googling suggests that is a standard problem with answers provided.
|
|
|
|
|
Message Closed
modified 19-May-23 21:11pm.
|
|
|
|
|
It doesn't matter. There is no consequential difference here between simulating the code in an emulator or running it directly, except perhaps by making it less obvious what's going to happen so you can fool yourself for longer.
|
|
|
|
|
Message Closed
modified 19-May-23 21:09pm.
|
|
|
|
|
Are you trying to trick me into doing your homework?
E: oh I see now, it's worse than that. You already wrote papers about this.. Apparently you're some sort of crank scientist then. You cannot disprove the undecidability of the halting problem, especially not with simple things like "just emulate the code LMAO". The interesting part about the famous undecidability proof is that it doesn't matter how H works, if you take that away you just get something that doesn't work for mundane reasons.
modified 15-May-23 16:12pm.
|
|
|
|
|
Message Closed
modified 19-May-23 21:18pm.
|
|
|
|
|
polcott wrote: Any competent software engineer...
Any competent civil engineer can design a bridge that doesn't fall down. Yet they do.
You said in the OP
"Will D ever reach its own.."
Ever means just that. In no situation in no time period.
Any competent engineer (of any discipline) understands that there is a big difference between one single case and all cases for all time.
The problem that you are looking at has been proven to be impossible.
Any compentent engineer then understands that they must then do the following to achieve what you want.
1. Invalidate the original proof
2. Provide a new proof that it can fail. This by itself might provide the first.
That is mathematics and not software.
|
|
|
|
|
Message Closed
modified 19-May-23 21:21pm.
|
|
|
|
|
Try submitting it here for more peer review.
Frontiers | Publisher of peer-reviewed articles in open access journals[^]
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Message Closed
modified 19-May-23 21:23pm.
|
|
|
|
|
OK, then how about starting here.
Author Guidelines | Communications of the ACM[^]
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Message Closed
modified 19-May-23 21:26pm.
|
|
|
|
|
Quote: Moshe Y. Vardi the former editor in chief of the CACM How about now, armed with your quote?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Message Closed
modified 19-May-23 21:20pm.
|
|
|
|
|
polcott wrote: He has already made up his mind
Who's 'he', the current editor? Look, if your stated aim to publish there (CAMC), then concentrate your efforts there. It doesn't seem as though 'here' is getting you anywhere.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Message Closed
modified 19-May-23 21:24pm.
|
|
|
|
|
polcott wrote: Because my writing style is not even close the the writing style of a published PhD researcher what I say is almost always rejected out-of-hand without review of the substance of what I have said. For some reason I doubt that.
What would happen if everyone here agreed with your conclusion?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Message Closed
modified 19-May-23 21:20pm.
|
|
|
|
|
polcott wrote: If everyone here agreed that page three of this paper is correct Probably not going to happen here, so just cut to the chase. Change the title and submit, possibly adding that professors name somehow in the title.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Message Closed
modified 19-May-23 21:24pm.
|
|
|
|
|
You are correct.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|