Click here to Skip to main content
15,905,028 members
Home / Discussions / C#
   

C#

 
GeneralRe: Converting a HIMAGELIST to an ImageList? Pin
Zombies with Coffee, LLC26-Nov-02 10:10
professionalZombies with Coffee, LLC26-Nov-02 10:10 
GeneralReboot a Server with C# Pin
athomas421926-Nov-02 9:14
athomas421926-Nov-02 9:14 
GeneralRe: Reboot a Server with C# Pin
NormDroid26-Nov-02 10:02
professionalNormDroid26-Nov-02 10:02 
GeneralRe: Reboot a Server with C# Pin
J.Liss26-Nov-02 13:47
J.Liss26-Nov-02 13:47 
GeneralRe: Reboot a Server with C# Pin
athomas421927-Nov-02 3:39
athomas421927-Nov-02 3:39 
GeneralRe: Reboot a Server with C# Pin
thematt27-Nov-02 7:03
thematt27-Nov-02 7:03 
GeneralRe: Reboot a Server with C# Pin
athomas42192-Dec-02 3:27
athomas42192-Dec-02 3:27 
GeneralSNMP Provider for WMI Pin
thematt26-Nov-02 7:20
thematt26-Nov-02 7:20 
GeneralRe: SNMP Provider for WMI Pin
J.Liss26-Nov-02 13:58
J.Liss26-Nov-02 13:58 
GeneralRe: SNMP Provider for WMI Pin
thematt27-Nov-02 7:10
thematt27-Nov-02 7:10 
GeneralRe: SNMP Provider for WMI Pin
J.Liss27-Nov-02 7:29
J.Liss27-Nov-02 7:29 
Generalowner draw of listview and treeview Pin
Shaun Wilde26-Nov-02 3:21
Shaun Wilde26-Nov-02 3:21 
GeneralRe: owner draw of listview and treeview Pin
Matze26-Nov-02 5:29
Matze26-Nov-02 5:29 
GeneralRe: owner draw of listview and treeview Pin
Stephane Rodriguez.26-Nov-02 5:36
Stephane Rodriguez.26-Nov-02 5:36 
Questioncan c# have object* ? Pin
Anonymous26-Nov-02 2:49
Anonymous26-Nov-02 2:49 
AnswerRe: can c# have object* ? Pin
leppie26-Nov-02 6:26
leppie26-Nov-02 6:26 
AnswerRe: can c# have object* ? Pin
Eric Gunnerson (msft)26-Nov-02 9:38
Eric Gunnerson (msft)26-Nov-02 9:38 
GeneralRe: can c# have object* ? Pin
Anonymous26-Nov-02 14:51
Anonymous26-Nov-02 14:51 
GeneralRe: can c# have object* ? Pin
Eric Gunnerson (msft)27-Nov-02 12:46
Eric Gunnerson (msft)27-Nov-02 12:46 
AnswerRe: can c# have object* ? Pin
Andy Smith27-Nov-02 16:24
Andy Smith27-Nov-02 16:24 
GeneralNONCLIENTMETRICS marshalling Pin
Matze25-Nov-02 20:31
Matze25-Nov-02 20:31 
GeneralRe: NONCLIENTMETRICS marshalling Pin
leppie25-Nov-02 22:49
leppie25-Nov-02 22:49 
GeneralRe: NONCLIENTMETRICS marshalling Pin
Matze25-Nov-02 23:07
Matze25-Nov-02 23:07 
Hi leppie,
thanks for the answer!

leppie wrote:
bool b = SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, ncm, 0);

The declaration and method calls doesnt match! Why are you passing ncm.cbSize. Some functions however need to be called twice. 1st to find out what size parameter they need, 2nd the actuall call. this mite be the case. See if values from other paramters change during the call.


Hmm, the documentation states that for the GETNONCLIENTMAETRICS action the size of NCM must be told as second parameter, that's why I passed it (and so does MS, as one can see in the Decompiler;)). Actually, when I pass anything else than 340 (==Marshall..;)) the function returns false. No values are changed, unfortunately Cry | :((


leppie wrote:
public NONCLIENTMETRICS()
{
cbSize = 340;
}

arrrg! Replace with

cbSize = Marshal.SizeOf(this);


Yepp, of course I did this, but I thought a number is more informative in the message Wink | ;)
GeneralRe: NONCLIENTMETRICS marshalling Pin
Stephane Rodriguez.25-Nov-02 23:48
Stephane Rodriguez.25-Nov-02 23:48 
GeneralRe: NONCLIENTMETRICS marshalling Pin
Matze26-Nov-02 0:16
Matze26-Nov-02 0:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.