|
OK. Instead of including "initguid.h", try putting this at the top of your source file:
#define DEFINE_GUIDXXX(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
EXTERN_C const GUID CDECL name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUIDXXX(IID_ITextDocument, 0x8CC497C0,0xA1DF,0x11CE,0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D);
DEFINE_GUIDXXX(IID_ITextSelection, 0x8CC497C1,0xA1DF,0x11CE,0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D);
DEFINE_GUIDXXX(IID_ITextRange, 0x8CC497C2,0xA1DF,0x11CE,0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D);
DEFINE_GUIDXXX(IID_ITextFont, 0x8CC497C3,0xA1DF,0x11CE,0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D);
DEFINE_GUIDXXX(IID_ITextPara, 0x8CC497C4,0xA1DF,0x11CE,0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D);
DEFINE_GUIDXXX(IID_ITextStoryRanges,0x8CC497C5,0xA1DF,0x11CE,0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D);
DEFINE_GUIDXXX(IID_ITextDocument2, 0x01c25500,0x4268,0x11d1,0x88,0x3a,0x3c,0x8b,0x00,0xc1,0x00,0x00);
DEFINE_GUIDXXX(IID_ITextMsgFilter, 0xa3787420,0x4267,0x11d1,0x88,0x3a,0x3c,0x8b,0x00,0xc1,0x00,0x00); This is what I had to do in a project I was just looking at. I can't remember where I got it from, but it prevented compile errors.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Hello,
sorry...,Sir, there is still same problem.
Linking...
MyEditView.obj : error LNK2001: unresolved external symbol _IID_ITextDocument
Debug/MyEdit.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
MyEdit.exe - 2 error(s), 0 warning(s)
Thanks once again to reply soon. Now please if you have a sample project that uses "tom" with rich edit 2.0 or 3.0 please send me or you have a link which i can found some more useful things about it. please tell. Thanks a lot.
|
|
|
|
|
I have no idea what you are doing wrong. This compiles perfectly:
#include "stdafx.h"
#include <tom.h>
#define DEFINE_GUIDXXX(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
EXTERN_C const GUID CDECL name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUIDXXX(IID_ITextDocument, 0x8CC497C0,0xA1DF,0x11CE,0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D);
DEFINE_GUIDXXX(IID_ITextSelection, 0x8CC497C1,0xA1DF,0x11CE,0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D);
DEFINE_GUIDXXX(IID_ITextRange, 0x8CC497C2,0xA1DF,0x11CE,0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D);
DEFINE_GUIDXXX(IID_ITextFont, 0x8CC497C3,0xA1DF,0x11CE,0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D);
DEFINE_GUIDXXX(IID_ITextPara, 0x8CC497C4,0xA1DF,0x11CE,0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D);
DEFINE_GUIDXXX(IID_ITextStoryRanges,0x8CC497C5,0xA1DF,0x11CE,0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D);
DEFINE_GUIDXXX(IID_ITextDocument2, 0x01c25500,0x4268,0x11d1,0x88,0x3a,0x3c,0x8b,0x00,0xc1,0x00,0x00);
DEFINE_GUIDXXX(IID_ITextMsgFilter, 0xa3787420,0x4267,0x11d1,0x88,0x3a,0x3c,0x8b,0x00,0xc1,0x00,0x00);
int WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
{
GUID iid = IID_ITextDocument;
return 0;
}
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Hello,
I tried this one But still no luck. Is there any setting for compiler i am using windows 2000 server, and VC++ 6.0 with sp5 install and feb 2003 SDK. may be there is some compiler setting. i have no idea what's wrong here. please give me some more tips.
Thanks once again for replying soon. I am greatly Thankful.
|
|
|
|
|
Sorry, I can't give you any more tips. The code that I gave you compiles perfectly with VC++/sp5 because that's what I'm using. I didn't change any compiler settings from the default.
I have no idea what you're doing wrong.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Hello,
I've tried this but still no luck. I am using windows 2000 server with sp2 and feb 2003 SDK and visual studio 6.0 with sp5. this is all aboutmy system may be there is some thing wrong. or there is some "complier/Linker" setting problem because the error is linker error.
I used your last code in seprate project but got the same error. "IDD_ITextDocument" Unresolved symbol.
Thanks to Reply again soon.
|
|
|
|
|
Hello,
I want to receive data after an AcceptEx() call. A brief overview:
1. I listen on a port and receive data with the buffer I've passed to AcceptEx().
2. When there is incoming data I process the data and send a return packet.
3. Now I wan't to receive data from the same connection again. I tried to use WSARecv() on the socket, but everytime I use WSARecv() I get an error with the error code 10014 (The system detected an invalid pointer address in attempting to use a pointer argument in a call). When I create a new socket with the socket(), bind(), listen() accept() procedure and pass it to the WSARecv() function I have no problem in calling WSARecv(), but I wan't to receive data from the socket on which I sent data. Can I use AcceptEx(), send() and then WSARecv() in this order??? How would you do this?
-----------------
Thank you for your attention,
bond006
|
|
|
|
|
I solved the problem, but I got a new problem.
I'm able to send the return packet and I'm able to call WSARecv() on the socket, but I always receive the data, I sent. What's this???
|
|
|
|
|
friends
hi
this is my first mail in this forum
i am using sdk for making a dll
now the problem is when i do not use any function of the given sdk and make a dll and then when i call a dll through my client vb application
the vb do the thing which i intend to do...
now when i use any function in the same dll(i have included the lib correctly) and compile and after compiling and when i try to run my client vb application,it throws an error saying run time error 53
file not found......
so my question is some special code is to be written when i use a dll inside my dll
i have to use the dll provided with the sdk for firing important function to use the card for which the sdk is present...
thanks
vishal
|
|
|
|
|
As an experiment, instead of loading the inner DLL and using inside the outer DLL, load it from the executable. Does it load okay?
Kuphryn
|
|
|
|
|
kuphryn wrote:
As an experiment, instead of loading the inner DLL and using inside the outer DLL, load it from the executable. Does it load okay?
hi kuphryn
i think i have also asked the above question in codeguru to you
u have also replied there.....
kuphryn how i can load from the executable....
thanks
vishal
|
|
|
|
|
Try checking the dependencies of your dll (try Depends.exe). You may have included the lib and compiled it, but the compiled dll might not be able to find the win dll containing the sdk functions which you used.
|
|
|
|
|
Anonymous wrote:
Try checking the dependencies of your dll (try Depends.exe). You may have included the lib and compiled it, but the compiled dll might not be able to find the win dll containing the sdk functions which you used.
Hi Anonymous
Thanks for your mail
i think u r correct in your suggestion but how can i check the dependencies of my dll
i am new in this dll world
please tell me how to check the dependencies.....
thanks
vishal
|
|
|
|
|
Hi everybody,
I'm trying to show an icon in one of the status bar's panes. The status bar is the CStatusBarCtrl and the problem is that I can only show 32x32 icons in the pane. When I load a 16x16 icon and call SetIcon() the icon on the statusbar becomes stretched to 32x32 in size, thus loses visibility of the most parts because the statusbar itself is about 18 or 19 pixels high. The workaround I've found is to create a 32x32 icon and place my 16x16 icon in the middle of that space and everything's fine. What am I doing wrong? Or is it that the 32x32 icons are the only ones one can display in a status bar pane? Any help would be greatly appreciated...
P.S: The icons that I'm using are for the WindowsXP platform and thus 32bit icons, 24 bit colour and 8 bit transparency, maybe that's a problem?
|
|
|
|
|
When a 16x16 gets stretched to 32x32 it's usually caused by calling LoadIcon() instead of LoadImage() , or using incorrect size parameters in LoadImage() .
--Mike--
"So where does that leave us? Well, it leaves us right back where we started, only more confused than before." -- Matt Gullett
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
LoadImage() worked, thank you very much. I thought I tried LoadImage() without success before, but then I must have given incorrect parameters to it. And I didn't know that LoadIcon() stretches the bitmap to system metrics, thanks again.
|
|
|
|
|
Hi all,
Bit of a problem with CBitmap's LoadBitmap() function. If I make a bitmap a resource and do
BitmapObj.LoadBitmap(IDB_MYBITMAP);
The image is loaded fine, but if I do
BitmapObj.LoadBitmap("MyBitmap.bmp");
it returns 0 (failed). I've tried moving the location of the file around the local directory (debug, res, etc.) but no luck.
What do I need to do?
Obseve everything, remember more...
|
|
|
|
|
You can't load a bitmap file like that. To load a bitmap image from a file, use LoadImage() :
HBITMAP hbm = (HBITMAP)LoadImage(NULL, "MyBitmap.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); Hope this helps,
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Okay, but there is a function LoadBitmap() that takes an LPCTSTR string of the name of the bitmap. How does one use it?
Obseve everything, remember more...
|
|
|
|
|
It loads a bitmap from a resource. If you look at the MFC source code, you'll find that the one that takes a UINT actually calls the one that takes a LPCTSTR to do the work.
All resources are loaded via strings. The UINTs have to be coerced into looking like strings so that Windows can load them.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Hi All:
Now I am writing a CD-ROM test program on Windows platform. This test program have three item:
1) data read test
2) Audio Track Play
3) Tray in/out test
I don't know how to access cd-rom in windows, and I don't know what is Audio Track Play Test and Tray in/out test. So I want to know that. Can you help me? Thanks
welcome to meet you!
|
|
|
|
|
hello,
You know if it is posible to know where are stored in memory the pixels of a
web page ? and if yes how ?
thx in advance
|
|
|
|
|
I think you'll need to be a bit clerer on this question...
jeremysay wrote:
hello,
You know if it is posible to know where are stored in memory the pixels of a
web page ? and if yes how ?
thx in advance
Obseve everything, remember more...
|
|
|
|
|
tom76 wrote:
I think you'll need to be a bit clerer on this question...
yes sorry
In fact i'm working with CHtmlView, and i want to know if it is possible to get all pixels state of web page from memory (RAM), i don't want to use GetPixel or....
I hope you understand
PS : excuse for bad english
|
|
|
|
|
I assume you are trying to dynamically change the HTMLView window (the Internet Explorer activeX object you drop onto a dialog in Visual Studio's editor), am I right?
Look at how you set the pixels (width and height) and maybe attach a global variable to it, and getting the address of the variable and use it that way...
I don't really know, usually I stick to variables and don't bother getting it from RAM in the way I think you want.
Obseve everything, remember more...
|
|
|
|
|