You need to have a pointer to a pointer. void a(char **ppcOutput) You also need to free the memory in the main function.
willy_total
Posts
-
Pointer - output -
How to convert TCHAR to charchar *pAnsiString = new char[nSize+1]; wcstombs(pAnsiString, wcpString, nSize+1);
-
Overwriting struct in binary fileyou need to use ios::binary|ios::_Nocreate as the open mode when you do the open to replace the second person
-
EditBox & EnterYou are making this much harder than it needs to be. This is a very easy thing to code. The following code does exactly what you need. All you have to do is copy it into your code and it will work. You don't need to mess around with the create options. The reason it works is because the IDOK button will be a default button, and will be called when the return is pressed. case WM_COMMAND: { switch(LOWORD(wParam)) { case IDOK: { HWND hWndChild = GetFocus(); if( hWndChild != GetDlgItem(hDlg, IDOK) ) { if( hWndChild == GetDlgItem(hDlg, IDC_EDIT1) ) { char szText[128]; GetWindowText(hWndChild, szText, sizeof(szText)); SetWindowText(GetDlgItem(hDlg, IDCS_TEXT), szText); return TRUE; } } EndDialog(hDlg, LOWORD(wParam)); } return TRUE;
-
Socket Programming questionyou are sending 0 bytes. you need to give it a size that your are sending. You also need to give a size when you recv. It would work best if you just used sizeof(msg)
-
EditBox & Enterhere is Shay Harel code converted. case IDOK: HWND hWndChild = GetFocus(); if( hWndChild != GetDlgItem(hWnd, IDOK) ) { if( hWndChild == GetDlgItem(hWnd, IDC_MYEDITBOX) ) // do something; }
-
need help in TrimStart()The easiest way is to use CString LeftTrim, but if you can't use CString. You might be able to use StrTrim, but it will remove the chars from the left and right, so if that will not work for you, you will have to loop through the string.
-
need help in TrimStart()you can't use the .Net framework in VC 6.0. You will have to use CString or the C-Runtime Library funcitons.
-
New notification code for subclassed CButtonyou can use WM_USER then just add to it if you need more than one
-
I want a Timer fuction on Non UI threadYou can't use WaitForSingleObject you have to use MsgWaitForMultipleObjects then Dispatch the message to the other controls while you wait on the timer.
-
I want a Timer fuction on Non UI threadYou can use CreateWaitableTimer. It will create a timer that uses events.