|
Is it possible to resize an image using something like GDI+ without using MFC or Win32. If so does anyone have any examples?
Thanks in advance
|
|
|
|
|
GeeBru wrote: Is it possible to resize an image using something like GDI+ without using MFC or Win32.
Well since GDI+ is part of Win32 then I think the answer is probably 'No!'. Maybe it would be better to try and explain what you are trying to achieve, and why.
|
|
|
|
|
Ah silly me then thanks for the quick reply.
What I need to do is shrink a JPG by calling a C function as I have a different application that calls C functions from within a DLL and I'm unsure how to go about creating the function. As the application cannot pass windows handles etc then I wondered if GDI+ could do it without needing that kind of thing.
Thanks.
|
|
|
|
|
I'm not sure I understand how the pieces fit together in your description here, perhaps you could elaborate?
However, GDI+ operates on DeviceContext s rather than Windows, so as long as you can instantiate a DC you can do all the GDI+ing necessary. Whether you do this in C, C++, C# or any other language is largely your own choice.
GeeBru wrote: As the application cannot pass windows handles
Any reason why not?
|
|
|
|
|
|
Hello,
I'm writing an MFC app that is in the style of MS outlook, with a CTreeView in the left hand pane, and a CFrameWnd, called CRightPaneFrame, that contains a view (which view varies, depending on which node on the CTreeView is selected) - a splitter application.
In the function that switches views, called by the CTreeView, the final thing we do is call RecalcLayout(), to have everything (re)drawn. This causes slight, although noticeable flicker in the left pane, as the Main frame of the application is (apparently) redrawn.
How can I prevent this flicker from occurring, by limiting redrawing to CRightPaneFrame and its current CView? According to MSDN, RecalcLayout is "Called by the framework when the standard control bars are toggled on or off or when the frame window is resized". This seems like overkill for this task (updating CRightPaneFrame/its underlying view). How all can I accomplish this task without redrawing my left pane?
Regards,
Sternocera
|
|
|
|
|
I think perhaps your naming gives it away - CRightPaneFrame! CFRameWnd (if memory serves) should be used for the Frame window which holds all the other child windows that your app needs to display. Have you tried deriving your right pain( ) from CView or similar?
|
|
|
|
|
CFrameWnds may display views, or other CFrameWnds. They are, as the name suggests, for framing things.
Regards,
Sternocera
|
|
|
|
|
Thanks, it's a while since I used MFC, but I always thought that CFrameWnd was the main window and comprised the actual frame, plus the menu etc, which would not work properly in a child window.
|
|
|
|
|
Hello,
Is there a way to get the certificate of a seucre web page that is
currently being displayed using CWebBrowser?
Thank You..
|
|
|
|
|
Hello
I have downloaded a dll driver for a TPM hardware(Trusted Platform Module) and need to have it's library;
How can I generate a static library file for this dll?
I don't have any header file for this dll!
I've uploaded this dll on a host that is here:
http://www.ziddu.com/download/6401151/TPMDrivers.rar.html
In which:
A folder named "Main DLL" contains the main driver;
A folder named "Other DLL" contains another TPM driver;
A folder named "TPM .sys file" contains a .sys driver for TPM;
Could you produce a lib file for each one?
Thanks in Advance.
|
|
|
|
|
|
I have created a login form for an already existing project which I was working on.I had to do this since it was told the login form is needed only now.
I have to use an MS-Access database for storing the login names and passwords and then I have to connect my login form to the that database in such a way,if I type the login and password details on editboxes ,if the details are existing in the database it must take to the other form when "Login" button is clicked else it must show a message saying "Its invalid".This project is a VC++ MFC Dialog based application. I have seen many articles which gives details about single-document or multi document view based application,which has database support.I know in Dialog based we cannot use database support when we start building the project.But now as my project is already built using dialog based application,how can I get the solution?
|
|
|
|
|
Use the CDatabase and CRecordset classes to access the DB.
|
|
|
|
|
Hii folks,
I am new to the world of programming and I started to learn C from some weeks and I refer from some text books and some websites but I can't understand that What is the difference between Parameter and argument?
modified on Monday, September 7, 2009 12:29 PM
|
|
|
|
|
Taken out of context, this could mean a lot of different things. I guess you are talking about function parameters and arguments ? If yes, then there's no difference. It's just two different names for the same thing.
|
|
|
|
|
nowrocktheworld wrote: What is the difference between Parameter and argument?
Most of us still have reasonable eyesight. There is no reason to emphasise your question in that manner. In fact, you're rather pissing people off by doing so.
|
|
|
|
|
|
nowrocktheworld wrote: thanx buddy
No problem dude! 
|
|
|
|
|
I can win an argument, but I never won a parameter !
This signature was proudly tested on animals.
|
|
|
|
|
Maximilien wrote: but I never won a parameter
You need a reference first.
|
|
|
|
|
At the very least, one has a P, the other doesn't.
Being totally pedantic, parameter is the declaration of what should be passed while argument is the value being passed. Many programmers will refer to parameters as arguments, but rarely the other way around. (It seems that this is more common among older developers.)
This is a pretty good discussion: http://en.wikipedia.org/wiki/Parameter_(computer_science)[^]
|
|
|
|
|
Yep, that's the right answer. The C89 standard, in fact, uses those terms that way. Arguments are what's passed in the call to a function; parameters are declared in the function signature and are how functions access the arguments. I try to make that distinction in my own writing and code comments. Dunno if subsequent C/C++ standards have carried on this distinction.
|
|
|
|
|
Where I can find those standards?
|
|
|
|
|
You can get C89 from ANSI for $379, The Annotated C Standard for $45.95 new, $0.63 used, or the (final?) draft for free. Look in Section 1.6 - DEFINITIONS OF TERMS.
|
|
|
|