|
What version of Visual Studio?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Try this in your test app...
1) get rid of the other CListCtrl class you made
2) In project menu (or class view window, right-click the project) choose Add.../Class...
choose the mfc category....go through the wizard to create the CListCtrl-derived class.
Note this is NOT from the dialog editor!
3) You should now have an empty class derived from CListCtrl. In class view, find your
new class, right-click it, and choose properties.
4) In the properties window, click the messages button - scroll down to "=NM_RCLICK" and
add a reflected handler for it using the drop-down to the right of "=NM_RCLICK".
5) Back in the dialog class, make sure you use a control variable of your new class type.
Also make sure you have a DDX_Control() entry in the dialog's DoDataExchange override
so the control object properly attaches to/subclasses the control window.
Maybe you were missing step 5 above??
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
It worked just fine! =) Thank you so much. What was going wrong with my initial approach?
-- modified at 23:52 Sunday 21st October, 2007
|
|
|
|
|
Cool. Sorry it took so long to reply. The wind and fires here in
Southern California took out my power yesterday.
neil4781 wrote: What was going wrong with my initial approach?
I'm going to take a look at that - I'm not sure what happens when you create
a class from the dialog editor like that.
I'm testing the release candidate for VS 2008 right now so I want to take
a look at it and see if there's a bug to report to MS.
I'll let you know.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
No problem. Thank you so much for your help again to resolve this problem for me.
|
|
|
|
|
Hi all,
I need to convert tiff file to bmp file.
I found libtiff library.
Maybe anybody using this library?
If it possable, give me some ideas how to do that?
(TIFF encoded to CMYK)
|
|
|
|
|
the easiest way to use LibTiff is with its RGBA interface:
it goes something like this:
TIFF *tif = TIFFOpen(...)
UINT32 width, height;
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &width);
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &height);
if (TIFFRGBAImageOK(tif, msg)==0)
{
BYTE * pBuffer = new BYTE[w * h * 4];
TIFFReadRGBAImage(tif, width, height, pBuffer, 1);
... etc
}
TIFFClose(tif)
and then you will have an RGBA image from your TIFF file...
but, there are plenty of libraries out there that can do all of for you.
|
|
|
|
|
Many thanks , I'll try it.
but, there are plenty of libraries out there that can do all of for you.
I need it for my cross-platform application, which uses wxWidgets library.
|
|
|
|
|
Now I need to show TIFF, but I have another problem with scalling the image.
Is it possable to scale the image by libtiff?
My TIFF is width:13700; height:9300.
|
|
|
|
|
Romiks wrote: I need it for my cross-platform application, which uses wxWidgets library
I haven't tried it, but could you use the wxImage class to open the TIFF file and then save it as a BMP file?
|
|
|
|
|
Doesn't GDI+ do this for you ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hey Friends
Any idea how the Context Menus in IE Works?
I noticed the given below key runs an exe
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\E&xport to Microsoft Excel
with above key's default value of
res://C:\PROGRA~1\MICROS~3\Office12\EXCEL.EXE/3000
now if i change it to c:\windows\notepad.exe
it does not works??????
I tried my application
no luck
Ideally I want to attach a COM Dll as is provided by Buttons for INternet Explorer
but the msdn documentation says that i can specify a script file only html/js
some java scripts work some does not
i have a script that does not work with above
but the navigate method accepts the script & works fine.
can i attach a com dll to the menu extension?
or run an exe ?
Regards
|
|
|
|
|
how do i read an input file that contains integer and , load the values in the files into my binary search tree in c++
ur help will b appreciated
|
|
|
|
|
shiroze wrote: how do i read an input file that contains integer and , load the values in the files into my binary search tree in c++
ur help will b appreciated
Are you using the standard C++ library? If so, look at this page for reading from a file[^].
It has an example of opening a file in binary mode and reading data from it, placing it into an array.
Once you have read all of the integers into an array, you can loop through the array inserting each integer into your binary tree.
|
|
|
|
|
If you want to read and write to a file you can use of CFile class.
|
|
|
|
|
in fact, use fstream is better than CFILE
|
|
|
|
|
can somebody help me with codes on how to create an empty binary search tree, read an input file that contains integer using an eof loop, load values in the files into my binary search tree in c++
|
|
|
|
|
|
Plenty of folks here will be more than glad to ASSIST you. Which part are you having trouble with (hint: "All of it" is not an acceptable response)?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hello ,everybody!
i like thiking! give some think with a software or web site.for example : you can tell me which sort with soft or web site! thanks!
|
|
|
|
|
Im sorry but I dont understand what you said?
|
|
|
|
|
i want to you tell me some idea about software. for example :which sort(idiographic function) about a soft !
because i want to developed the software . Have you any good idea?
|
|
|
|
|
A good choice for a first program is to write a calculator.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
lgbean wrote: ...i want to developed the software . Have you any good idea?
Yes. Start with a spell/grammar checker. You'll get instant gratification from it.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|