Discussion:
Win Vista and PBWIN
(too old to reply)
Lisco
2007-06-09 02:30:43 UTC
Permalink
Anybody experienced pblms doing the usual coding in vista environment. Ie
getting the common dialogs to work?? Been using the color common dialog
feature under xp & now can't with vista.
Any serious suggestions?


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Michael Mattias
2007-06-09 13:33:32 UTC
Permalink
Been using the color common dialog feature under xp & now can't with
vista.
Color common dialog? Which common dialog (GetOpenFilename, GetSaveFilename,
PrintDlg, something else)?

Oh, wait a minute... you mean the ChooseColor common dialog?

As per doc at http://msdn2.microsoft.com/en-us/library/ms646830.aspx and
http://msdn2.microsoft.com/en-us/library/ms646375.aspx, what does
ComDlgExtendedError tell you when code fails?

Show compiler version and failing code. Did you initialize the common
controls?
--
Michael C. Mattias
Tal Systems Inc.
Racine WI
***@talsystems.com
Lisco
2007-06-09 17:57:39 UTC
Permalink
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)

Vista stops program when event occurs (before dialog shows) and reports

Problem signature:
Problem Event Name: APPCRASH
Application Name: vista-editor.exe
Application Version: 0.0.0.0
Application Timestamp: 00003039
Fault Module Name: COMDLG32.DLL
Fault Module Version: 6.0.6000.16386
Fault Module Timestamp: 4549bd09
Exception Code: c0000005
Exception Offset: 00029a85
OS Version: 6.0.6000.2.0.0.768.3
Locale ID: 1033
Additional Information 1: 9f25
Additional Information 2: c028af6e3484f1adf8c2bd7b9046e0b5
Additional Information 3: 3694
Additional Information 4: f1e1dcf1a1acb478ef523df0675fbbad


PBwin 8.03 debugger reports
Exception: Memory Access Violation
Program tried to read or write an invalid memory address
End Debug at 12:45:28 PM on 6/9/2007


The best I can do sofar.. not a professional programmer.
Post by Michael Mattias
Been using the color common dialog feature under xp & now can't with
vista.
Color common dialog? Which common dialog (GetOpenFilename,
GetSaveFilename, PrintDlg, something else)?
Oh, wait a minute... you mean the ChooseColor common dialog?
As per doc at http://msdn2.microsoft.com/en-us/library/ms646830.aspx and
http://msdn2.microsoft.com/en-us/library/ms646375.aspx, what does
ComDlgExtendedError tell you when code fails?
Show compiler version and failing code. Did you initialize the common
controls?
--
Michael C. Mattias
Tal Systems Inc.
Racine WI
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Michael Mattias
2007-06-09 20:22:28 UTC
Permalink
Post by Lisco
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......
Post by Lisco
Vista stops program when event occurs (before dialog shows) and reports
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.
Post by Lisco
PBwin 8.03 debugger reports...
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
***@talsystems.com
Ian Spencer
2007-06-11 07:17:53 UTC
Permalink
Post by Michael Mattias
Post by Lisco
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......
Post by Lisco
Vista stops program when event occurs (before dialog shows) and reports
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.
Post by Lisco
PBwin 8.03 debugger reports...
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
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
Smitty
2007-06-16 23:53:21 UTC
Permalink
Thanks Ian... I guess I'm looking too hard for trouble with Vista.
I forgot to provide the address of the 16 custom color array..
I put it in & works fine now. Was in too big a hurry I guess
Post by Ian Spencer
Post by Michael Mattias
Post by Lisco
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......
Post by Lisco
Vista stops program when event occurs (before dialog shows) and reports
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.
Post by Lisco
PBwin 8.03 debugger reports...
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
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
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Loading...