|
I didn't see any OnDocumentComplete event for the Microsoft Web Browser Active X object..
Rob Jones
|
|
|
|
|
Rob
Using The Class Wizard its the 11th event down for a browser control added as a member variable, I just checked and it is there on my VC+ 6.00
Regardz
Colin
|
|
|
|
|
You are correct. I looked there like 5 times before, don't know how I missed it. Weird. Thanks for all your help. I did use that event and added the code to this event. Everything works great!
Thanks again,
Rob Jones
|
|
|
|
|
I have an MFC application that querries an ODBC responder. There is a particular set of messages which is unique to the system which are send to the server through the winsock to register and then to querry the ODBC. Once the application receives the data from the winsock control it is in a string which has to be parsed, right now I got the string separated by the "|" that's the symbol that separates these messages. Then, the information from the ODBC comes in this format, { 1 1 administrator Default {} {} 0 {}}
I am having a hard time parsing the information out of the curly braces. I was thinking of finding the position of the first "{" brace and then finding the position of the last "}" brace, and then extracting the content in between. If any of you guys have any suggestions, methods or any sample code wchich could help me out it would be great, Thanks
|
|
|
|
|
Hello, the codegurus around the world.;)
I'm not sure what is going on.
1) Did you create your own client/server program?
2) If so, server program reads some info from ODBC setting on Window NT server, server program sends this info to client.
3) Did you use CSocket class or WinSock API?
If you use CSocket class, we have a chance to have our class derived from CObject to
set the data structure to make our life easy.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
1)Yes
2)Yes
3)CAsyncSocket
|
|
|
|
|
Check out my CStringParser class (posted here on CodeProject). It supports "quoted" strings, but you're using matching braces, so you'd have to replace the '{' and '}' with a suitable character, like a double quote or maybe even a caret.
Here's how it would work:
CString sMyString = "{ 1 1 administrator Default {} {} 0 {}}";
// remove the curly brace and space characters from the beginning of the string
sMyString.Mid(2);
// remove the last curly brace from the end of the string
sMyString.Left(0, sMyString.GetLength() - 1);
// replace the braces
sMyString.Replace('{', '\"');
sMyString.Replace('}', '\"');
// now parse the string
CStringParser sParser(sMyString,' ', '\"');
You should get the following string values as a result:
sParser.GetField(0) - "1 1 administrator Default "" "" 0 """
sParser.GetField(1) - "1"
sParser.GetField(2) - "1"
sParser.GetField(3) - "administrator"
sParser.GetField(4) - "Default"
sParser.GetField(5) - ""
sParser.GetField(6) - ""
sParser.GetField(7) - "0"
sParser.GetField(5) - ""
|
|
|
|
|
Thanks John!
The CStringParser clarifies a lot and it's not verbose, on the contrary very helpfull(It's probably one of the more helpfull string parsers on the web. If you get a chance the bracketed sub-strings would be usefull to see.
|
|
|
|
|
Hi,
Can you help my, where I did mistake, when the compiler say "
error C2065: 'IDB_TABIMAGES' : undeclared identifier" , but IDB_TABIMAGES is my bitmap, which is defined in resource.h ?
LB
|
|
|
|
|
try #includeing resource.h in the cpp file that uses the resource.
Christian
The early bird may get the worm, but it's the second mouse that gets the cheese.
|
|
|
|
|
Hi everybody.
I want to get movie window size & resizing my window but I cannot find this property or method
Iman Ghasr-e-fakhri
|
|
|
|
|
I'm trying to find some examples of code that are able to delete the contents of folders like 'C:\windows\history', 'c:\windows\temporary internet files' and or the recycle bin, as I've been told these are special folders and you need to work with them in a different way. some help would be great.
Joe
|
|
|
|
|
Hi ! I'm using EnumJobs function to retrieve current printer jobs enumeration.
It works fine, but the pDevMode member of this structure holds NULL in Windows 98. It holds proper pointer in Windows 2000. Is there any other way to discover print job information like number of copies and paper size ?
Thanks!
Dmytro
|
|
|
|
|
Hello,
I am working on an RFQ scanner program written in C++. I would like to use the classWizard to create various recordsets. This program is run through a telnet application called SLNET to the scanners. Can I convert this program to MFC? If so will it still work through the telnet program?
If you can't can I create another app, then create the classes for the ODBC recordsets, and cut them into my program?
Thanks.
|
|
|
|
|
I thought Microsoft had a conversion program that would take
something like a console mode app and convert it to MFC.
Unfortunately, Ive long since forgotten/buried the reference
for it.
I had a contractor in my shop covering my butt while I was
on annual leave earlier this year and he passed the
info on when we were talking about 'legacy c code conversion
to MFC'). Apparently, it presumes a certain 'style'
of programming, so it might not do 100% unless you end up
doing a re-factor/re-write. This also may not help, since
you're starting from C++.. in my case, the contractor started
with a mish-mash of c, C++, and rewrote the service using
the ATL COM Service wizard as a base, with MFC support, then
added back my classes.
Hope you find something useful in this ...
Garth
|
|
|
|
|
Hey all!
You know how when you connect to the internet and you double click the little computer icon in your systray how it has a button which says Details and when you click it, the window extends downward? I want to do something similar in my app where when you click it, it reveals more buttons and extends the dialog window! how can I do this?
Thanks
Ashman
|
|
|
|
|
Easy Peasy. Put the button where you want the boundary to be and when you press it, call SetWindowPos with SWP_NOMOVE and SWP_NOZORDER, and use the text on the button to know which values to pass ( the short dialog or the full one ). That way you can grab the button position and use it, allowing you to move it in the template if needed and automatically have it work for you where-ever it is. Beats spending ages trying values every time it changes.
Christian
The early bird may get the worm, but it's the second mouse that gets the cheese.
|
|
|
|
|
Hi,
Once again I'm banging my head against this ADO stuff. Here's my prob:
I have an array of pointers to CADORecordBinding objects. I want to associate each object in the array with a record from the database.
Problem is If i call pBndRs->BindToRecordset(pVisitRs) for each new object, I get a com_error. I've also tried increasing the reference count for pVisitRs but this fails too.
<br />
IADORecordBinding * pBndRs;<br />
CVisitBndRs * pVisitBndRs;<br />
_RecordsetPtr pVisitRs;<br />
<br />
TESTHR(pVisitRs->QueryInterface(__uuidof(IADORecordBinding), (LPVOID*) &pBndRs));
<br />
while (!pVisitRs->GetadoEOF())<br />
{<br />
pVisitBndRs = new CVisitBndRs();
m_visitBndArray.Add(pVisitBndRs);
TESTHR(pBndRs->BindToRecordset(pVisitBndRs));
pVisitRs->MoveNext();
}<br />
So I end up with the first object in the array getting the values of the most recent record, and all the rest contain junk.
Any help greately appreciated..
But for now my brain must rest for the weekend
Regards
Brendan
|
|
|
|
|
I'll just reply to my own problem, in case anyone encounter the same situation.
Its probably better to write your own class which has a copy constructor which accepts a CADORecordBinding object as a paramater. If you want to save information back to the database, just iterate through the array and you'll have to create a new CADORecordBinding object, which is a bit of a pain. This approach allows you to incorporate additionally functionality in terms of member functions in your own class.
|
|
|
|
|
Hi Brendan.
I have question of you,
You used of ADO DLL in your program or you used of ADO OCX ???
When i use of DLLs in my program then i use of classes, or only functions (for example direcx dll)?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I've tried various pieces of sample code to find the system tray window, and the system clock window, but none of them seem to work. I even tried searching for the window by title, creating a title from the current time. No go. What I want to do it force the clock to redraw after I've updated the time.
Anybody had success in this area?
Peter
|
|
|
|
|
After more searches, I found it.
::SendMessage(HWND_TOPMOST, WM_TIMECHANGE, 0, 0);
Peter
|
|
|
|
|
hello,
I want to disable the keyboard prog'cly.I wrote a keyboard hook but got struck up in the middle.I want to furhter know if there is any other way to disable the key board prog'cly
other than hooks.
thanx in advance
Anil
|
|
|
|
|
I doubt it. If you don't hook the system, how can you stop the system responding to the keyboard ???
Christian
The early bird may get the worm, but it's the second mouse that gets the cheese.
|
|
|
|
|
ya graus ,
I could write to hook a particular vkey .when it comes to the entire keyboard,how do i access the entire keyboard???.
My doubt is by useing these keybrd functions like setkeyboardstate,getkeyboardstate,keybd_event can't we disable the keybrd for a particular application.of course i couldnot do it.I thought may be, i went wrong in some
implimentations.Do correct me if i am wrong.
Thanx in advance
Anil
|
|
|
|