"Michael Mattias" <mmattias@[EMAIL PROTECTED]
> schrieb im Newsbeitrag
news:8_Dai.13363$5j1.4944@[EMAIL PROTECTED]
>> This is the code i'm using which works under up same compiler.
>>
>> DIM cc AS choosecolorapi
>> cc.lstructsize = SIZEOF(cc)
>> cc.hwndowner= CBHNDL
>> cc.flags = %cc_full open OR %cc_rgbinit
>> Choosecolor(cc)
>
> No, it's not. That is not compilable, so it can't be the code. This may
> seem like nitpicking but......
>
>> Vista stops program when event occurs (before dialog shows) and re****ts
>
> Don't assume because the 'crash' occurred on this call that that is
where
> your problem is.
>
> You could have made a mistake somewhere else in your program, but it
just
> didn't show up until this point.
>
> Prove it to yourself by running this program
> #IINCLUDE "Win32API.INC"
> #INCLUDE "COMMCTL.INC"
> FUNCTION PbMain() AS LONG
> InitCommonControls
> LOCAL cc As ChooseColorAPI, Z AS LONG
> cc.lstructsize = SIZEOF(cc)
> cc.hwndowner= GetDesktopWindow() ' OR %NULL
> cc.flags = %cc_full open OR %cc_rgbinit
>
> Z = ChooseColor (CC)
>
> END FUNCTION
>
> If this program runs to conclusion, the ChooseColor Common Dialog is
> working just fine and your problem is elsewhere in your program.
>
>> PBwin 8.03 debugger re****ts...
>
> First thing to do... don't run in stepping debugger. That introduces
> additional code. Just 'compile & execute.' Save the stepping debugger
for
> really tough problems. Besides, not using the stepping debugger teaches
> you the benefits of writing "debuggable" code.
>
> (Last suggestion is NOT a consensus opinion. It is, however, my
opinion.)
>
> --
> Michael C. Mattias
> Tal Systems Inc.
> Racine WI
> mmattias@[EMAIL PROTECTED]
>
>
yes, the rule with difficult problems should always be the same HW or SW
reduce the program to the smallest routine which will produce the error.
Or
HW the smallest possible configuration. It often makes life much easier.
Good luck
Ian Spencer


|