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
J

Jase Jennings

@Jase Jennings
About
Posts
27
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Creating a list or array of IHTMLElementCollection ptrs
    J Jase Jennings

    Hi, I need to store in an array or list, a dynamic number of IHTMLElementCollectionPtr's The array/list needs to be dynamic as each collection represents a set of images from a web page. The number of open internet explorer's can vary, and the user should at any time be able to open up a new IE browser, and refresh my applicaton to represent the images from each browser. I can't use new() on the pointer, because it is the address of the pointer that is supplied to the appropriate IE functions, i just need to create an array of raw pointers. Is there something in the stl which can help me ? I cannot implement a copy constructor for IHTMLElementCollectionPtr's, so that rules out 'list' etc, and I can't use MFC's collection objects as it is not derived from CObject. Any ideas please ? I've tried writing my own class to store these but i'd rather go with something tried and trusted. Jase

    C / C++ / MFC c++ data-structures help question

  • Need help getting past a VC++7 compiler error
    J Jase Jennings

    Thanks for your reply. The article you linked me too has helped me fix the problem. I'm not well acquainted with namespace's, and the article showed me you can exclude symbols as follows : #import < mshtml.tlb > named_guids no_namespace exclude("UINT_PTR", "tagLOGFONTW") // Internet Explorer 5 Thanks again for you help. Jase

    C / C++ / MFC help csharp c++ com visual-studio

  • Need help getting past a VC++7 compiler error
    J Jase Jennings

    Hi I'm developing an application which interfaces with Internet Explorer using COM. I have a problem compiling my code due to typedef redefinitions. Whilst I understand the cause of the compiler error, I cannot figure a way around it. My application is #import'ing mshtml.tlb. This causes the compiler to automatically create 'mshtml.tlh', which redefines some existing typedefs. The worst thing, is that mshtml.tlh (which is not editable due it being regenerated every time you compile) defines UINT_PTR as an unsigned long *, so it differs with the existing definition which is of course unsigned int *. None of these typedefs are mine, and i do not sepcifically include BaseTsd.h or WinGDI.h I could really use some suggestions as to how i can resolve this problem. Here's the output : TestIEConnectWithCOM.cpp c:\TestIEConnectWithCOM\Debug\mshtml.tlh(957) : error C2371: 'UINT_PTR' : redefinition; different basic types c:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\BaseTsd.h(90) : see declaration of 'UINT_PTR' c:\TestIEConnectWithCOM\Debug\mshtml.tlh(76516) : error C2011: 'tagLOGFONTW' : 'struct' type redefinition c:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\WinGDI.h(1167) : see declaration of 'tagLOGFONTW' Jase

    C / C++ / MFC help csharp c++ com visual-studio

  • Comparing images
    J Jase Jennings

    load them into memory and memcmp ? alternatively, crc check the files ? either of the above will work. could use some more information on what it is you're trying to achieve ... Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC question

  • Screen Saver Problem
    J Jase Jennings

    sspipes.scr is the filename for the 3d pipes screensaver. '3d pipes' is the name of the saver, not the filename of the saver. If i've missed the point and not helped at all, please give a better description of what you are trying to achieve and how you are going about it and i will try to provide u=you with some better help. Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC windows-admin help question

  • Scrolling a CListBox
    J Jase Jennings

    Hi, I'm having big problems trying to scroll a listbox in code. I can set the scrollbar ok, but I can't figure out how to scroll the text properly. Can anybody suggest how i can instruct a CListBox to scroll by a given amount, and have the listbox take care of updating both the scrollbar and the client area (i.e. have it scroll the text correctly). Clearly CListBox knows how to do this, because if i just grab the scrollbar of a standard CListBox, it works. So how do i ask it to do this for me. Effectively, i want to 'emulate' having dragged the scrollbar. Thanks Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC com tutorial question

  • Determine whether connected to internet
    J Jase Jennings

    But InetIsOffline() doesn't check for an internet connection. It merely checks to see if you have selected "Work Offline" in IE or Outlook. <-- Snippet from MSDN --> "Returns TRUE if the local system in not currently connected to the Internet. Returns FALSE if the local system is connected to the Internet or if no attempt has yet been made to connect to the Internet" <-- Snippet End --> By default, Windows assumes that you are connected to the internet as soon as you log on to Windows. The result of this is that InetIsOffline() will inform you that you are connected to the internet even if you are not, simply because you are not in 'Work Offline' mode ... I'm beginning to doubt that the holy grail exists and am forming the opinion that there are no sdk or api functions that can reliably tell ou whether or not you are connected to the internet, and - this is the most important bit - not throw a dialup box if you are not connected. ? Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC com testing beta-testing question

  • Determine whether connected to internet
    J Jase Jennings

    not really ... if your not connected it can take too long to timeout Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC com testing beta-testing question

  • Determine whether connected to internet
    J Jase Jennings

    I'm a little confused regarding InternetGetConnectedState(). If I run this function without a connection, dwFlags returns RAS, LAN and CONFIGURED If I run this function with a connection, dwFlags returns RAS, MODEM and CONFIGURED ... so in truth, it doesn't appear that InternetGetConnectedState() is a very reliable test of whether or not you have an open connection. It seems to think that just because I have a LAN, that i must also be connected to the internet. Perhaps, it is merely testing for active ip traffic, sees the LAN, and hopes that it may be an internet source. I think this function simply returns true if it sees that you have a connectoid configured, regardless of whether you are connected My only concern is that if it returns true, i assume a connection and then use other inernet sdk functions. If in fact there is not a connection, then a dialup is thrown. I don't want to throw up a dialup without first asking the user if they are ok for me to throw a dialup. Sure, i can inform them that running the functionality requires an internet connection and then they'll not be too surprised to see the dialup if i throw one. But as a developer, i'm obviously looking for the perfect solution. I've also tried InternetAttemptConnect(0), and it always tell me that i am connected I've also tried InternetCheckConnection(), and it always tells me that i am not connected Whats a developer to do ? Is there any method that i can rely on ? Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC com testing beta-testing question

  • Need tools / techniques for tracing GDI leakage
    J Jase Jennings

    Hi, Thanks for your reply. I have managed to trace the problem that i had (thanks to an evaluation copy of Bounds Checker) - it was all thanks to a couple of HKEY's which i had forgot to do a RegClose() on. Just a silly mistake really (but aren't they all?). Still, it begs the question - why did the gdi tool we are discussing show me lots of fonts , pallettes and regions when i took the comparison snapshots? I had no other program running at the time, so these resources weren't being created by any other application. Is it possible that it could mistake HKEY's (and whatever may be internally allocated when opening a registry key) for GDI resources , and then point me at some bogus resources ? Are registry keys treated similarly to file's / sockets ? i.e. there are a physical limit to the number of open files you can have - is the same true for reg keys ? Would this also make sense of all the 'A resource you requested was unavailable' msg boxes that popped up when my 'resources' were running low. Am i likely to get this error if it was in fact due to reg keys ? damn, there's so much to learn. Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC com graphics debugging tools help

  • Need tools / techniques for tracing GDI leakage
    J Jase Jennings

    Out of interest - how did you get your hands on a copy. I've looked on their website and it doesn't even give a price. It sems you have to go through a salesman / vendor in order to get a copy. And did you then enter a registration code to it ? (that is, it was 'unlockable') ? Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC com graphics debugging tools help

  • Need tools / techniques for tracing GDI leakage
    J Jase Jennings

    I think the tool you mentioned is the tool i mentioned earlier. It is only 95/98 , and you're right - it shows the pensd , palletes and fonts that you are leaking. And it does indeed display lots of them! Only i don't use any, so its not my app thats leaking them :( From the outset, it looks pretty good. But in truth, it doesn't reflect the state of my application one iota. It's called GDIUsage - is this the one ? You have to build it from source - available from MSJ online. Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC com graphics debugging tools help

  • Need tools / techniques for tracing GDI leakage
    J Jase Jennings

    Thanks for your kind offer. However, my source is for a commercial product so i can't show you the code ... Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC com graphics debugging tools help

  • Need tools / techniques for tracing GDI leakage
    J Jase Jennings

    Hi, I can see why these examples would cause leakage, and in looking through my source files - I'm not guilty of either of them (mores he pity, cos then at least i would have found some leaks ... Jase Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC com graphics debugging tools help

  • Need tools / techniques for tracing GDI leakage
    J Jase Jennings

    Thanks for your reply. I have tried Purify but when i have Purify running, my dialog will not display. As for bounds checker, i would love to take look, as I have heard much about it. However, they don't provide an evaluation copy which in my book is criminal. I'm not paying all that money without testing it first ... I shall double check my code for the instances you mention. Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC com graphics debugging tools help

  • Need tools / techniques for tracing GDI leakage
    J Jase Jennings

    Hi Braulio, Thanks for you reply. I searched using google.com and found a gdiobj.exe on ftp.microsoft. It turned out to be a self extracting zip file from 1995 containing source code which i couldn't build (it doesn't have a workspace, so i would have to work out the libraries and dependencies myself in order to link it). It also came with 2 exe's which were dependant upon mfc30.dll so i coldn' run them. I would really appreciate it if you could send me your copy. jpj@totalise.co.uk Thanks Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC com graphics debugging tools help

  • Need tools / techniques for tracing GDI leakage
    J Jase Jennings

    Hi, I need to find a tool or learn some techniques that can help me trace GDI leakage. I've found some tools on MSDN which work for Windows Me and 2000, but i also need to check on NT4. Besides, the tools i found on MSDN weren't very good anyway. They reported massively spiralling leakages for palletes and regions and bitmaps when i'm not creating any! Surely to leak, i would have to create and forget to destroy. So those tools may justfifably have been telling me about leaks - but definately they were incorrectly identifying the resource. And they didn't help you find the code. Any ideas please ? Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC com graphics debugging tools help

  • Please give me some advice on the proper handling of HICONS
    J Jase Jennings

    Hi, Thanks for your reply. So tell me then, which commercial product do you use and is there an evaluation version ? Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC question com graphics learning

  • How do i determine how many bytes of memory available
    J Jase Jennings

    Hi, Is there an MFC / API function i can call to tell me 1) How much Total Physical memory is available in a system 2) How much of this is used, and how much is available Thanks for any help Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC c++ com json performance help

  • Please give me some advice on the proper handling of HICONS
    J Jase Jennings

    Can you give me any advice on tracking GDI resource leaks ? My application leaks quite badly! I have dealt with the HICON issue now, creating in OnCreate and destroying in OnDestroy(). I was also using a class called CSXButton which leaks pretty badly too, so i've removed all traces of that and am now using just a CButton with icons. I also did use some text drawing functions on a splash screen which had leaks, but i resolved that by freeing my CFonts before changing them and started to use dc.save and dc.restore. I don't believe i am using any other gdi functions, but i am using several control classes sourced from codeguru and from here that may be leaking. How can i trace the source of the leak ? Please don't suggest a third party product that i have to pay for ... i want to become familar with some methods to track these problems myself. Jase ------------------------------------------------------------------------------------------------------------------------------------------------------------------- View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com

    C / C++ / MFC question com graphics learning
  • Login

  • Don't have an account? Register

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