I use TB_ADDSTRING to add strings to my toolbar. But when I try to add a string resource it gives me an error.
This code is error:


invoke SendMessage, hToolbar, TB_ADDSTRING, hLang, IDS_File

The error number is 0x716 and the error string is "The specified resource name cannot be found in the image file."
But I can load the string from the dll


invoke LoadString, hLang, IDS_File, addr buffer, sizeof buffer

This code works.

IDS_File is a String Resource
hLang is the handle of a dll loaded with LoadLibrary
Posted on 2003-10-21 15:03:11 by greenant
I don't think you are building LPARAM correctly.

MSDN: (LPARAM) MAKELONG (idString, 0)

And MAKELONG
The MAKELONG macro creates a LONG value by concatenating the specified values. 


Syntax

DWORD MAKELONG(
WORD wLow,
WORD wHigh
);

Parameters

wLow
Specifies the low-order word of the new value.
wHigh
Specifies the high-order word of the new value.
Return Value

The return value is a LONG value.
Posted on 2004-03-11 14:18:28 by gorshing
Posted on 2004-03-11 15:35:09 by QvasiModo