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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
P

Peter Liddle

@Peter Liddle
About
Posts
111
Topics
69
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • axWebBrowser
    P Peter Liddle

    Hey, Yeah im actually running it in the DocumentComplete event, its funny because it orks perfectly for some websites its just a couple it doesn't. I wonder if its something to do with XHTML or DHTML. It will work fine for ebay, yahoo and egg but won't work for nwolb or rbsdigital cheers Peter

    Web Development help

  • axWebBrowser
    P Peter Liddle

    I have a problem with axWebBrowser, i have it navigating to a page but it doesn't seem to be loading it properly as when i try the GetElementsByTagName() it won't return any of the elements. I however know that the elements im trying to return exist. I does work for one element which is TITLE but it won't return any other ones. Has anyone got any ideas. Cheers Peter

    Web Development help

  • Image from Website
    P Peter Liddle

    Hey Guys I have an HTMLDocument and i want to be able to get an image on the website and display it in a listview. I can get the HTMLImage class loaded with the image element but can't seem to get the actuall image so i can display it. I have tried laoding it into a Image class but it says it won't load from a URL. Does anyone know how i would go about doing this? Cheers Pete

    .NET (Core and Framework) question

  • Drive in explorer
    P Peter Liddle

    Sorry Guys completly pointless post i found michael's guide.

    C / C++ / MFC

  • Drive in explorer
    P Peter Liddle

    Hey Guys Does anyone know how i can get my software to put a drive icon in explorer and then when the user enters that drive it calls my software. Peter

    C / C++ / MFC

  • Voice communication over LAN
    P Peter Liddle

    I think you can download software from microsoft to do what you want to do. All i know is ive done exactly what you want to do before at LAN parties where we where playing team games i thing we used MS GameVoice or somehting like that. I also rember using another piece of software called voicecommander but i think this was more for ordering commands great for UT and stuff where you say the weopon and it pops up.

    The Lounge csharp c++ sharepoint sysadmin help

  • Optimisation Brag
    P Peter Liddle

    Yeah No Prob The bottleneck was basically memory access i was using strlen in the while() loops. I just assigned the value to a dword once and used that rather then strlen so one memory access rather then having to go through each byte of a string to work out its size. I also then played about with the compiler settings and switched from debug and enabled Pentium Pro, fastcall, 16bit allignment. I also used the stricmp rather then using CString == operator which gave me a performance boost. The strlen fix made it go from 75sec to 2.5sec so big bottleneck and the stricmp() made it go to 0.7sec from 2.5sec and then the compile optimistions made it go from 0.7 to 0.06. heres the code: before:- QueryPerformanceCounter(&liBeforeClock); DWORD dwCurWord = 0; DWORD dwNumMatches = 0; UINT uiCurChar = 0; DWORD dwCurPart = 0; DWORD dwStringPart = 0; CString sCurWord; CString sKeyWord; do { while(pStringtoParse[dwStringPart] != ' ') { if(dwStringPart == strlen(pStringtoParse)) { break; } sCurWord += pStringtoParse[dwStringPart]; dwStringPart++; } //AfxMessageBox(sCurWord); for(DWORD i = 0; i < dwNumOfWords; i++) { sKeyWord = pWordToCheck[i].sKeyWord; if(sKeyWord == sCurWord) { //AfxMessageBox(sCurWord); dwNumMatches++; } } sCurWord.Empty(); dwStringPart++; } while(dwStringPart < strlen(pStringtoParse)); QueryPerformanceCounter(&liAfterClock); return dwNumMatches; after:- DWORD BasicParser(char *pStringtoParse) { QueryPerformanceCounter(&liBeforeClock); DWORD dwCurWord = 0; DWORD dwNumMatches = 0; UINT uiCurChar = 0; DWORD dwCurPart = 0; DWORD dwStringPart = 0; CString sCurWord; CString sKeyWord; //Find length of string once at start this can save hugh //amounts of time rather then doing strlen in loop checks DWORD dwStringLength = strlen(pStringtoParse); do { while(pStringtoParse[dwStringPart] != ' ') { if(dwStringPart == dwStringLength) { break; } sCurWord += pStringtoParse[dwStringPart]; dwStringPart++; } //AfxMessageBox(sCurWord); for(DWORD i = 0; i < dwNumOfWords; i++) { //sKeyWord = pWordToCheck[i].sKeyWord; if(_stricmp(sCurWord, pWordToCheck[i].sKeyWord) == 0) { //AfxMessageBox(sCurWord); dwNumMatches++; } } sCurWord.Empty(); dwStringPart++; } while(dwStringPart < dwStringLength); QueryPerforma

    The Lounge announcement career

  • Optimisation Brag
    P Peter Liddle

    Hey Guys Just had to come on and brag about my optimisation i wrote a simple parser funtion today and the first run it took 75sec to parse a 199Kb text file. The latest optimised version is doing the same job in 0.06sec how good is that for optimisation. Peter

    The Lounge announcement career

  • Directing Window Ouput
    P Peter Liddle

    Hey Guys I have a CView dirived class i am using as my main view in an MDI application and i have a CWnd derived class which is a control i am writing how do i get the control to be drawn inside the CView Class i have tried BeginPaint and Print with no luck. At the moment i create the control in the create part of the CView and then check for a safe handle in the paint of teh cview before calling BeginPaint of the control which doesn't work. Cheers Peter

    C / C++ / MFC question

  • Exporting Data
    P Peter Liddle

    Yeah but i really really need to do it is there no way to work around it

    C / C++ / MFC

  • Voting Age
    P Peter Liddle

    So whats the having to be 35 to buy a flat about in most countries at least in mine you can technically buy a flat at any age but can'y move out till your 16.

    The Lounge question learning

  • Exporting Data
    P Peter Liddle

    Hey guys I have been desperately trying to export data (just varibles) from an executable and load them into a DLL but i can't get it to work so far i have tried extern and __declspec(dllexport) and dllimport. But i have had no luck any ideas on how i do this. Peter

    C / C++ / MFC

  • Voting Age
    P Peter Liddle

    In Britian you have to be 18 to vote Driving: 17 Gambling/smoking: 16 Alcohol: 18 For the last reason alone is why i don't want to live in the states till im 21. Actually as an after thought you actually have to be 18 to play slot machines and stuff it depends on what sort of gambling lotttery tickets 16 slots and stuff are 18 i think. Correct me if im wrong

    The Lounge question learning

  • Global Variables
    P Peter Liddle

    Cheers Works buetifully Peter

    C / C++ / MFC c++ question

  • Global Variables
    P Peter Liddle

    Hey Guys How do i get global variables available in all files of project. For instance i declare a global variable in a header and then include that header in everything that i want to acces the global variable but that doesn't work so how exactly do i go about doing it so i can have a program wide global accesable from any cpp file. Peter

    C / C++ / MFC c++ question

  • newbie question about strcpy and pointers
    P Peter Liddle

    You can't do that and teh reason why is that in your second implementation you are trying to set the value of the pointer and not of the character array. And you need to actaully copy the memory containg the "AAA" string to the memory that the pointer points to. Hope this helps Peter

    C / C++ / MFC question

  • Multiple Inheritance?
    P Peter Liddle

    Hey Guys I need some help with Multiple Inheritance in MFC like HOW THE HELL DO YOU DO IT?!?!?!? I would like to create a class derived from an MFC class say CView and a generic class i have written which is a standard class deriverd from nothing. I have done it and got it to compile but it will crash when MFC calls the ISKindOf statment.:confused: Any links to tutorials on this would be extremly useful.

    C / C++ / MFC c++ oop help question

  • List View
    P Peter Liddle

    What i want to do is just have a standard list control ie CListctrl displayed inside this CListView. But i can't get the list view to display how to i create the list view inside the window.

    C / C++ / MFC question

  • List View
    P Peter Liddle

    Hey Guys I have created a list view derived class and have passed it in to a Document Template and it displays as a plain white window. I was wondering how do i actually get the list ctrl to appear inside it.

    C / C++ / MFC question

  • Prog No Longer Compiles
    P Peter Liddle

    Hey guys I have had this problem before but can't rember for the life of me how i fxed it anyway here it is. I just did a clean rebuild of my machine so reinstalled Windows and Visual studio and opened up an existing project and it will now not comile saying that certain things that rely on the crypt libaries are undeclared identifiers. How do i fix this i have teh lib files in the input for linking and have the include folders in directories what else could i have missed. cheers Peter

    C / C++ / MFC help csharp visual-studio 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