Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
T

Tommy Svensson

@Tommy Svensson
About
Posts
77
Topics
43
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Global custom cursor that never change?
    T Tommy Svensson

    Hi, I have an app in my system tray. On a special key press, would it be possible to change system cursor to a custom one without having it changed regardless what other applications under the cursor might want to change it to? For instance, when holding down CTRL+ALT, my new cursor shows but it is quickly overriden by Internet Explorer because now I'm pointing on a url link (forcing the cursor to become a pointing hand). Disregard the fact that doing this - if at all technically possible - is not recommended for issues of interference and weird and unexpected behavior. Thx! /T

    C / C++ / MFC question

  • Application loses focus
    T Tommy Svensson

    Hi! I have an application which sits in the system tray globally listening for a combination key press event (CTRL+ALT+T). Instead of opening the app by right clicking the app icon in the tray bar (clicking Open), I would like to open the app window upon CTRL+ALT+T. When that happens, sometimes (more often than not) the window loses focus/gets inactivated and I manually need to click it to regain focus. What else besides the following lines of code can be done to force the app foreground, topmost, focused and active?

    ((CMyAppDlg*) AfxGetApp()->GetMainWnd())->ShowWindow(SW_SHOW);

    ((CMyAppDlg*) AfxGetApp()->GetMainWnd())->SetFocus();

    ((CMyAppDlg*) AfxGetApp()->GetMainWnd())->SetForegroundWindow();

    Thx! /T

    C / C++ / MFC question

  • In my BHO, how to react to window move or resize?
    T Tommy Svensson

    Thx Prasad, the latter part now solved! Thx. Still, this question remains unanswered: My Browser Helper Object creates a window (inherits from CDialogImpl). I've managed to position this window in the lower right corner of Internet Explorer but the problem is that whenever the user resizes or moves Internet Explorer, my window stays put. I would like to move my little window as the parent window (IE) moves. How can my window react upon move/resize messages from the parent window (IE)? /Tommy

    ATL / WTL / STL help question javascript tutorial

  • In my BHO, how to react to window move or resize?
    T Tommy Svensson

    Hi again, I discovered a new problem and I have to share this with you as I can't solve this on my own... :( My Browser Helper Object creates a window (inherits from CDialogImpl). I've managed to position this window in the lower right corner of Internet Explorer but the problem is that whenever the user resizes or moves Internet Explorer, my window stays put. I would like to move my little window as the parent window (IE) moves. How can my window react upon move/resize messages from the parent window (IE)? BTW: My window steals the focus once it's displayed, how can I give the focus back to IE? All help is grea... well, you know I love you guys! /T

    ATL / WTL / STL help question javascript tutorial

  • How do I know if Internet Explorer has any scrollbars?
    T Tommy Svensson

    Hi all, I have developed a Browser Helper Object (Internet Explorer) and I have smart pointers to my html document, my web browser and so on. Is there any way I can find out if the current document/webpage has any visible scrollbars (horz/vert)? /Tommy

    ATL / WTL / STL question html

  • Moving window along a cosine path
    T Tommy Svensson

    Hi all, Upon the start of my windows application I would like the splash screen window to move along the path of a cosine curve. More precisely I would like it to work like this: My splash window is positioned at the lower right corner of the screen. Now image a cosine graph under the interval of 0 <= degrees <= 180. I want the upper left corner of the splash screen to initially correspond to the coordinate of [180, cosine(180)]. Then, at some intervals I want the window to move to the "left" along the cosine curve all the way up to the top left corner of the screen, making a horizontally flipped S-shaped path (almost a flash-logo-like path). Since screens vary in sizes I need to know how to transpose a cosine curve to "fit" all screens. Any help would be greatly appreciated!!!!! /Tommy

    Algorithms adobe data-structures help tutorial

  • IE Browser Helper Object - how to get clicked text/word?
    T Tommy Svensson

    Hi all, I have a working BHO in C# - a browser helper object - which can find things on a webpage based on the element's id attribute value. Now I wish to retrieve the text or word anywhere on any webpage that the user has clicked on. I have done this the ATL/C++ way but I'm nowhere near finding a solution to this in C#/COM Interop. Anybody with the experience? Help is REALLY appreciated!!! /T

    C# c++ com csharp help tutorial

  • Grouping ctrls in a group box...?
    T Tommy Svensson

    Hi all, Firstly, how do I create a group box programmatically? Secondly, I want the following to work: m_MyGroupBox is my group box (CStatic). Surprise... m_MyGroupBox->ShowWindow(SW_HIDE). How can I make the controls "inside" the group box to also disappear? By simply saying that m_MyGroupBox is the parent when creating the inner ctrls? Thx, /Tommy

    C / C++ / MFC question

  • Where can I find a table of all functions inside in kernel32.dll?
    T Tommy Svensson

    Hi all, I'm trying to add a splash screen to a dll inside DllMain (process_attach) and the docs says there are lots to think about. E.g I can not call functions outside kernel32.dll, etc... Now I need to know where I can find a table of all functions listed in kernel32.dll? Anyone? The docs also says I can not call any registry functions... by if I want to do this, how can I go on?! /Tommy

    C / C++ / MFC question windows-admin

  • Where to add a dialog in a non-mfc dll?
    T Tommy Svensson

    Inside PROCESS_ATTACH, is this a bad thing to do you mean: ---- hSplash = CreateWindow( "BUTTON", "Tommy testing Splash Screen...", WS_POPUP | BS_FLAT, (sx-W)/2, (sy-H)/2, W, H, NULL, NULL, hdll, NULL); ShowWindow(hSplash, SW_SHOW); UpdateWindow( hSplash); } // ... processing ... if ( hSplash) DestroyWindow( hSplash); ----

    C / C++ / MFC c++ question

  • Where to add a dialog in a non-mfc dll?
    T Tommy Svensson

    Ok... so HOW then do I create and call a dialog/window in a dll as soon as possible...? Actually, what I want is a splash screen that kicks in when somebody calls LoadLibrary(mydll). /Tommy

    C / C++ / MFC c++ question

  • Where to add a dialog in a non-mfc dll?
    T Tommy Svensson

    Hi all, I wish to create a dialog from within my non-mfc dll. I want to start the dialog as soon as possible! Can I do it in PROCESS_ATTACH...? The docs says only simple initialization is allowed there. Anyone? /T

    C / C++ / MFC c++ question

  • Challenge folks!!! This can't really be that hard!?!?? :(
    T Tommy Svensson

    Michael Dunn wrote: What I do to tell the difference is try to get an IHTMLDocument interface on whatever is being shown in the view. If that QI fails, then a web page is not being displayed, so you can assume the file system is. When can I check for the displayed web page...? I tried in SetSite but I think the document wasn't finished loading. How to know when to test the IHTMLDocument pointer? /Tommy

    C / C++ / MFC help question

  • Challenge folks!!! This can't really be that hard!?!?? :(
    T Tommy Svensson

    Michael Dunn wrote: What I do to tell the difference is try to get an IHTMLDocument interface on whatever is being shown in the view. If that QI fails, then a web page is not being displayed, so you can assume the file system is. I'm assuming you're not doing this from the DllAttach function. (If that's the case, please tell me how!) If not, well, I've tried that too (after SetSite call) but what that really does is only to relieve me [or the folders] from my heavy dll dictionary loading; still the folders and all that are under the influence of explorer.exe are loading the BHO when opened. Is there no way to test for differences between the callers other than the process name?! Sounds weird... Well, well, the solution is still to be found I guess. Thx Mike, /Tommy

    C / C++ / MFC help question

  • Challenge folks!!! This can't really be that hard!?!?? :(
    T Tommy Svensson

    Hi everybody, I've asked lots of people to help me out here but apparently this seems hard to do. ALL suggestions are more than welcome! If this thing gets solved rapidly I will consider paying a small amount for a solution. The problem description: I have a BHO (Browser Helper Object) in a dll. The BHO is loaded when Internet Explorer (iexplore.exe) starts and unloaded when it closes. It performs dynamic dictionary lookups on web pages. In the loading part of the dll ///////////////////////////////////////////////////////////////////////////// // DLL Entry Point extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) { if (dwReason == DLL_PROCESS_ATTACH) { /* TCHAR pszLoader[MAX_PATH]; GetModuleFileName(NULL, pszLoader, MAX_PATH); _tcslwr(pszLoader); if (_tcsstr(pszLoader, _T("explorer.exe"))) return FALSE; */ _Module.Init(ObjectMap, hInstance); DisableThreadLibraryCalls(hInstance); } else if (dwReason == DLL_PROCESS_DETACH) _Module.Term(); return TRUE; // ok } I have commented out a code section which makes the loading stop if it discovers the caller as the process explorer.exe. This piece of code does everything I want IF it wasn't for the fact that Internet Explorer (iexplore.exe) sometimes runs under the explorer.exe process. So the problem is, how do I get the dll/BHO to load ONLY ONLY ONLY when Internet Explorer is started and NOT NOT NOT every time when a folder (resides in explorer.exe process) is opened. As you probably know, we all use folders every day and my BHO loads a heavy dictionary every time it is opened. Now, some of you clever guys out there might say: Why not delay the heavy part loading until you really need it? That is, load it only when you discover you have a web page (and not a folder). That would almost be fair enough if it, among other things, wasn't for a copy protection mechanism that I have in my dll. When the copy protection mechanism sees that there are no more, let's say, evaluation days left for the BHO dll, then a message pops, informing this to the user. And naturally it does this with every opened folder too, not only with Internet Explorer. This is definitely not ok! And another problem is that the BHO dll sort of hooks on to the operating system since explorer.exe is an important process. For this reason only one would want to get rid of the folder/explorer.exe dependency. Also at installation and uninstallation things become complicated becau

    C / C++ / MFC help question

  • Under what circumstances does IE run in explorer.exe process?
    T Tommy Svensson

    Thx Mike! My problem is this: I have a BHO which is only supposed to load and run in Internet Explorer; the BHO is a web tool. It has a heavy init phase which is very annoying having to wait for if it's loaded in explorer.exe (that is in folders and such frequently used objects), the way it is now. Is there a way to know under what circumstances IE is run under the explorer.exe process so that I can skip the heavy loading in these cases...? Because when I had this piece of code if (dwReason == DLL_PROCESS_ATTACH) { TCHAR pszLoader[MAX_PATH]; GetModuleFileName(NULL, pszLoader, MAX_PATH); _tcslwr(pszLoader); if (_tcsstr(pszLoader, _T("explorer.exe"))) return FALSE; } my BHO did not load at all in IE on some machines... which ones with what spec I don't know. Removing the code (the _tcsstr part) makes the whole BHO dependent on open folders and explorer views... For example, before uninstalling my app (the BHO) I need to shut down every folder (eplorer.exe) unless I want to reboot after the uninstall. Any idead on what do to? /Tommy

    C / C++ / MFC help question

  • Under what circumstances does IE run in explorer.exe process?
    T Tommy Svensson

    Hi, Appreciate your help on this one... Under what circumstances does IE run in the explorer.exe process? Thx, /Tommy

    C / C++ / MFC help question

  • How to grab text from text-based apps/objects?!?!!? Solution = money!
    T Tommy Svensson

    Hi everybody, I've asked this question before, and I'M NOW WILLING TO PAY (with PayPal) for a solution that fits my needs because time is not a thing I have in abundance and I need this thing quickly! Here's, from a user point of view, what I want the resulting solution app to do: #### When pressing a modifier key (ctrl for example), clicking (right or left mouse) ANY text-based string in ANY application or object (folder names, titles, list items, etc) in the operating system (win95+), a small window should appear next to the clicked-on text informing the user what text he/she has clicked on. #### Two approaches (as far as I know) are possible: Either you can go the OCR (Optical Character Recognition) way where you actually capture and analyze what the screen pixels look like. An OCR engine is hard to develop yourself and expensive to license or buy. Or you can use the MS Accessibility API to do this... (fairly undocumented but supposed to do the trick). This is an API used for developing apps that for instance can read text on the screen out loud. Anyone with the appropriate knowledge and skills who want to take this on? We can discuss the details more privately when a first contact has been established. Thx everybody and thx for a great forum! /Tommy

    C / C++ / MFC tutorial question json

  • How to grab text from text-based apps/objects?!?!!? Solution = money!
    T Tommy Svensson

    Hi everybody, I've asked this question before, and I'M NOW WILLING TO PAY (with PayPal) for a solution that fits my needs because time is not a thing I have in abundance and I need this thing quickly! Here's, from a user point of view, what I want the resulting solution app to do: #### When pressing a modifier key (ctrl for example), clicking (right or left mouse) ANY text-based string in ANY application or object (folder names, titles, list items, etc) in the operating system (win95+), a small window should appear next to the clicked-on text informing the user what text he/she has clicked on. #### Two approaches (as far as I know) are possible: Either you can go the OCR (Optical Character Recognition) way where you actually capture and analyze what the screen pixels look like. An OCR engine is hard to develop yourself and expensive to license or buy. Or you can use the MS Accessibility API to do this... (fairly undocumented but supposed to do the trick). This is an API used for developing apps that for instance can read text on the screen out loud. Anyone with the appropriate knowledge and skills who want to take this on? We can discuss the details more privately when a first contact has been established. Thx everybody and thx for a great forum! /Tommy

    COM tutorial question json

  • Where to find docs on the Accessibility API?
    T Tommy Svensson

    Hi all, Does anyone know of any GOOD docs on the Windows Accessibility API (other than that of msdn's)...? I would like to retrieve the text from any text-based application just by clicking the text or by hovering the text with the mouse pointer. Pretty much like www.atomica.com. Does anyone know how to accomplish this? /Tommy

    C / C++ / MFC com json tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups