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: *

  1. apatterno

    How to create dynamic array of CWinThread?

    Aah, since you didn't specify what error you got, let me guess... no match for `CWinThread& = CWinThread*&' operator candidates are: CWinThread& CWinThread::operator=(const CWinThread&) Or something like that, depending on what brand of compiler you use. The problem is in the first line...
  2. apatterno

    Issue with menus' in MFC

    You could pass all dialogs' WM_COMMAND messages to a common function. For example (assuming MFC) bool CMyDialog::OnCommand (WPARAM wparam, LPARAM lparam) { if (!lparam) return common_menu_handler (wparam, this); else return CDialog::OnCommand (wparam, lparam); } bool...
  3. apatterno

    Change Menu Text Dynamically

    Take a look at the SetMenuItemInfo system call. I REALLY hope that helps. Will
  4. apatterno

    echo command and directories

    Hmm, weird... The command for directory listing is ls... I guess you could do echo `ls`... Or maybe echo <TAB> <TAB> to show completions Then again, you could use any command for that, not just echo.
  5. apatterno

    initialize array from constructor (should be simple)

    Yeah, of course if the type is int[3] it doesn't really matter, because that can easily be optimized away by the compiler (without shelling out hundreds of dollars for Visual Studio, if you use GNU C++!!!) I guess for some types with overloaded operators, initializing by assignment is not what...
  6. apatterno

    Dll issue, not finding functions in linker

    You mean, you see a popup-list when you type the characters SC-> This doesn't mean the linker can read the DLL. All that means is that VC++'s tags browser is looking up your class declaration. Make sure that all symbols are marked for __declspec (dllexport) when building the library, and...
  7. apatterno

    initialize array from constructor (should be simple)

    Hah! Thanks, as luck would have it, I happen to be using GNU C++. But that link said "Note that a constructor expression is not the same as a constructor for a C++ struct or class." Not quite what I was looking for, but okay, oh well, I'll just do it the "wrong way" as any good programmer would...
  8. apatterno

    Code wouldn't Compile

    Make sure you insert #define AGCONNECT and #define _AFXDLL before including AgUtMsgCommon.h. This should fix compiler errors. Also, when they say "AgConnect.lib must be linked" they mean that your program must link with it. This is usually done by adding "AgConnect.lib" to Object/Library...
  9. apatterno

    is there something like getpixel that works on the entire screen

    Use FindWindow to obtain the desired window's HWND Use GetDC to obtain that window's device context Use GetPixel to obtain a color value inside that window Done. Or, if you need to capture the entire window to a bitmap... Use FindWindow to obtain the desired window's HWND Use GetDC to obtain...
  10. apatterno

    VC++.NET 2003 and global variables

    Other classes or member functions? Where? This program seems to not have any classes involved in it at all.
  11. apatterno

    ON_MESSAGE Error?

    What's the error, pray tell? I REALLY hope that helps. Will
  12. apatterno

    initialize array from constructor (should be simple)

    Hello, this should be simple, but I'm unsure of the correct syntax for initializing an array from a constructor. Consider : class Firable { public: Firable (int wid_first, int wid_second, int wid_third) : wids ( {wid_first, wid_second, wid_third} ) { /* ... */ } private: int...
  13. apatterno

    Create duplicate of Object

    Thanks, wangbar, that was the idea I needed. I had to modify it a bit to handle nested objects recursively, though. For anyone else following this thread: function ObjectCopy(source) { for (var i in source) { if (typeof(source[i]) == 'object') { this[i] = new ObjectCopy(source[i])...
  14. apatterno

    Help! Can FSCommand run .exe file?

    The Flash Player is not allowed to open files on the client's hard drive, for obvious reasons. In the same way, the Flash Player is not allowed to execute programs on the client's system, except when it is running locally, and even still, it has very stringent requirements. Just imagine, if...
  15. apatterno

    Painful testing procedure because of cached files

    You will have to re-publish the SWF in order for the .as changes to take effect. In the same way, you will have to re-publish the SWF if you make changes to the .fla file. Both the .fla file and the .as files are only used at compile-time, not run-time. The Flash Player doesn't even know these...
  16. apatterno

    Create duplicate of Object

    I have an object that I have created with "foo = new Object()". I would like to create a duplicate of this object, but it seems every way I try, the duplicate is actually just a reference to the same original object. For example: [code]foo = new Object(); foo.member = 3; bar = foo; bar.member...
  17. apatterno

    Selecting a random line from a txt file and displaying on my web page.

    I have a related issue... what if the goal is to choose a random line from a very very large file... for example /usr/share/dict/words ??? It seems very gluttonous to load the entire file into memory, if all we need is one line. But is there any other way?
  18. apatterno

    Include Flash-Player Control in a dialog box

    Yeah I did it by inserting the control from the Componenets Gallery. It made a wrapper MFC class and everything. Amazing! I could then just place the control in the dialog editor. So easy. I REALLY hope that helps. Will
  19. apatterno

    MD5

    I have a question about Flash strings and the JavaScript code var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ Does Flash use Unicode or ASCII? In the help files, it claims to use Unicode, but in my experience whenever I paste Unicode text into the ActionScript...
  20. apatterno

    MD5

    Thanks for the link! I will look into it. I am doing this to make a flash game, and when the game is over, it sends some variables to a PHP script that tracks High Scores. The problem with that is that anyone can type into their browser highscore.php?s=999999999&n=Hacker and cheat the system...

Part and Inventory Search

Back
Top