I've only had one job after college (for about 3 years), and I've only ever interviewed for a few entry-level positions. So I don't know much about hiring in the software world. My question that maybe some more experienced people can answer is this: how serious about "requirements" are companies that ask for X years of experience in technology Y. For example, say an ad wants "1+ year of Perl experience." Does that have to be hands-on at work? Or does it count if I know Perl and have used it in my spare time at home? Any insights would be appreciated.
Phil Hamer
Posts
-
Job ad requirements (?) -
web browser control in a dllI'm using VC6 and creating a dialog in a DLL. I'm trying to add the Web Browser (ActiveX) Control to the dialog. I do this and a CWebBrowser2 class is automatically created for me. I use class wizard to add it as a member variable. But when I execute the code, the dialog will not show up. If I take the control out, it works. And if I try it in a dialog in an EXE, it works. Anyone have any ideas?
-
about C++It's used in CFrameWnd in PostNcDestroy. CFrameWnds should always be created with new, so it can call "delete this" as the last thing it does before the window is gone.
-
Trapping KeyBoard eventsIf you're looking for all 3 keys to held down at the same time, just look for one of them (like "E") with PreTranslateMessage, then check keystate of others with GetAsyncKeyState. VK_CONTROL is virtkey for Ctrl, and VK_MENU is virtkey for Alt.
-
Invert Pen/Line?Once you get a pointer or handle to a device context, call SetROP2 and pass in R2_NOT as the drawmode.
-
CloseHandleYeah, I must not have interpreted it correctly. I don't really understand it, so I won't even try to interpret again. Anyone else?
-
wrapper to a function with an unknown number of variablesYou would include stdarg.h and use vprintf to do something like this:
void foo(const char* format, ...) { va_list args; va_start(args, format); vprintf(format, args); va_end(args); }
-
Beginner: How to declare pointers ?There is no difference. It's just a matter of style. You can put as little or as much whitespace as you want. The following would all be OK:
char*xyz; char *xyz; char* xyz; char * xyz;
-
CloseHandleLook at NickRepin's comment near the bottom of this page: http://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/Q_20170646.html[^] Basically he says CreateFileMapping always returns a handle with a value of 4.
-
passing parametersIn searching Google, I actually found code very similar to this except they pass entry.key by value instead of taking address:
find_index(entry.key,already_present,index);
You probably just made a typo. -
linked list problemThe CApproach object returned from ParseApproach is a temporary object. You're passing the address of this temporary to Insert. When the temporary object is destroyed automatically the pointer to it points to garbage. You can either let Insert take a copy of a CApproach object instead of a pointer:
int PrintList::Insert(CApproach approach)
or you can assign the result of ParseApproach to a local variable, but keep in mind that when that variable goes out of scope, the pointer to it will point to garbage:CApproach result = ParseApproach(codestring); list->Insert(&result); list->print();
You could also pass Insert a pointer to an object allocated on the heap, but you have to remember to delete it when you're done with it. -
How to fix compiler warning ?I don't understand why, since the expression on the left IS a WORD. And we have no knowledge of this HIWORD macro; it maybe does not cast to a WORD.
-
How to fix compiler warning ?cast HIWORD result to WORD: *((WORD *)fixaddr) += (WORD)HIWORD(delta);
-
HHeelpI'm not sure, but I think SetDefID(IDCANCEL) would work.
-
HTML syntax highlighting conceptsHandling EN_CHANGE message will tell you when text has changed, but I don't know how to get only the text that has changed. You might have to reparse the whole thing.
-
OnEndlabeleditTree ()pTVDispInfo->item.pszText has the text, but if the user canceled the editing then it will be NULL. So you might do something like:
LPCTSTR lpszText = pTVDispInfo->item.pszText; if (lpszText != NULL && IsValidText(lpszText)) { *pResult = TRUE; } else { *pResult = FALSE; }
where IsValidText is some function you write to check the edited text. -
CRichEditCtrl -- current column?I believe something like this would work. If ctrl is your control and lineNumber is the current line number:
int GetColumn(int lineNumber) { // start will be char index of cursor long start, end; ctrl.GetSel(start, end); // LineIndex gives char index of beginning of current line return (start - ctrl.LineIndex(lineNumber)); }
-
x86 assemblyWhat are some good books for learning x86 assembly language. I don't want a book on general assembly language, or "for dummies" books. I'd like a book that's aimed at intermediate-advanced level, i.e. something that I can keep as a reference, not something I will discard after a few months. Thanks.
-
Language question: accessing union membersYes, I realize the layout of the union. My question is sort of a tricky one that someone who is very familiar with the C or C++ language may know. Each language has specifications for what is and is not defined behavior. If something is not defined behavior, that means it may actually work sometimes or all the time, but it is still incorrectly coded. I seem to remember that it is illegal to assign to one union member and then read from a different union member. But I'm not sure, hence the question....
-
Language question: accessing union membersI have a FILETIME struct that I want to perform arithmetic on (subtract a week from it). To do this, I need to convert it to a 64-bit integer, do the arithmetic, then convert back to a FILETIME. I've seen examples that do this with the ULARGE_INTEGER union. Something like this:
FILETIME ft; // ...set ft... ULARGE_INTEGER uli; // Copy ft to uli using uli's 2-DWORD struct uli.LowPart = ft.dwLowDateTime; uli.HighPart = ft.dwHighDateTime; // Do arithmetic with uli's __int64 uli.QuadPart -= ... // Convert back to FILETIME ft.dwLowDateTime = uli.LowPart; ft.dwHighDateTime = uli.HighPart;
where the QuadPart is overlayed in memory with the LowPart/HighPart (since it's a union). But is this legal... to set one union member and then read a different union member? Yes, I've tried it and it does work, but is it truly correct according to the language?