CoGetInterfaceAndReleaseStream
Clone
if (NULL != xpsStrokeBrush) xpsStrokeBrush->Release();
SetStrokeBrushLocal
xpsStrokeBrush
xml:lang
Language
myDocumentViewer.Language = "<object xml:lang='de-DE'/>"
LVM_HITTEST
LVHT_NOWHERE
mCursor = LoadCursor(oleMod, MAKEINTRESOURCE(6));
pRS->Fields->GetItem(L"Iznos")->
pRS->Fields->GetItem(L"Iznos")->DataFormat;
IsConnected
bool
New Annex
DELETE
test
ID
field
OLE Object
wchar_t *bstrConnect = L"Provider=Microsoft.ACE.OLEDB.12.0; \ Data Source = C:\\Users\\Smiljkovic85\\Desktop\\OLE.accdb"; try { HRESULT hr = CoInitialize(NULL); // connection ADODB::_ConnectionPtr pConn(L"ADODB.Connection"); // recordset ADODB::_RecordsetPtr pRS(L"ADODB.Recordset"); // connect to DB hr = pConn->Open(bstrConnect, L"admin", L"", ADODB::adConnectUnspecified); // open file std::ifstream in(L"C:\\Users\\Smiljkovic85\\Desktop\\Kings Indian Atack.pdf", std::ios::ate | std::ios::binary); // get file size LONG fileSize = in.tellg(); // here I tried to apply your code pRS->Open(L"test", _variant_t((IDispatch*)pConn, true), ADODB::adOpenKeyset, ADODB::adLockOptimistic, ADODB::adCmdTable); // add new record pRS->AddNew(); _variant_t varChunk; SAFEARRAY FAR *psa; SAFEARRAYBOUND rgsabound[1]; rgsabound[0].lLbound = 0; // modify to our file size rgsabound[0].cElements = fileSize; psa = SafeArrayCreate(VT_UI1, 1, rgsabound); //=================== tried this as well but no luck... char *chData = (char *)psa->pvData; chData = new char[fileSize]; in.read(chData, fileSize); ======================== */ char *chData = new char[fileSize]; in.read(chData, fileSize); BYTE* pData; SafeArrayAccessData(psa, (void **)&pData); memcpy(pData, chData, fileSize); SafeArrayUnaccessData(psa); // Assign the Safe array to a variant. varChunk.vt = VT_ARRAY | VT_UI1; varChunk.parray = psa; pRS->Fields->GetItem(L"field")->AppendChunk(varChunk); // add this record into DB pRS->Update(); // cleanup delete[] chData; in.close(); pRS->Close(); pConn->Close(); CoUninitialize(); } catch (_com_error e) { MessageBox(hWnd, (LPWSTR)e.Description(), L"", 0); } }
WM_SIZE
It appears to the unarmed eye that multiline and payment areas can grow infinitely.
EnableThemeDialogTexture
WM_INITDIALOG
ScreenToClient
MoveWindow( GetDlgItem( hWnd, 1500 ), 10, 50, 50, 80, TRUE );
long fontHeight = -MulDiv( 14, GetDeviceCaps( hdc, LOGPIXELSY, 72 );HFONT font = CreateFont( fontHeight, ... );HFONT oldFont = SelectObject( hdc, font );// do the testing//if fails calculate the proper size// ...//========== some code that adjusts font size ============//fontHeight = //...// now adjust the font and reselect itSelectObject( hdc, oldFont );DeleteObject( font );CreateFont( fontHeight, ... );oldFont = SelectObject( hdc, font );// the rest is standard stuff...
WM_PRINTCLIENT
WinAPI
TTM_SETTITLE
EM_SHOWBALLOONTIP
ES_NUMBER
GetCaretPos
CBSA, CBSD...
struct CBSD{ bool operator()(const my_struct & m1, const my_struct & m2, bool ascending ) { asc ? return m1.s < m2.s : return m1.s > m2.s; }};
l.sort(CBSD());
maxTextLength
std::string date( maxTextLength, 0 );
std::string date;
erase + remove idiom
WM_WINDOWPOSCHANGED
INT_PTR CALLBACK SomeDialogProc(...){ static HFONT MyFont; // I initialize it in WM_CREATE case WM_INITDIALOG: { MyFont = CreateFont(...); } // and I delete it in dialog's WM_DESTROY
static
.cpp
C
Ordinal_Number = COUNT(*) FROM MyTable
Ordinal_Number = COUNT(*) FROM MyTable WHERE Ordinal_Number <= current_records_Ordinal_Number_value;
TVITEM
TransparentBlt()
ClearType
Control Panel
Standard
InvalidateRect( (HWND)lParam, NULL, TRUE );
strtod
strtol
EN_CHANGE
MessageBeep(MB_ICINERROR);
InvalidateRect()
// capture parent bitmapHDC pDC = GetDC( GetParent(hwnd) ); HWND parent = GetParent(hwnd);POINT ptTreeUL, ptParentUL; // upper left corner coordinates ptTreeUL.x = rcClient.left;ptTreeUL.y = rcClient.top; ptParentUL.x = rcParent.left;ptParentUL.y = rcParent.right; ClientToScreen( hwnd, &ptTreeUL );ClientToScreen( parent, &ptParentUL ); // Blit the parent DC into memory DCBitBlt( memDC, 0, 0, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top, pDC, ptParentUL.x + ptTreeUL.x, ptParentUL.y + ptTreeUL.y, SRCCOPY ); ReleaseDC( parent, pDC );
NM_CUSTOMDRAW
TVN_KEYDOWN
TVN_ITEMCHANGED
TVN_ITEMCHANGING
"-+Microsoft@
WM_KEYDOWN
GetWindowTextLength
wstring
GetWindowText
GetWindowText( hwndEdit, MyString , 10 );
GetWindowTextLength()
Double
EM_LIMITTEXT
wchar_t ExampleString[50]
wtof
double
INSERT query
GetDlgItemInt
_wtof_l( myDoubleVariable, _get_current_locale() )
ADO
ADO.NET
Command
.23
0.23
.123456789
0.123456789
GetWindowText( hwndOfMyEditControl, myStringVariable, 10 );
-.23
123
-.239999999
WM_CUT
WM_CLEAR
backspace
Delete
Spy++
Notepad
WM_KEYUP
pLocaleInfo li
wchar_t
typedef struct LocaleInfo{ wchar_t *NegativeSign; wchar_t *DecimalSeparator;}*pLocaleInfo;
WM_Create
WM_SETTINGCHANGE
BOOL CGridCellNumeric::Format(CString &TheString)
int count = 0;/*** store decimal separator ***/// get array sizecount = ::GetLocaleInfo( LOCALE_USER_DEFAULT, LOCALE_SNATIVEDIGITS, NULL, 0 );// allocate li->DecimalSeparator = new wchar_t[count];// store the separatorscount = ::GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, li->DecimalSeparator, count ); /*** store negative sign ***/// get array sizecount = ::GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_SNEGATIVESIGN, NULL, 0 ); // allocate li->NegativeSign = new wchar_t[count]; // store the negative signs count = ::GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_SNEGATIVESIGN, li->NegativeSign, count );
LOCALE_SDECIMAL/LOCALE_SNEGATIVESIGN
Format
WM_CLOSE
WM_DESTROY
GDI
break;
DefSubclassProc
LPARAM
*refData1 = (editData_t){period, isNumberValid2, "123.456"};
C2059
EN_UPDATE
C++
pure Win32 API
Updating
WM_CHAR
WM_NOTIFY
OnNotify
GetLocaleInfo
while
Win32 API