|
Thanks Michael, but I finally figured it out. It's C++ using the .NET regexp classes. I'd post the resolution, but all my typing needs to be on the book. Right now I'm looking at trying to get to bed by 5 so I can get up at 10 and get two more chapter's edited by Monday morning.
Thanks again!
Cheers,
Tom Archer, Inside C#
Mainstream is just a word for the way things always have been -- just a middle-of-the-road, tow-the-line thing; a front for the Man serving up the same warmed-over slop he did yesterday and expecting you to say, "Thank you sir, may I have another?"
|
|
|
|
|
|
Very cool. I found the image for the cover btw
Cheers,
Tom Archer, Inside C#
Mainstream is just a word for the way things always have been -- just a middle-of-the-road, tow-the-line thing; a front for the Man serving up the same warmed-over slop he did yesterday and expecting you to say, "Thank you sir, may I have another?"
|
|
|
|
|
A new image?
So... if I was to say buy directly from you could I get a Tom Archer signed copy?
Regards,
Brian Dela
|
|
|
|
|
You know it!
Cheers,
Tom Archer, Inside C#
Mainstream is just a word for the way things always have been -- just a middle-of-the-road, tow-the-line thing; a front for the Man serving up the same warmed-over slop he did yesterday and expecting you to say, "Thank you sir, may I have another?"
|
|
|
|
|
Don't forget this now... You forgot about my signed copy of Inside C#!!!
When it's out I'll be expecting to have a place to order from... or I'll just send you the money
Regards,
Brian Dela
|
|
|
|
|
Hello, I'm new to Windows Application programming and I have a couple of questions. First, I'm wondering how do I check the value of a CHECKBOX? I setup the resource and I used an AUTOCHECKBOX for it, but I need to know if the value is checked or not. How do I go about that?
Also, I am trying to create a COMBOBOX that will display a list of directories that the user can select. What are the basic things I'll need to get that done?
Thanks.
-EDarkness
|
|
|
|
|
IsDlgButtonChecked() reads the state of a checkbox.
CB_ADDSTRING adds a string to the end of a combo. CB_INSERTSTRING adds a string at any index. CB_GETCURSEL gets the index of the selected item.
--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
|
|
|
|
|
Hello,
How can we add tom interfaces in our project and use it with Rich edit. the msdn sample code was not working for me.
Here is the code:
HWND hwnd;
ITextDocument *pDoc;
ITextRange *pRange;
POINT pt;
IUnknown *pUnk = NULL;
GetCursorPos(&pt);
hwnd = WindowFromPoint(pt);
SendMessage(hwnd, EM_GETOLEINTERFACE, 0, (LPARAM)&pUnk);
if(pUnk &&
pUnk->QueryInterface(IID_ITextDocument,(void**) &pDoc) == NOERROR)
{
pDoc->RangeFromPoint(pt.x, pt.y, &pRange);
// ... continue with rest of program
}
but this produces errors regarding "IID_ITextDocument" as i add tom.h in my program.
please give me any code sample of Text object model.
thanks in advance.
Asad Rasheed
|
|
|
|
|
Asad Rasheed wrote:
but this produces errors regarding "IID_ITextDocument" as i add tom.h in my program
What 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,
The Error is here..........
Linking...
MyEditView.obj : error LNK2001: unresolved external symbol _IID_ITextDocument
Debug/MyEdit.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Now, Please tell What's the actual problem.
Thanks to reply
|
|
|
|
|
#include "initguid.h" before including "tom.h" in one of your files. If you include "initguid.h" in more than one file that uses "tom.h" you'll come up with other errors, so only put it in one file.
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"
|
|
|
|
|
If add #include "initguid.h" in MyEditview.cpp i got these 5 errors.
Compiling...
MyEditView.cpp
g:\program files\microsoft sdk\include\guiddef.h(160) : error C2084: function 'int __cdecl IsEqualGUID(const struct _GUID &,const struct _GUID &)' already has a body
g:\program files\microsoft sdk\include\guiddef.h(193) : error C2084: function 'int __cdecl operator ==(const struct _GUID &,const struct _GUID &)' already has a body
g:\program files\microsoft sdk\include\guiddef.h(198) : error C2084: function 'int __cdecl operator !=(const struct _GUID &,const struct _GUID &)' already has a body
g:\program files\microsoft sdk\include\guiddef.h(199) : error C2264: '==' : error in function definition or declaration; function not called
g:\program files\microsoft sdk\include\guiddef.h(199) : error C2088: '==' : illegal for struct
Error executing cl.exe.
Thanks for Reply as soon as possible.
|
|
|
|
|
It seems like you're including "initguid.h" more than once. Are you including it before "tom.h"? If so, then try replacing #include "initguid.h" with #define INITGUID and see if that works.
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"
|
|
|
|
|
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
|
|
|
|
|