Toolbar can load string from resource in this way too:void OnNotify(HWND hwnd, int idCtrl, NMHDR* pNMHdr)
{
switch (pNMHdr->code)
{
case TTN_NEEDTEXT:
{
((LPTOOLTIPTEXT)pNMHdr)->hinst = hInst;
((LPTOOLTIPTEXT)pNMHdr)->lpszText = MAKEINTRESOURCE(((LPTOOLTIPTEXT)pNMHdr)->hdr.idFrom);
return;
}
}
}
178: void OnNotify(HWND hwnd, int idCtrl, NMHDR* pNMHdr)
OnNotify:
179: {
180: switch (pNMHdr->code)
[00000000000004F0] 41817810F8FDFFFF cmp dword ptr [r8+10],FFFFFDF8
[00000000000004F8] 7517 jne 0000000000000511
181: {
182: case TTN_NEEDTEXT:
183: {
184: ((LPTOOLTIPTEXT)pNMHdr)->hinst = hInst;
[00000000000004FA] 488B0500000000 mov rax,qword ptr [hInst]
[0000000000000501] 49894070 mov qword ptr [r8+70],rax
185:
186: ((LPTOOLTIPTEXT)pNMHdr)->lpszText = MAKEINTRESOURCE(((LPTOOLTIPTEXT)pNMHdr)->hdr.idFrom);
[0000000000000505] 418B4008 mov eax,dword ptr [r8+8]
[0000000000000509] 480FB7C0 movzx rax,ax
[000000000000050D] 49894018 mov qword ptr [r8+18],rax
187: return;
[0000000000000511] C3 ret