|
Thank you,
But I could'nt.
That's source complied suceedly.
And, HTML Code was put.
,,,,,
I want to read original HTML code.
Example,,
Original:
a
bc d
MSHTML:
a bc d
I want to put original source.
|
|
|
|
|
Í have the following problem, my app (wtl exe)loads dll´s dynamically (also wtl NOT COM) which display dialogs(pages) on a client area of my main app (also a dialog). The problem that I´m having, is that when changing between pages I check for valid data before displaying the next/chosen page. This checking is performed in the dll(in the class that wraps the page), and on an error, should display a MessageBox. However, the messagebox is NOT Modal, and is destroyed after being visable for 1 second or so... 'I´ve even gone as far as changing my dll interface to take a HWND of the main apllication so that I can call the messagebox so...
int nRet = ::MessageBox(hWndOfMainApplication,"Bollocks!", "Error!", MB_OKCANCEL | MB_TASKMODAL);
I´m at my wits end and don´t know why this is happening,
Any Ideas???
Thanks in advance
Phil
bum... and I thought I´d got rid of all the bugs
|
|
|
|
|
Anyone could point me to a nice tutorial so I can learn how to access an Access database with SQL queries? What I did so far is to use the ATL OLEDB Consumer in the class wizard and create a consumer that uses CCommand. The documentation I found on MSDN is quite confusing...
I used to do this quite easily with MFC but it seems a nightmare to do (at least to understand) with ATL... I almost regret not including support for MFC in my ATL project...
Thanks guys!
---------------
Concentrating on Ideas
http://www.edovia.com
|
|
|
|
|
ATL consumers provide database access using OLE DB - the most efficient way to access SQL database. OLE DB however has relatively steep learning curve. One thing you can do to quickly be able to deal with databases in your ATL project - is to use ADO instead. ADO is a VB-friendly layer on the top of OLE DB. Just import ADO type library by including it in your stdafx.h:
#pragma warning(disable:4146)
#import <msado15.dll> no_namespace rename("EOF", "_EOF")
#pragma warning(default:4146)
Then you can use ADO interfaces in your project (check MSDN documentation). It's not as efficient as OLE DB (single fields are converted into VARIANTs), but it's a quick and easy start.
Forget about MFC database classes in ATL. MFC only supports ODBC.
Vagif Abilov
MCP (Visual C++)
Oslo, Norway
Hex is for sissies. Real men use binary. And the most hardcore types use only zeros - uppercase zeros and lowercase zeros.
Tomasz Sowinski
|
|
|
|
|
Vagif Abilov wrote:
OLE DB however has relatively steep learning curve.
Not with the ATL-classes...?
It's the same old procedure; issue query, move to top, scan and process until end.
With VS.NET and attributed classes, it's as simple as ADO I'd say - without the VARIANT-mess.
--
Master, I'm so glad to feel your presence. But you don't seem to share my impatience. I relied upon you to break the silence. I cannot understand your reluctance.
Master, I feel so warm and I'm so happy, oh master.
Give me some more of the warm little beasts
I'm so fond of.
|
|
|
|
|
I'm trying to figure out a way to easily parse and formating date/time values using STL. Unfortunately, I can't seem to find much information regarding the time_get and time_put facets. I can use strftime and the other associated crt calls but I would prefer to stay in stl for this if I can.
Does anyone have a good sample, or reference to a sample on how to do this?
Thanks in advance,
Shawn Nagase
|
|
|
|
|
Does anybody knows how can I solved the following problem.
When I make a ATL Project with the ATL/WTL AppWizard and I try to use the ClassWizard, I get the following error:
The ClassWizard database c:\app\app.clw does not exist. Would you like to build it from your sorce files?
After selecting my source files, it won't rebuildem.
Does anybody knoes how can I correct(prevent) this problem.
This happens also in my first time Visual C++ installation.
|
|
|
|
|
ClassWizard is for MFC apps. For ATL, you can right-click a class in ClassView, and if it's a window class the menu will have "add message handler" and other commands for adding handlers to the ATL msg map.
--Mike--
"I'd rather you just give me a fish today, because even if you teach me how to fish, I won't do it. I'm lazy." -- Nish
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
duh!!! sorry for the expression.. but you dont use the class wizard in ATL dude.. that;s for MFC !! forget ATL if you wanna stick to classwizard... or mebbe vice versa! LOL
happy programming
One more addition to the addiction of coding!
If you want a helping hand, you'll find one at the end of your arm.
|
|
|
|
|
Environnement: VC6, ATL3, Win98
Here's my problem: I followed Michael Dunn's article[^] but instead of using simple controls, I create dynamically an instance of an activeX control, to place it on the added property page. I use the function CreateWindow in the OnInitDialog function, with the parameters "AtlAxWindow" and the CLSID of the activeX I want.
<br />
BOOL OnInitDialog(HWND hwnd, LPARAM lParam)<br />
{<br />
[...].br />
HWND hCtrl = CreateWindow("AtlAxWin", _T("{BA9DD568-114B-11D4-98DA-00104B458137}"), WS_VISIBLE | WS_CHILD, x, y, iWidth, iHeight, hwnd, (HMENU) IDI_MYACTIVEX, _Module.GetModuleInstance(), NULL);<br />
[...].br />
}<br />
If this works nicely on Win95, WinME, Win2000 and WinXP, the creation of the activeX blocks under Win98, at least with non-microsoft ActiveX. The Shell extension is frozen as is explorer
Does anybody have any clue of what may be happen, or if there are known issues about Shell extensions with W98?
TIA!
K.
Who gives a f*ck
If my life sucks ?
I just know one day
I won't give up
Beg For Me/KoЯn
|
|
|
|
|
Hi,
I have to loop through a large amount of text messages, and for each of these messages, I have to tokenize every words. I find it quite slow, for example, tokenizing 300 messages takes around half an hour! Each message can take from 1/4 of a sec. to ~30 secs.
I'm using these caracters to determine the tokens separators:
"% #=+,&*[]”“…:/(){}!®<>.\\|;~?`^¿\"\n\a\b\f\r\t\v"
Why is it so slow? Is there a faster way to retreive tokens?
Thanks!
---------------
Concentrating on Ideas
http://www.edovia.com
|
|
|
|
|
That is one hell of a list of tokens there. CStringT is going to be using mbsspn which will run slower if you just need ASCII. Also, even if you are just using strspn, it will have to build a bitmask of the valid terminators each call. LOTS of wasted time.
I would just toss CStringT and work with a character array directly. Build yourself a mask of the valid terminators and scan the string by hand. You will be shocked at how fast your program will run.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
I wrote an ActiveX control. This control read a bitmap and resize itself to the bitmap.
I set m_bAutoSize to TRUE. And use SetWindowPos to set it's size. But it just can't work. What can I do? Thanks
|
|
|
|
|
Why is there an "erase" function *and* a "remove" function in STL lists? Wouldn't a single overloaded function have served equally well?
What's the difference between the two? Why would you use one over the other?
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
erase works on iterators
remove works on the value stored in the list.
hence
list<int> int_list;
int_list.push_back(1);
int_list.push_back(2);
int_list.push_back(2);
int_list.remove(2); //removes both the 2s stored in the list
int_list.erase(int_list.begin(), int_list.end()); // remove all items
modified 29-Aug-18 21:01pm.
|
|
|
|
|
Because the naming in STL sucks. begin() is a verb yet it doesn't actually do any action. empty() isn't clear unless you memorize what it does (does it empty the list, or check if it is empty?). And so on.
--Mike--
"I'd rather you just give me a fish today, because even if you teach me how to fish, I won't do it. I'm lazy." -- Nish
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Yeah, I was always told that STL was so efficient and logical. Bull pucky.
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
I have a love/hate relationship with STL too. So many great jewels in a sea of ****.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Do anyone know a technical discussion article as to detrmining the number of items at which a map becomes more expensive than a hash_map. Say, if there is a map of 10 items, I would assume that hash_map would fare worse than a map; and the reverse would be true if the number of items were a 100,000. But, is there a way to determine this based on an understanding of how these containers work internally?
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
Herb Sutter wrote an article talking about the difference between hash_map and map.
http://www.cuj.com/experts/2005/hyslop.htm[^]
However, the standard hash_map can be very brain dead. I have found that if I am that worried about performance, my own hash table does better (2-3 times faster than STLPort's (yes in release mode for all of you who think STL can do no wrong)). But in each case I had special needs. In the first case, my hash_map was VERY dynamic. STL's brain dead hash_map loves to rehash at the drop of a hat and thus was wasting a lot of time. I actually got better performance by fixing my hash size at 17 (a prime since I was hashing addresses) and using my own hash class.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Hey, you might consider posting your hash_map to CP (STL section is currently so meager).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Actually, it isn't a template. It is straight plain C/C++. All I really did was fix the hash width and then store the hash information in the actual objects being hashed. Thus you get rid of any extra allocated memory devoted just to the hash map.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Can anyone tell me how to permanently disable the STL compile warnings that I get each time I compile my code in debug.
The specific warning is C4786.
I am using Visual C++ 6.0 with SP5 and I am using the MS provided version of STL. Will moving to STLPort fix this?
|
|
|
|
|
What has always worked for me was to #pragma -down the warning level, and disable that specific warning.
This is what I use in a current project:
<br />
#pragma warning( push, 1 )<br />
#pragma warning( disable:4786 )<br />
#include <vector><br />
#include <iterator><br />
#include <string><br />
#include <map><br />
#include <stack><br />
#include <vector><br />
#include <xtree><br />
#pragma warning( pop )<br />
Peace!
-=- James (Sonork:100.21837)
"There is nothing worse than being oblivious to the fact that you do not know what you are doing."
[Get Check Favorites 1.5 Now!]
|
|
|
|
|
Thanks for the quick reply. I will try it out ASAP.
|
|
|
|