You may want to purchase "The Art of Computer Programming" by Donald E. Knuth (Get the latest version.) It is a three volume set that discusses all kinds of different algorithms (albeit in a mathematical form.) This is the de facto trilogy on alogrithms in general.
Hope this helps...
Take a look at the "mbstowcs" C run time function or "MultiByteToWideChar" Platform SDK API call.
Hope this helps! Happy coding! :) *~-> EOR Candy <-~*
Try this:
CYourClass::SomeMethod()
{
HWND hWnd = NULL;
CWnd* pWnd = NULL;
pWnd = ::AfxGetMainWnd();
// pWnd = ::AfxGetApp()->m_pMainWnd; will work also.
if (pWnd)
hWnd = pWnd->m_hWnd;
// All being well, hWnd should contain the HWND of your main window.
}
This will give you the HWND of...
Cool! I am a HUGE soccer fan myself (and I referee youth soccer games.) If you could explain more exactly what you are trying to achieve, I will try to help.
Happy coding! :)
*~-> EOR Candy <-~*
I thought of something else. Be sure that in any one allocated memory block that you do not write more data to it than the size of the allocated block. For example, if you allocate a block of 4096 bytes of memory and then proceed to write 5000 bytes of information to that block, you more than...
To pass values among dialogs (CDialog's):
1) Create a CString member value in each dialog class.
2) If the user selects OK in the first dialog class, save the value in the CString member variable (of the first dialog class.)
3) After calling DoModal() on the first dialog, assign the CString...
So you want to develop your own API and/or extension API? Here are some suggestions:
1) If you're using C++, see if there are any MFC classes that impement TAPI (Sorry, I have't done much with TAPI :( ). If so, subclass them and add your own extension methods in that subclass. If there are...
I would imagine you would be able to use CreateDialog to create a modeless dialog but then you must be sure that OnCancel and OnOK do not call the respective base class member functions becuase these in turn will call EndModal which you do not want to happen with a modeless dialog.
In regard to...
I found this out by applying DeMorgan's Law and/or boolean algebra (my memory is hazy on the specifics.)
This essentially says that:
"A OR B" and "NOT A AND NOT B" are logically equivalent so that if:
m_psp.dwFlags |= PSP_HASHELP
shows the help button
then the...
I noticed the DLLEXPORT in several of your routines. If you are relying on a method in a DLL to be automatically called in response to a notification message, this will not work because DLLs do not have messaging loops so there is no way for a DLL to receive a notification message. Be sure...
The only thing I can think of is that every time you allocate a block of memory, write down its memory address. Every time you release a block of memory, note the memory address of the pointer to the block of memory BEFORE the release operation (free() or delete) If you find a base address...
One possibility is that you should only perform the GlobalUnlock in the OnDrop method since the data is cached in OnBeginDrag and then accessed when processing another notification message (specifically dropping) and therefore the data needs to be valid for the lifetime of multiple notification...
Without seeing some code, the only thing I can think of is the following scenario:
I'll use a hypothetical function called theFunc that takes a CComboBox* as a parameter.
Assume you encounter documentation that says "pass a pointer to a CComboBox in the call to theFunc(CComboBox*...
I not sure exactly what you are trying to do. Keep in mind that "char" is a type and "time_t" is of type long.
Hope this helps. Happy coding! :)
*~-> EOR Candy <-~*
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.