I wanted to polish my web development skills and was looking for a fun project to do. Because I have a development background and all comes back to binary code, I decided to make a binary clock. But there are already so many binary clocks out there, so I had to build one with a twist. These days, internet marketing is a popular topic as well, and I decided to combine these 2 things together. That's why I have build watch-a-logo[^] where one can submit[^] his own website and attach a logo to. So if anyone of you have a website you want to promote, or just need to kill some time, check it out. I appreciate any constructive feedback to make this a fun place to come by and kill some time. And of course, help others in promoting their website or blog :-D
Wim Jans
Posts
-
Beta testers needed: Fun way of Website promotion -
MFC: Use same menu for mainframe and childframeCool, works great Thanks Iain! Wim
-
MFC: Use same menu for mainframe and childframeHello, I'm having a bit of a problem using the same menu for my mainframe and childframe. Basically I don't need the menu that comes with the childframe. In my mainframe menu, I'm dynamically building one menu entry, and I don't want to do this processing for every child window I open, that's why I want to use the mainframe menu for the childmenu. Is there a way to prevent loading of the childframe menu? I tried to load the mainframe menu in the OnCreate Handler of my childframe, but that doesn't seem to work:
int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1) return -1; CMDIFrameWnd* frame=(CMDIFrameWnd*)AfxGetMainWnd(); CMainFrame* mfrm; mfrm=(CMainFrame*)frame; CMenu NewMenu; NewMenu.m_hMenu=mfrm->m_hMenuDefault; ASSERT(NewMenu); SetMenu(NULL); ::DestroyMenu(m_hMenuDefault); SetMenu(&NewMenu); m_hMenuDefault = NewMenu; return 0; }
-
pluggab;e protocol handler in MFCHello, I have this asynchronous pluggable protocol handler (apph) that I'm trying to integrate into a an MFC application. I've based my view on CHtmlView and call the apph using the Navigate2 method. This works as expected. Now, the apph is designed that - at initialization - you have to call a routine to set some variables (current path, ...). These are statically stored inside the apph to make them persistant for the life of the apph. The problem I'm facing is this: After a few minutes of inactivity of my MFC application, MSHTMLED.DLL gets unloaded which also unloads the apph. Whenever I try to click a link in my MFC application, it will fail from now one, as the apph was unloaded (and the static variables are gone). The apph is automatically loaded after clicking the link though, but the initialization phase is skipped of course. Question: is there any way so I can MFC in tricking not to unload my protocol handler? Thanks in advance Wim
-
Tool to monitor resource usageThanks Graham, Exactly what I was looking for. 8 years (since Win95) of having task manager available and never thought of pressing that menu :-O :doh: Wim
-
Tool to monitor resource usageDear Customer Support, It happens on Windows 2000 as well as XP. I suspect a particular program, therefor it would be nice if I could have a look at the resources it uses (really cool if the program keeps a history of the resource usage, so I can keep the program running for a few hours without having to manually monitor the resource usage). I typically have 5 programs running throughout the day. Memory is 1Gb physical. Wouldn't this be the ultimate program to demonstrate the power of MyXaml ;P
-
Tool to monitor resource usageHello all, I'm having problems with what I believe is a resource problem. After I work a few hours with my computer and try to open whatever application, it fails to display the application. This can be anything from notepad to task manager, ...; sometimes jus tthe frame appears without the menu, something nothing happens, ... I've had a quick look at the available memory using taskmanager whenever that happens (had to close another app before I was able to run taskmanager though) and there's plenty of memory left (400M used of 1Gb). So I think it must be that I ran out of some kind of resource. Does anyone of you know a good (free) tool to monitor resources. Ideally it will split this out per application and dll's opened by the applicaton. And I would really be cool if it was able to show the application or dll that constantly takes more resources without freeing them. Or can it be something else? Memory related, ... ? I welcome any suggestion Thanks in advance Wim
-
Prevent IHTMLDocument2 from updating IE screenHello all, I'm writing a IE toolbar/toolband and I need to update some html elements before saving them to a file. So far so good, everything works as expected, but I have 1 problem. I capture the IHTMLDocument2 and loop through the IHTMLElementCollection to change the 'src' of all 'img' elements. The logic works fine, but the screen (Internet Explorer) is updated with the new source code, so all img elements in the html page are invalid (which is normal, I changed them to an invalid location to test things). Is there any way I can prevent this update from happening? I'm thinking of taking a copy of the IHTMLDocument2, but have no idea how to accomplish this. Obviously setting pTempCopyDoc=pCurrentIEDoc is not working :-) I fail to find a real copy statement. Anyone knows a) how to prevent the update in IE from happening or b) take a copy of an IHTMLDocument2. By the way, the strange thing is that although the screen is updated with the invalid img's, the code behind the screen is not (if I do show source or do file/save as), the img's are still the old values. Thanks in advance Wim
-
anybody wants a Gmail account? -- I've got 3 invitations [modified]Thank you so much!
-
anybody wants a Gmail account? -- I've got 3 invitations [modified]I would appreciate it if you could send an invitation to jans_wim@hotmail.com Thanks Wim
-
Good source for emoticons?Check out Messengertools[^]
-
Random LOTDsSubtract 100 from 169 and see if that number means anything to you :)
-
Question about Dynamic cursor!!This looks like an Oracle question? I could answer it, but doing so will get me banned from codeproject for life... :) Better try it at another forum[^]
-
Oracle Site.Hello, You should have a look at http://otn.oracle.com/index.html[^] There's a menu 'New to Oracle' on the right. You might need an account to access that section, but it's free. For the documentation, including a search goto http://tahiti.oracle.com[^]. Regards Wim
-
std::list problem using dllHello, Thanks for your reply. 1) I'm using Visual C++.NET 2003, with latest sdk's. 2) I've set the 'Minimize CRT usage in ATL' to No. I'm not using atl for the dll anyway... If I should delete my objects in the dll I'm using, how can I do that? After all, I'm passing the std::list reference from my main program to the dll. The dll is just stuffing the std::list with data... Regards Wim
-
std::list problem using dllHello, In my application I call a dll, which contains an exported class. The class has a member function, which passes a std::list by reference. When using the push_back member of the list, the application just freezes after a few iterations: In my main app:
std::list< std::basic_string > m_Columns; int bReturn=pMyDllClass->doit(m_Columns);
In my dllint CMyDllClass::doit(std::list< std::basic_string >& out) { ... for (int n=0; n<20; n++) { out.push_back(std::basic_string("test"); } ... return 0; // <== never reached }
After iteration 11 or so, the app freezes. I I use this piece of code in my main app, so not using the dll but using a normal class, it works perfectly. Any idea what I'm doing wrong Thanks Regards Wim -
Problem compiling ATL minDependency Visual .NET 2003Hello, I have a problem compiling a project using the MinDependency option. It gives me all kind of linke errors like these
Linking... LIBCMT.lib(crt0dat.obj) : error LNK2005: __osplatform already defined in atlmincrt.lib(atlinit.obj) LIBCMT.lib(crt0dat.obj) : warning LNK4006: __osplatform already defined in atlmincrt.lib(atlinit.obj); second definition ignored Creating library .\ReleaseMinDependency/myproj.lib and object .\ReleaseMinDependency/myproj.exp LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup .\ReleaseMinDependency/myproj.dll : fatal error LNK1120: 1 unresolved externals
Now, if I understand it correctly, this is because _ATL_MIN_CRT is defined. I goto the project properties, set 'Minimize CRT usage in ATL' to No and 'Use of ATL' to Statically linked. When I cross check with C/C++ Preprocessor I see _ATL_MIN_CRT is gone from the Inherited Values in the 'Preprocessor Definitions' property. Now, when I compile and when the linkstep failed, I check the build.log and surprisingly I see the /D "_ATL_MIN_CRT" flag. Did I do something wrong? Do other options (/GX) flag automatically add it to the cl.exe parameters? Even when I check the C/C++ commandline in the project preoperties tab, it is not there. Any clue? Thanks Wim -
Get the menuitem which was pressedMichael, Just wanted to thank you again for your excellent answer. Got it working now. Regards Wim
-
Get the menuitem which was pressedOk, I see it now. One thing what I discovered when playing with the WM_MENUSELECT was that I couldn't get the (a random) text from my popup menu (just for a test, take the first entry of the popupmenu, I will move it to the WM_COMMAND later). What I did was this:
LRESULT CMyToolBar::OnMenuSelect(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { if (lParam&&(HIWORD(wParam)&MF_POPUP)) { HMENU hSubMenu = GetSubMenu ( (HMENU)lParam, LOWORD(wParam)); MENUITEMINFO mii; mii.fMask = MIIM_STRING; char c[2000]; mii.dwTypeData=c; mii.cch=2000; GetMenuItemInfo(hSubMenu, 0, TRUE, &mii); MessageBox(mii.dwTypeData); } return 0; }
According to the documentation, lParam contains the Handle to the menu I pressed (the main menu), and if HIWORD(wParam) contains flag MF_POPUP, the LOWORD(wParam) contains the the position pressed in the menu. If I use GetSubMenu((HMENU)lParam, HIWORD(wParam)), I should get the handle to my popupmenu containing the directories, right? I outputted the parameters, and the handle and index looked OK. But when I used GetMenuItemInfo using the handle obtained with GetSubMenu and index 0 (the first Item in the popup menu), it returns an empty string. Any idea what I'm doing wrong? Thanks Wim -
Get the menuitem which was pressedHi Michael, I'm reusing them because I really have no clue how many directories I will have. Let's say I have 10.000 directories, that means I have to define 10.000 unique id's. You know of a way to create that many on the fly, or maybe a better way to do it? The other problem I have then is to what popupmenu the directory I clicked belongs (C:, D:, E:), but I supppose I can have a list of HMENU id's and I check every list/MENU_ID for success. Thanks Wim