|
When i run the code,it gives me an option of "Open".So while opening the image,i can only open 1 image in a single window and i want that if it would be possible to open more than one image in a single window & not superimposing on previous one at the same time.
|
|
|
|
|
Are you using MFC? If so, what class is the window?
At some point you'll need to implement functionality to load more images and render them.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
yeah i m using MFC and openCV in my code.I m not getting the proper code to get my work done.
|
|
|
|
|
openCV is providing the image rendering? If so, then that would be a good place to look
for a solution. In plain MFC there's a variety of solutions - GDI+ being the simplest IMO.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Do you want to show some images near together?
|
|
|
|
|
yeah u can say.I want to display 2 or 3 images side by side in a single child window.
|
|
|
|
|
This is very simple to do (at least there's help with Windows GDI/GDI+) except you are using
OpenCV. Unless you are willing to write your own code instead of using a third party library, you
may not get much info here. Maybe someone will respond that's familiar with OpenCV but it
still seems to me an OpenCV site would have more answers.
The basic steps are:
Load the images
Draw the images whenever necessary
Dispose of the images when the window is closed.
Which part is giving you trouble? Do you have some code that's not working so we can help you
with it?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Now i have lots of text files in a folder,i want to combine them into one large file,but the problem is that it is must be order the formation rule.
for instance:(the txt file order)
the first text file list item"1c.txt,2c.txt,.........
the second text file list item"1e.txt,2e.txt,........
now the combine file order must be "1c.txt,1e.txt,2c.txt,2e.txt........."
and so on!
Waiting for ur help!
Thx advance!;P
Don't try it, just do it!
*Archibald*rever dragon!
|
|
|
|
|
algo :
- find all file names to be combined
- add each name to a vector of strings (with the strings being the file names)
- write your functor to be used to sort the files list the way you like
- use std::sort with your functor
- create a new empty file
- read each file in the order of the sorted vector and add its content at the end of the new file just created at the previous step
- dont forget to close all remaining opened files.
you got it
|
|
|
|
|
thank u very much!
i know how to do it!
初学者!Don't try it, just do it!
*Archibald*rever dragon!
|
|
|
|
|
hi,
how could we create a header file from a DLL to use functions in that DLL ?
I have only the DLL file in hand. From this DLL, using some tools (e.g DLL explorer) I can view the list of functions in that DLL. To load this DLL and use it, I use function LoadLibrary() and then GetProcAddress(). But to use GetProcAddress(), I need to know the function prototype (that means parameters & return type of that function). Fortunately, I have the development documents of this DLL which explain reference to all functions & data structures. Eventually, I ended up in manually writting a header file for that DLL from scratch based on the development documents. This is tedious job because I have to rewrite all definitions, constants, declare all functions, ...
I wonder if it is possible to generate header file from DLL file ?
|
|
|
|
|
As far as I know, there is no way to do that. But that's strange that the supplier of the DLL didn't provide a header file with it.
|
|
|
|
|
there's none, as Cedric stated.
however, you can use Dependency Walker[^] to figure out the functions exported by the Library...
|
|
|
|
|
Amidst of development of toolbar, a requirment came to colour toolbar.
As we can colour explorerbar easily with OnPaint, we can colour the
toolbar also,but after colouring the Toolbar buttons Vanish. Code is totally
based on ATL\ COM and not MFC.
The reason I found is NM_CUSTOMDRAW not getting called . Even if I
post the message WM_ERASEBKGND.
Can anyone tell how to overcome this problem. Even if we call
TB_INSERTBUTTON at end of OnPaint it does not prove fruitful.
-- modified at 8:36 Monday 16th April, 2007
|| ART OF LIVING ||
|
|
|
|
|
shivditya wrote: Code is totally
based on ATL\ COM and not MFC.
Then why have you posted this question in this forum?
|
|
|
|
|
shivditya wrote: The reason I found is NM_CUSTOMDRAW not getting called . Even if I
post the message WM_ERASEBKGND.
Can anyone tell how to overcome this problem. Even if we call
TB_INSERTBUTTON at end of OnPaint it does not prove fruitful.
??? There seems to be lots of problems.
1) NM_CUSTOMDRAW isn't a "call" - it's a notification message sent in the form of a WM_NOTIFY.
It's also only available with certain common controls.
2) You really shouldn't be posting WM_ERASEBKGND messages - they are posted when necessary by the
system. Use Invalidate APIs to force this to occur.
3) Inserting buttons in OnPaint??? No no no no no
Whatcha tryin to do?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Will you please explain little more. Current problem is toolbar is getting painted but its buttons are not getting visible when it gets repaited.
Actually I tried invalidating rect but it seems useless as OnPaint is already getting called. Problem is I am not able to change toolbar colour or customise it.
|| ART OF LIVING ||
|
|
|
|
|
What does the window proc look like? It sounds like window messages aren't being processed
correctly.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi,
I have a CString variable. I need to convert it to WChar of size 100.
How to do?? Any Suggestions would be helpful.
Thanks
Today is a gift, that's why it is called the present.
|
|
|
|
|
CString str("my text");
BSTR bstr = str.AllocSysString();
WCHAR w[100];
wcscpy(w, bstr);
// further you will need to do SysFreeString(bstr)
--
======
Arman
|
|
|
|
|
if _UNICODE is defined then you can just copy CString content. On the other hand, if _UNICODE is not defined, then you have to use MultiByteToWideChar [^] to get wide chars (see also the example [^]).
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.
|
|
|
|
|
here is an easy way to do
This is the published microsoft example:
CString theString( "This is a test" );
LPTSTR lpsz = new TCHAR[theString.GetLength()+1];
_tcscpy(lpsz, theString);
//... modify lpsz as much as you want
|
|
|
|
|
This works (for the OP) only if _UNICODE is defined, otherwise, LPTSTR translates to CHAR * , instead of WCHAR * . BTW, the Arman Z. Sahakyan solution will work fine in both cases.
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.
|
|
|
|
|
just a question. why a WCHAR[100] ?
anyway, are you aware of the CT2W() macro, that converts a TCHAR[] into a WCHAR[] ?
|
|
|
|
|
Hello All,
I have included the directory containing ws2_32.lib to the project in the Library files' directory. Now I am getting LNK2019 error which says that the function I am using from winsock2.h are unresolved externals. So I want to check whether my project is having the ws2_32.lib file available or not ? How can I check ? If someone knows please help me.
Thanks for the prompt reply.
Nikhs
Nikhil Trivedi
|
|
|
|