Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: bodhi
  • Order by date
  1. bodhi

    problem with iterated new operator

    Thankyou very much ArkM - that explains where I've gone wrong. I think, as you say, some rethinking architecturally is required but I understand the problem now. Appreciate the help.
  2. bodhi

    problem with iterated new operator

    Further to my last post this all works if I change the dynamic array in keywordbin to be static e.g CHAR keywords[MAX_NUM_KEYWORDS_PER_GROUP][MAX_KWD_LENGTH]; I can sort of see that there might be problems creating objects where the compiler cant tell the size of the object (as with the...
  3. bodhi

    problem with iterated new operator

    Hi all, I'm writing a language file parsing utility and have a hit a brick wall using the new operator. I have a struct for keywords as follows : struct KEYWORDBIN { INT keywordindex; CHAR name[MAX_STR_SIZE]; BOOL iscasesensitive; COLOUR colour...
  4. bodhi

    Problem with dynamically allocating arrays.

    Fair enough - I thought it made things clearer personally. I typedef all my standard types into caps - again because for me it makes things more transparent (personal preference). The code is a snippet which I copy and pasted. If it makes a difference I have exactly the same problem if I strip...
  5. bodhi

    Problem with dynamically allocating arrays.

    I'm writing a data parsing utility and am coming unstuck (spectacularly) when I try to parse a keyword set. I have a struct as follows for a keyword group : // Keyword Bin : struct KEYWORDBIN { INT keywordindex; CHAR name[MAX_STR_SIZE]; BOOL iscasesensitive; COLOUR colour...
  6. bodhi

    can't interpret file creation date and time.

    DOS Time Bits : 0–4 :- Second divided by 2 5–10 :- Minute (0–59) 11–15 :- Hour (0–23 on a 24-hour clock) Alternatively the function 'DosDateTimeToFileTime' will get you a windows FileTime. 'FileTimeToSystemTime' will then you 'normal' time formats.
  7. bodhi

    FindNextFile function

    Can't really say a lot without a sample of your code. The example below is one way to do this sort of thing : static CCHAR source_ext[5] = "*.cpp"; WIN32_FIND_DATA wfd; HANDLE fhdl; fhdl = FindFirstFile(source_ext, &wfd); if (fhdl != INVALID_HANDLE_VALUE) { do { blah...
  8. bodhi

    Creating a DLL for system wide hooks

    First create a DLL with an exported function that is used as the hooking function. __declspec(dllexport) LRESULT CALLBACK HookFunction(int code,WPARAM wParam,LPARAM lParam) { blah blah.... } Secondly install the system-wide hook. To install the hook, the DLL must be loaded, the hook...
  9. bodhi

    Geometry problem

    Thats exactly what I needed (once again). Many thanks :-)
  10. bodhi

    Geometry problem

    Thanks a lot guys :-) From this I can get the distance along the tangent line to place the bezier handle. What I'm unsure about is how best to calculate the co-ordinate points of the handle. I have two lines (chord and tangent), know the length of both lines, the angle between them and two of...
  11. bodhi

    Minimizing compilation dependencies - how ?

    I'm not entirely sure what you are asking - the dependancy is reduced as the header file 'b.h' doesn't need to know about the header file 'a.h'. You might also be able to extend this by replacing #include <iostream> with #include <iosfwd> if a forward declaration of the stream will suffice...
  12. bodhi

    Geometry problem

    To narrow down the problem : I have a circle in which I know the endpoints of a chord in the circle and the angle between the tangent to an endpoint and the chord. I require the radius of the circle. thx.
  13. bodhi

    Geometry problem

    I am provided with two endpoints and the tangent to an endpoint (or both endpoints as the curve must be uniform). I need to draw a uniform curve (section of a perfect circle)from one endpoint to the other as a 4 node bezier curve (two anchors being the two endpoints and two handles determining...
  14. bodhi

    How do I close a running program?

    Alternatively <http://www.mentalis.org/apilist/apilist.php> provides VB declarations for most common API functions along with small samples.
  15. bodhi

    question about explorer

    At a guess you might try one of the IContextMenu implementations in the Shell interface.
  16. bodhi

    printing quotes using printf

    Any of the following would do. \&quot; &quot;&quot; - Not ANSII compliant but widely supported. %c printf (&quot;Hello \&quot;World\&quot;\n&quot;); printf(&quot;Hello &quot;&quot;World\&quot;\n&quot;); printf(&quot;%c%s%c\n&quot;,'&quot;',&quot;Hello World&quot;,'&quot;');
  17. bodhi

    Access Struct within DLL

    This should really work by having the struct declared within a class and you should be able to create an instance of the class (thereby providing you with an offset pointer which you can use to address the struct). If this is not the case (i.e. the struct is declared loose) and the struct is...
  18. bodhi

    directory search

    As a simple example (with no err checking).. <----------SNIP........ WIN32_FIND_DATA wfd, dfd; #define MAX_PATHSIZE 1000 #define MAX_NO_SUBDIRS 50 #define MAX_DIRNAME_SIZE 500 char directories[MAX_NO_SUBDIRS][MAX_DIRNAME_SIZE]; .. ... .... ..... void find_directories(int *nodirs) //...
  19. bodhi

    Throwing an exception within a destructor..

    That makes sense - thx guys.
  20. bodhi

    access violation in this function?

    Good to know ... thanks.

Part and Inventory Search

Back
Top