|
|
There is no vector in C !
Just arrays.
Advice read C documentation.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
hi all,
i draw a image when i preview it its display ok but when i print with multiple page.
on first page its drawimage correctly but after first page it return generic error.
i really dont understand what happen here.
i m using this to draw image.
Graphics graphics(pDC->GetSafeHdc());
Image myPNG(path);
if(myPNG.GetLastStatus()!=Ok)
{
return FALSE;
}
Gdiplus::Status stat;
stat = graphics.DrawImage(&myPNG, (INT)image_rect.left, (INT)image_rect.top, 300, 300);
return TRUE;
thanks in advance.
|
|
|
|
|
Where in your application is this code being called? Is it inside your OnDraw function, or somewhere else?
|
|
|
|
|
i m used it in
OnPrint(CDC* pDC, CPrintInfo* pInfo) function,
i really dont understand when i preview this image is visible
when i print these page ,on first page its print after first page return Generic Error on drawimage function.
|
|
|
|
|
The only thing you can do is to step through it in the debugger to try and isolate what is happening.
|
|
|
|
|
is there any role of PageUnit or PageScale,
i u using
graphics.SetPageUnit(UnitPixel);
coz when i debug i dint recongze the problem,
in preview the image is display and when i print the error comes.
function is same for both.
modified 26-Mar-16 2:53am.
|
|
|
|
|
Sorry, but as I said, the only way to track this sort of error is by using your debugger. There is nothing that anyone here can do to assist, as there is no useful information provided.
|
|
|
|
|
Sadly, that Generic Error is the ONLY error provided by GDI+, so debugging them can be a nightmare. Good luck.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Hi
I am waiting for a child process to complete initialization so that I can get its window
handle
After I do CreateProcess
I use the PROCESS_INFORMATION pi parameter of The CreateProcess to WaitForInputIdle(pi.hProcess,INFINITE);
The Child process goes about its business intitializing in InitInstance returns TRUE
It has a message map
After the return TRUE from InitInstance, the parent breaks from WaitForInputIdle with a
Access Exception
Thanks
|
|
|
|
|
What you have detailed is correct and the recommended way to do it
So you therefore have a coding error which can be
(i) The launched process does not have a graphical interface ... must not be a console app which has no queue
(ii) The createprocess startup structure is invalid
If the launched process is yours you can go around the whole problem by using an Interprocess communication method.
If the launched process isn't yours check your code with notepad or something simple which that technique works with.
In vino veritas
|
|
|
|
|
Thanks so much
I see all of the info of the startup structure can be ignored can I memset
The entire structure to NULLs
|
|
|
|
|
The .cb field is the only mandatory field which must be set to sizeof(STARTUPINFO);
You can memset it and then set the .cb field but it's just as easy to zero the variable creation
STARTUPINFO startupInfo = {0};
startupInfo.cb = sizeof(startupInfo);
your suggestion is fine as well
STARTUPINFO startupInfo;
memset(startupinfo, 0, sizeof(startupinfo));
startupInfo.cb = sizeof(startupInfo);
In vino veritas
|
|
|
|
|
Checking my code seems I have already done that
Thanks
|
|
|
|
|
|
Hi Everyone,
is it possible to embed WxWidgets Controls in a MFC based application?
In detail, is there a way to use wxWidget Controls inside a MFC Control? specially CView, CFormView or CDockablePane?
My problem:
I have a huge MFC appication with rich GUI features.
I need to extend this application with a feature, that user will be able to display application data by creating his own views.
I could start this task with an approach like this:
XUIFramework: A GUI Framework based on XML and MFC[^]
Actually it would work with some simple MFC controls, but there will be a lot of work to make it more functional.
So my basic idea is, to use wxWidgets because of its rich functionality. But I cannot rewrite the complete application to base it on wxWidgets instead of MFC.
An further advantage of wxWidget would be, that it should be very easy to create a runtime for other systems like linux to run the user's GUI!
I have found in internet a few comments about such an approach. some says, it could be possible. But I have not found anything concrete. If I would have a very basic sample, I could start such a project.
Any ideas?
|
|
|
|
|
xx
modified 28-Mar-16 19:50pm.
|
|
|
|
|
Sorry, I think you are in the wrong forum. These forums deal with programming issues, we are not fans of hacking.
|
|
|
|
|
Hello,
is it anyhow possible to mix or overlay MFC Controls in OpenGL controlled screen area?
My aim is as follows:
I have 3D animation (like industrial robot visualisation). Nearby 3D objects I want to display object related information (e.g. with a CListBox Control).
I have already a lot of Controls, based on MFC Controls with enhanced functionality. I want to reuse this at top of a 3D scene?
Any ideas, if it is possible or how I should start?
Many Thanks
Richard
|
|
|
|
|
Write a simple expression evaluator that takes a string like the following as input: 1+2*(3+4).
-Only integers need to be supported
-The following operators should be supported: +, -, *.
-Expressions within parenthesis should be evaluated first.
-Then the resulting expressions should be evaluated from left to right (no operator precedence)
-Example:
4+(4-(2*3)+1)+4 = 7
The code should be written in such a way to support additional operators.
Assume the existence of a function tokenise, which could take a string and return an array of strings, for instance
tokenise(‘1+(2*3)+4’) would return [‘1’,’+’,’(‘,’2’,’*’,’3’,’)’,’+’,’4’]
and the functions isNumber and asNumber which would return a Boolean and integer respectively on a single string input.
modified 17-Mar-16 14:44pm.
|
|
|
|
|
Okay, and?????
"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
|
|
|
|
|
Please don't post the same message in multiple forums.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
do i get your degree if i do your homework ?
|
|
|
|
|
Chris Losinger wrote: do i get your degree if i do your homework ? I fear he will keep the degree for himself, and even claim tour work is his.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
And you tried something or you just want us to do your HomeWork ?
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|