Does anyone have a working example of how to create an active X control that can be hosted in a local HTML document, i.e. not using IIS or a web server, just a plain HTML file that opened in IE will show the active X using WinForms. Basically I am trying to create a google desktop sidebar gadget, with all the GUI and code being implemented in C#, the google gadget would look very simple All the samples I have found will not load the Active X in IE, but do in the OLE/Active test harness.
Justin Hallet
Posts
-
C# active X -
_USE_RTM_VERSIONChocolate fire guard, I have googled this already before posting this Q....nothing for it uninstall and reinstall.
-
_USE_RTM_VERSIONHas anyone gotten this to work, I a have a simple project DLL using MFC no .rc files, I have defined _USE_RTM_VERSION for all source files, but when I compile I see two entries in the embedded manifest file, and it refuses to load in depends, and I get SxS errors. How do you uninstall SP1, there is no entry in add/remove programs, VS2005 repair does not do it.....
-
[Message Deleted][Message Deleted]
-
Use any screensaver inside Windows Media PlayerDone, its a bit rough, but the code should be well commented http://www.codeproject.com/useritems/SheepWMP.asp
-
Use any screensaver inside Windows Media PlayerHi All, Yesterday I wrote a plugin for Windows Media Player to use the electric sheep screensaver, today I have updated it to use any screensaver :-D. You can download it including the source code from here - http://titanae.blogspot.com/ All comments and suggestions are welcome. Regards Justin
-
Windows Media Player pluging to wrap screensaversYesterday I downloaded and installed electricsheep screen saver from the following site - http://www.electricsheep.org/ This is such a cool screen saver, I wanted to watch it while I worked, I found the following "SheepWatcher" http://www.geocities.com/c00l_ac/SheepWatcher.html So I started thinking thats cool how did they do that, run the screen saver in a window, good old Microsoft had the anwser - http://support.microsoft.com/kb/q182383/ So being a windows developer, I decided I could do better, a Windows Media Player plugin to run ElectricSheep.scr, first step get the WMP SDK - http://www.microsoft.com/windows/windowsmedia/forpros/platform/sdk.aspx Firstly it did not work with VS.NET 2005 - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwmt/html/playersdk_readme.asp Ok, create a C++ project for Windows Media Player Visualization plugin, we call it SheepWMP, ok actually I wrote a quick test like so - DialogApp::OnInitInstance () { CreateProcess "electricsheep.scr" "/p HWND" } Bingo it works, so inside the WMP pluging on create I create the process, on destroy I terminate the process on render I check the window size and FindWindowEx ( ..., "WindowsScreenSaverClass" and resize the preview window! Job done - if you want the source code please just ask :-D, its not formated for an artical yet. You can read my blog and download SheepWMP.DLL from my blog - http://titanae.blogspot.com/
-
if (23 == x) or if (x == 23)It is to prevent typo errors,
if (x=23)
will compile and do undesired things, assign x the value of 23 and always be trueif (23=x)
will not compile its good practice to put the constant on the left and variable on the right -
GlobalAlloc fails!Just a few, actually, I think you may be right here, I think it is fragmentation, I will check the size, I had assumed it was 100Mb, it could be more like 700Mb in which case fragmentation will be the problem.
-
GlobalAlloc fails!I have, GetLastError, returns ERROR_NOT_ENOUGH_MEMORY, "Not enough storage is available to process this command." Call is - GlobalAlloc ( GMEM_MOVEABLE | GMEM_ZEROINIT, aSize ), where size is about, 1048576.
-
GlobalAlloc fails!I have an application that is getting NULL returned from GlobalAlloc, the error code says "not enough storage avaliable" but that does not make sence. The application has a working set of 450Mb and a virtual set of 790Mb, my machine has 1Gb of physical ram and 2.5Gb total (including virtual memory). This error does not happen on a machine with 2Gb of ram. The request is only for 100Mb. Any ideas why GlobalAlloc should fail? Could it be address space? Are there any compiler/linker flags I can change for MSVC 6?
-
BeautifiersI looked at SourceStyle from Orche, www.ochre.com, very nice supports template styles and preview, plugs directly into MSVC, but its not free.
-
Java Client WindowHi All, I have a simple yet complex problem, has anyone tried or does anyone know how to create a child window that is a java window? My idea is this:- Using JNI start java VM create top level java class (window), passing View HWND in java (window) create Frame with HWND as parent What I mean by this is a java application/class runs inside a MFC application like so:
.......MFC Main Frame...............
. ......MFC View.................. .
. . ......Java Swing Window..... . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . ............................ . .
. . . .
. ................................ .
. .
....................................Thanx in advance...
-
Other peoples codeI used to be a style fanatic, wanting everyone to use my coding standards, but over the years I have come to realize the following to be true. Can you read the code and understand its intent? Yes, coding style is good enough. No, something has to change. There are different levels to examine here, layout/names/spacing is the minor, and logic is the major. As long as the code is understandable and the logic is correct don't stress and worry over the minor. Unless its your own code and you are not proud of how it looks! :-D
-
Thread problem - help?Don't use exception handling, re-code in a defencive manor, checking things rather than waiting for things to explode.:cool:
-
THE STRANGEST WM_TIMER ISSUE (only for gurus)The problem is when you move your mouse, you are probably causing a an invalidate on the tree control, which means you are forcing events to repaint you window, this will be as fast as you pc can handle. SetTimer ( ... ) & OnTimer ( ... )== 55 milli seconds is the fasters you can do. Now using an idle loop you can go as fast as you like (Idle Loop Processing in MSDN) BOOL bDoingBackgroundProcessing = TRUE; while ( bDoingBackgroundProcessing ) { MSG msg; while ( ::PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) ) { if ( !PumpMessage( ) ) { bDoingBackgroundProcessing = FALSE; ::PostQuitMessage( ); break; } } // let MFC do its idle processing LONG lIdle = 0; while ( AfxGetApp()->OnIdle(lIdle++ ) ) { // Do nothing } // Now you can check if at least 10 ms have passed if so do paint, if not loop }
-
CXross-platfom development vs platform-centricI have been developing cross-platform applications for the last five years and to be honest it is easy there is no special trick. We develop using MFC on NT then port to Solaris, IRIX, AIX, HP-UX. Yep we support all UNIX platforms, who do we do this you may ask ? The answer is WindU, www.bristol.com, I do not work for them, but I must say its a great product for porting you applications to UNIX. And before you ask its not a tiny DB client, is it a full blown workstation CAD applications using distributed processing and OpenGL visualisation. Check you products out at www.moldflow.com. So you see you can be platform centric and cross platform, you do however have to be careful not to use all the latest and greatest MS gizmos.