|
It's sort of the VB/COM/DISPATCH array type. If you're in MFC, COleSafeArray can be used to manage SAFEARRAYs more easily.
--
Ian Darling
|
|
|
|
|
Ian Darling wrote:
It's sort of the VB/COM/DISPATCH array type. If you're in MFC, COleSafeArray can be used to manage SAFEARRAYs more easily.
ah, perfect thanks, I'll start reading up on COleSafeArray.
Later, JoeSox www.humanaiproject.org
"The worst fad has been these stupid little robots,
Graduate students are wasting 3 years of their lives
soldering and repairing robots, instead of making them smart.
It's really shocking." -Marvin Minsky.
|
|
|
|
|
hello,
I have a big problem ... I have created a MFC app from wizard ... and added:
void CEditorView::OnInitialUpdate()
{
CScrollView::OnInitialUpdate();
CSize sizeTotal;
// TODO: calculate the total size of this view
sizeTotal.cx = widthMM;
sizeTotal.cy = heightMM;
SetScrollSizes(MM_LOMETRIC, sizeTotal);
}
so, my maping mode is MM_LOMETRIC ...
and in OnDraw ....
void CEditorView::OnDraw(CDC* pDC)
{
CEditorDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
CDC bdc;
bdc.CreateCompatibleDC(pDC);
CBitmap cb;
cb.CreateCompatibleBitmap(pDC, 1000,1000);
bdc.SelectObject(cb);
bdc.SelectStockObject(WHITE_BRUSH);
bdc.PatBlt(0,0,1000, 1000, PATCOPY);
bdc.SelectStockObject(BLACK_BRUSH);
bdc.Rectangle(CRect(0, 0, 500, -500));
pDC->StretchBlt(0, 0, 1000, 1000, &bdc, 0, 0, 1000, 1000, SRCCOPY);
}
and nothing happens .... why ?????
I tried to change the sign of the coordonate values and still nothing ...
How can I create a compatible DC with my DC and to paint in it ?????
please help !!!.... thanks ......
|
|
|
|
|
...but I not took real time to dig your code enough !
BTW, have a look at my own code (which work in every case), and find out how it works Tips, look in CSkinProgress::OnPaint() !
http://www.codeproject.com/miscctrl/CSkinProgress.asp
Kochise
PS : Use CSkinProgress::ConvBitmap(...) to convert your bitmap from another color map if for instance, you are trying to display a 24 bits/pixel picture on a 16 or 32 bits/pixel screen ! Otherwise you'll get a black/blank screen instead !
In Cod we trust !
|
|
|
|
|
bdc.SelectObject(cb);
try
bdc.SelectObject(&cb);
-c
CheeseWeasle
|
|
|
|
|
Hello everyone.
i'm i got a program that uses the drag and drop class from CP (i think Leon Finker's) and i'm not sure whats causing it, but when in debug mode i drag something from one listview to another, i get "Debug Assertion Failed" on line 1132 of dbgheap.c something about _CtrlsValidHeapPointer(pUserData) and "Damage: before Normal block (#-858993460) at 0x0012D1D8"
I'm have no idea how this is happening, and why, i was hoping someone could help, me, even a good article on debuging would be nice. I'm using WTL as well.
Even when i have the onDrop method do nothing i still run into this error, i can get to line 1186 in dbgheap.c then it wont do anything but break out of running. Its something to do with freeing debug memory from the heap. anybody know anything that could help me?
thanks
Luke.
|
|
|
|
|
Luke Murray wrote:
Damage: before Normal block (#-858993460) at 0x0012D1D8
You (or some code you're using) allocated memory, then wrote outside of the block of memory. In this case, it underran the block and the CRT detected it.
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Latest art~!@#2rDFA#@(#*%$Rfa39f3fqwf--=
NO CARRIER
|
|
|
|
|
Thanks Michael, that made some sense, and after some more looking into the code, i got it fixed.
Thanks for the reply
Luke.
|
|
|
|
|
Hi!
region is very useful feature in c#. By region, we can organize long file easily.
is there such a feature in vc7?
I know vc7 will hide or show class or method. But does it have a region feature, i hope to use it to split my long #define list manually.
|
|
|
|
|
i had a look at the preprocessor command list in msdn and didn't find anything like that!
sorry guy
Don't try it, just do it!
|
|
|
|
|
Hi !
I have a postscript file on my harddisk, and I want my application to send it to the printer. I've got no idea how I can do this, if possible using only standard C++ (I'd like my app to be platform independent).
Thank you for your help !
Jerome
|
|
|
|
|
Printing and platform independence? Good luck.
You can try to send the PS file as text to the printer device. PostScript printers sould recognize it as a PostScript file and render it.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
jhwurmbach wrote:
You can try to send the PS file as text to the printer device
But, how do I send a text file to the printer device in C++ ????
Thanks !
Jerome
|
|
|
|
|
Open the printer device (on windows, 'prn:' should work) with a iostream and stream your file into it. Thats it. You have no control over pagination, fonts etc., as you are printing a PostScript file to a PostScript printer, that has already been accounted for.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
any body knows how to create single dialog that contains bmp to png converter in mfc/vc++.......??
and...how to using or create steganography using mfc/vc++???
====================^_^
|
|
|
|
|
hii..
you can use gdi+.look msdn 2003.
|
|
|
|
|
I have been basically staring at
<br />
Linking...<br />
carl2Dlg.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) int __cdecl FaceimageLoad(char *)" (__imp_?FaceimageLoad@@YAHPAD@Z)<br />
Release/carl2.exe : fatal error LNK1120: 1 unresolved externals<br />
Error executing link.exe.<br />
now, I have came across this error before and have been able to fix it. This one however is really starting to piss me off. I need some fresh eyes on this. I am using this facedetection .dll [^] http://www.fuzzgun.btinternet.co.uk/rodney/components.htm#ObjectDetection[^]
I changed classeigenimage::Load to classeigenimage::FaceimageLoad
because I thought that this might be the cause of the error first time around but I am still getting the error even with it's new name.
I have linked the .lib in my project setting and also tried the "Generate Debug info" and "Link incrementally" checked and unchecked.
any ideas? thanks.
Later, JoeSox www.humanaiproject.org
"The worst fad has been these stupid little robots,
Graduate students are wasting 3 years of their lives
soldering and repairing robots, instead of making them smart.
It's really shocking." -Marvin Minsky.
|
|
|
|
|
Sound's like DLL hell, or a mismatch of header / linker information.
Make sure that the compiler and linker are looking at the correct directories. Don't forget that order can be quite significant, tools will search the 'Additional Include Directories' and the 'Additional Library Path' (in the project setting dialog box) first AFAIK, then in the IDE's specified directories.
Finally make sure that you've put the facedetection.DLL in a place where the environment variables of your system can see it, possibly even better would be to set up a custom build step to move it to the same folder of your executable.
Aaahhh, OpenCV can be such a pain in the @ss.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
thanks! I'll try this, but I think I will have to just add it's code into my project, instead of using the dll. Looks like the dll isn't set up to export properly.
Later, JoeSox www.humanaiproject.org
"The worst fad has been these stupid little robots,
Graduate students are wasting 3 years of their lives
soldering and repairing robots, instead of making them smart.
It's really shocking." -Marvin Minsky.
|
|
|
|
|
That function isn't exported by the DLL. Neither is the class that it's from - it looks like you're expected to use the functions declared in CObjectdetectApp.
This DLL is seriously screwed up - member functions shouldn't be exported as plain names. It works because none of the functions ever use their this pointer.
If you want to reuse this code, I suggest ripping out the code you want to use.
|
|
|
|
|
Mike Dimmick wrote:
That function isn't exported by the DLL. Neither is the class that it's from - it looks like you're expected to use the functions declared in CObjectdetectApp.
This DLL is seriously screwed up
I thought about this too.
Mike Dimmick wrote:
If you want to reuse this code, I suggest ripping out the code you want to use.
I was thinking about this, I think I will go ahead with this plan. Thanks!
Later, JoeSox www.humanaiproject.org
"The worst fad has been these stupid little robots,
Graduate students are wasting 3 years of their lives
soldering and repairing robots, instead of making them smart.
It's really shocking." -Marvin Minsky.
|
|
|
|
|
hi!,
i am writing a file system filter.
i am hooking the io messages from IFS Manager to FSD.
the hook procedure returns int.
i am hooking IFSFN_WRITE and IFSFN_FINDOPEN, and i want to cancel that operation.
what value should i return?
do i have to modify the ioreq structure?
thank you.
anshu
|
|
|
|
|
why do you ask us about that, why don't you just try something!?
just try to return an error!
Don't try it, just do it!
|
|
|
|
|
thanks for the tip.
yesterday i tried the whole day with as many no of crashes.
today i will just do it
will let u know about it
|
|
|
|
|
hi!
i did it,i used the extended error codes.
but i get this message box at the application i dont want that,i will find some way out of it.
now as i have cancelled the operation i want to pass on the contorl to user level program or i want to call a dll function.
we have this PELDR_LoadModule(),PELDR_GetProcAddress() functions declared in vxdldr.h
i used that,on doing checked build i got this link error
"unresolved externel symbol _PELDR_LoadModule"
do i have ot write something in the .asm file
i tried like
#include vxdldr.inc
VxD_CODE_SEG
BeginProc _PELDR_LoadModule
EndProc _PELDR_LoadModule
VxD_CODE_ENDS
i dont know what to write in beginproc and endproc block so i just left it blank.
it linked now but when i test the vxd system crashed
so i guess i have to write something in the block.
am i on the right track?
thanks
anshu
|
|
|
|