|
|
how can i print every page with a special style when i print a multi-page
document.for example,when i print the first page ,i want in A4,while the
second in A3.
hhhero
|
|
|
|
|
You will have to print the pages one by one, each time changing the printer settings to whatever size you want to use.
|
|
|
|
|
thanks WaldeMort!!!
i got it!!!
just call ResetDC after change a DEVMOD struct,that's ok!!!
thanks!!!
|
|
|
|
|
A modeless dialog(popup property) been created by a main dialog makes itself Transparent like this:
<br />
SetWindowLong(m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);<br />
SetLayeredWindowAttributes(m_hWnd, 0, 85, LWA_ALPHA);<br />
The modeless dialog has some controls on it, for example buttons, lists etc.
some text will be added to the list sometimes, for example runing logs etc.
several hours later(screen protector has started, quit it), the modeless dialog remain a blank dialog, that is, all controls disappeared!
move the mouse on the buttons, and the buttons display.
left click the list, the row which is selected displays, others remain disappeared!
minimize the main dialog the restore it, all controls on the modeless dialog display.
The problem only occurs on Win2003 server.
The problem need a long time to occur!
someone please give some suggestion!
best regards!
|
|
|
|
|
|
int livesPos[] = {30, 15};
the '{' can only be used for variable instantiation and not later.
|
|
|
|
|
|
one good way would be to not have globals. Another would be to use a vector. A third would be
livesPos = new int[2];
livesPos[0] = 5;
livesPos[1] = 666;
or whatever.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
The problem with a global is that you can't debug it, or control it. At a minimum, create a class that has public static methods to get and set variables which are private. That way, you can set breakpoints if you need to debug access to the values. Even better, create a class with protected members, and make the classes you want to grant access, friends of that class.
Lord Kixdemp wrote: you do live here, don't you?
*grin* 14+ hours a day, yeah.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
That is all very nice and true only one problem: this guy said he used C and not C++..
I guess u could some OO implementation in C (header represents a class and each function takes a pointer to structure that represents 'this'), still u don't have encapsulation...
|
|
|
|
|
Oh, I missed that. Then, there's no way around it. C kind of sucks that way.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
What would you do without global variables?
|
|
|
|
|
|
Write maintainable code ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Maintainable code? What do you mean?
Windows Calculator told me I will die at 28.
|
|
|
|
|
It means, code that is easy to work on if you have to come back to it later.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Suppose I have the following function which is executed many times in a program. Is a separate CString textSub instance created each time the function executes? Do I need to destroy the CString textSub at the end of the function? Or suppose it wasn't CString, but some other class? Thanks.
void CNew1Dlg::OnBUTTONPick() <br />
{<br />
CString textSub;<br />
textSub.Format("%d %s", someNumber, someString);<br />
GetDlgItem(someEditBox)->SetWindowText(textSub); <br />
}
|
|
|
|
|
Oliver123 wrote: Is a separate CString textSub instance created each time the function executes?
Of course. You don't need to clean it up, it's not a pointer, it will clean itself up ( calling it's own destructor )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Unless you use a "new " operator explicitly,it gets cleaned up automatically once it looses it's scope (Once it returns back to the caller). If you had used "new " to instantiate the object,then you need to "delete " it mannualy.
Dario: How is "directory" in French? (I mean a file system directory).
John Simmons: "zee file holdaire thingie"
|
|
|
|
|
Another important thing is: sometimes you'll need to call GetBuffer() or another function of that kind, if you do that, you must remember to call also ReleaseBuffer() just before exiting the scope of the CString variable.
Hope this helps
|
|
|
|
|
Hi,
I've got implemented Windows Error Reporting for XP(faultrep.dll, ReportFault, SetUnhandledExceptionFilter), but it's not working for Vista.
Vista has a new DLL(wer.dll) and new API for that(WerReportCreate, WerReportSubmit, WerReportCloseHandle). I've tried search web for some code example, but unsuccesefully.
Is anybody can explain the proper way to implement it with new API or send some code examle.
I'll appreciate any info/code.
Thanks.
|
|
|
|
|
oleg63 wrote: I've tried search web for some code example, but unsuccesefully.
They hide that information in the documentation[^]
led mike
|
|
|
|
|
Thanks Mike for the prompt answer,
I've red that documentation but it's just API description without a real example.
Sometimes you need not just API but the way how to employ it in your application.
|
|
|
|