No, you don't want to use your view and mainframe objects in a worker thread. That will cause a disaster of biblical proportions. Those objects belong to the GUI thread. The way your work thread will interact with the GUI is by passing the thread a pointer to the view or mainframe window, and then posting messages to this window. Go to flounder.com and read Dr Newcomber's articles on threading.
Jim Howard
Posts
-
Problem with worker thread -
md5I've had an md5 implementation here on Codeproject for years and years. It works fine, although its pretty old fashioned code. There are several other MD5 examples here. You can also use the MS Crypto API, look up the documentation for CryptCreateHash in Platform SDK.
-
Windows XP - Not RespondingWhat you are describing is the textbook case for using a thread, your app must have some FUBAR'd design to preclude this. But another alternative that doesn't always occur to us Windows guys is to just do the long calculation in a whole seperate process, using any of the several available windows interprocess communications techniques to keep your GUI informed on how things are going.
-
How to generate human friendly product keys using asymmetric crypto?That's a good idea, but I have a question about step #5, "distribute those keys to your users". I would like to have a fixed length key of no more than 30 characters, similar to what microsoft does. I'm not sure that's feasable if the key is just hex strings. I guess I don't grock the relationship between the lenght of the plantext and the lenght of the cyphertext. Perhaps I should encode the key with a base 26 system. I already incorporate parts of crypto++ in my app for symmetric encryption, it is an excellent product.
-
How to generate human friendly product keys using asymmetric crypto?I would like to generate human friendly product keys similar to what Microsoft and many others do. The keys should have the property of being 25 or 30 characters. I need to be able to generate many individual keys, on the order of 10000 or so probably. They should be generated in such a way that it is easy to verify that a particular key is one which I generated, but hard for someone else to generate the identical list of keys. I am aware of commerical products that do this, but it seems like something that wouldn't be that hard to reinvent. It appears to me that this requirement calls for use of an asymmetric crypto algorithm. Like all locks, this one is intended to help honest people stay honest. I'm not too worried about the hacker with a disassembler, but it ought to be at least challenging for him to generate a valid product key. Any suggestions, especially pointers to sample code, will be greatly appreciated. Jim
-
Internet Explorer 6 Freeze?Because you are not using FireFox 1.0PR, which came out today.
-
Advanced MFC book?The Revolutionary Guide to MFC by Mike Blaszczak.
-
Need compact html rendering component for an mfc appI've deployed commerical apps that use CHtmlView. It can work, but it's a hellish nightmare to test all the possible permutations and combinations of operating systems and versions of IE. My client also has legitimate security concerns about using IE. If you need the full power of IE then using the MS browser object is fine. I don't need anything like the power of IE. I just need to be able to nicely render some text. IE is massive overkill for this task.
-
Need compact html rendering component for an mfc appHowdy, I am writing a client side MFC application. I would like to be able to display a scrolling window that renders simple html. The main tags I need are ,
, and maybe . I don't want to use the MS Internet explorer control. That's like using a locomotive to push a shopping cart. My client doesn't want the dependancies and security issues that come with IE. I don't blame him a bit. I know I have seen light weight html rendering controls for simple html text rendering, but I can't remember where I saw them. Anyone have any suggestions? TIA Jim H
-
What tv show makes you..The Simpsons!! D'OH!
-
%$)$^%))%$$% testers"I prefer to code for compliance with the HTML and CSS standards and let the browser providers worry about making their products work properly. " Nothing wrong with that, except that IE is probably the worst possible test case to use to achive that goal. If you only test on IE then there is no way to know if you in fact "code for compliance". As far as never having heard of Mozilla, Firebird, or Foxfire, that just shows you live in a pretty sheltered world. Your customers are in a larger world. If you test only on IE then you are going to drive van ever increasing number of them away from your site.
-
%$)$^%))%$$% testersI can't imagine that anyone who has used Firebird/Foxfire would stay with IE. Certainly all the early adopters have already moved, and the general public is going to be close behind. I can't think of a single advantage to IE, and there are a lot of disadvantages. If your web app is for a closed universe of people then IE specific code is OK, but if it is for the general public you are really being stupid to not code for Mozilla.
-
Is Appspeed SkinMagic the best C++ skinning system?Howdy, I'm looking at trying to write a skinnable MFC application. I've played with the SkinMagic demos from appspeed.com, they look pretty good. I was wondering if anyone has experience using the appspeed SkinMagic or similar C++/windows skinning systems? Recommendations and lessons learned would be greatly appreciated.
-
Hiding MFC Dialog based applicationsTake a look Chris's TrayCalender application. It does exactly what you want I think.
-
Active X object security with CDHtmlDialog?Howdy, I have an application that uses CDHtmlDialog. I'd like to display ActiveX objects on the dialog. The problem is that if the user doesn't permit ActiveX on Internet Explorer, then I can't use them on CDHtmlDialog either. I've played with using GetOptionKeyPath, but the security options seem to be set in the registry in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings rather than in the key for IE. Is there a way to display ActiveX objects in CDHtmlDialog without gettings warnings based on the IE options?
-
How to intercept control-N in CDHTMLDialog app?I'm intercepting all the alt keys in my CDHtmlDialog derived dialog application, but I can't seem to intercept the control-N "new browser" key combination. Unlike CHtmlView, CDHtmlDialog doesn't have an OnNewWindow2 event handler. I'm using C++ in Visual Studio .Net 2003. I should know how to do this, but I don't. Hints or pointers to a faq are very welcome. Thanks, Jim Howard
-
InstallersI like Inno, which is excellent and free. http://www.jrsoftware.org/ It has a graphical helper also: http://www.istool.org/
-
Can we programatically set wifi card settings?Is there a way to set 802.1x WIFI cards setting (SSID, network ID, WEP settings, etc) using an API in Win32? Is every WIFI vendor's settings handled the same by Windows internally, or is every one different? Clues and pointers gratefully accepted.
-
Add toolbar to IE?Howdy, Can someone pass me a pointer to a "how to" on adding a toolbar to Internet Explorer, similar to the Google toolbar? Or just give me the bumpersticker version here to help get started. thanks Jim H
-
I need a "theme-able" C++ GUIHowdy, I'm working on a project that includes a windows client program. I did a prototype that was basically an MFC SDI application that hosted IE with CHtmlview. I displayed HTML pages with controls, and processed the POST results. I also had some functionality in the toolbar and menus. It really worked well and I was happy with it. I demoed it to the PHB's and they liked it, but thought the "square" MFC window was "dull and boring". They now want me to keep the same web browser based GUI, but instead of hosting IE in a "boring" MFC window, they want it inside of a sexy bitmap of arbitary shape. They want something"theme-able" like Winamp, so that an artist can draw the GUI and I can add the fuctionality. One of them really likes the Roxio CD burner GUI as an example. They need this client to be fairly small, they don't want to do it in Macromedia Flash if we can do it C++. I'm sure there is a C++ application framework out there that supports themes. Can any of ya'll post a pointer or a suggestion? thanks Jim