Announcement

Collapse
No announcement yet.

adding machine from a listbox

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Resourse files can get Quite involved. I, however, only (at the moment) use them for bitmaps (used primarily with control add imagex) and ICONS (primarily used for the upper left corner of the dialog). A resourse file for an
    icon only is simple.
    The line shown in my code example is a typical line. the file is saved as an RC
    file extension (without the ' of course).

    then in the pb???\bin folder (pb??? being whatever version pbdll60, pbwin80, etc)
    do a rc \fullpath\rc file name
    then
    pbres \fullpath\rc file name

    this makes the pbr file.
    I think version 8.+ will compile them right from the ide, but i am still using a
    bat file i made to compile them called rcres.bat
    assume starting in pbwin80\samples
    cd\PBwin80\bin
    rc \pbwin80\samples\%1
    pbres \pbwin\samples\%1
    cd\pbwin80\samples

    CALLInG SEQUENCE
    RCRES MYRCFILENAME

    there is an example of calling the icon in the source code above.
    Client Writeup for the CPA

    buffs.proboards2.com

    Links Page

    Comment


    • #22
      Paul, is there a way to run the adding machine on win98? or can I alter it simply so that will run? I get a missing call to a .DLL error when I try to run it. If it is a bigger problem than a quick 5-minute fix, don't bother with it. Thanks.

      Comment


      • #23
        >I get a missing call to a .DLL error when I try to run it.

        There 'may' be a workaround...but first.......which DLL, which function is missing?
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #24
          It's a "linked to missing export USER32.DLL:SetLayeredWindowAttributes" error starting program. Maybe if I can just comment out some "layered window" code it will run.

          Comment


          • #25
            John

            i have not test with windows 98.
            i am using windows 2000 professional.

            i am in the middle of altering the way a few of the things are running in the program.
            my current source code is a little unuseable right now but the program at the website is do able.
            if you edit the code, do not make the rows less than 21 best to change it to something more like 999.
            or get and set it from the command line.


            i believe win98 probrably does not do transparency.


            when i get time to do some more changes the new program will be much faster, already is, and the newer program will let you set the number of rows from the command line to up to 9,999,999 rows, what a memory hog huh, but great if you have something like check numbers with large numbers and you are trying to balance out a large checking account using those item numbers.

            I have side tracked myself to altering Fred's code.
            It is very much similar, i am can follow his code easier from the start because it is not using all callback functions. It will have a large tape, addition, subtraction, multiplication, division, maybe square root, memory storage, memory addition, memory subtraction, memory recall, memory clear, repeat either the last number entered and/or repeat last addition and subtraction, maybe change fonts, tape clear, tape total placed in caption,
            fast tape save, retrieved tape from saved, item description, choice to get a subtotal on tape, choice to not hear sound from or hear sound, choice to hear input error or not, etc.

            Just more like a calculator than an adding machine.
            All number and x/+- math functions entered coming from keyboard input only.

            I believe it will get used more than the spreadsheet style adding machine.

            paul

            if i can help you, just shout, i will be tied up the next few days, plus all this gui programming has wore me out.
            Last edited by Paul Purvis; 11 Dec 2007, 02:42 AM.
            p purvis

            Comment


            • #26
              >USER32.DLL:SetLayeredWindowAttributes

              Huh? That should be there on Win/98.

              SDK function Information for SetLayeredWindowAttributes:
              Header Declared in Winuser.h, include Windows.h
              Import library User32.lib
              Minimum operating systems: Included in Windows 95, Windows NT 3.1
              Check the spelling of the lib and alias in your Win32API.INC file against the actual exported name, which can be found by using Show exports and imports for PB/Win 6x, 7x (original by Torsten Reinow) against your installed USER32.DLL. ALIAS is case-sensitive, LIB is not; you may or may not need the explicit ".DLL" file extension in your LIB clause, but it can never hurt to use the extension in the DECLARE statement.
              Last edited by Michael Mattias; 11 Dec 2007, 10:10 AM.
              Michael Mattias
              Tal Systems (retired)
              Port Washington WI USA
              [email protected]
              http://www.talsystems.com

              Comment


              • #27
                it wont run on my winme machine either (basically win98) but runs on winxp ok.
                Client Writeup for the CPA

                buffs.proboards2.com

                Links Page

                Comment


                • #28
                  will have to work on the win98 thing after i other problems solved, thanks for the update.
                  thanks
                  Michael i think i understood what you meant on the alias thing
                  but i could not follow your meaning on your examples for the other right now i will come back to it during when working on win98 problem.
                  paul
                  p purvis

                  Comment


                  • #29
                    Mystery Solved

                    Function info above from my CD version of SDK, 2002 edition

                    Function info from Microsoft on-line SDK info, today:
                    Function Information

                    Minimum DLL Version user32.dll
                    Header Declared in Winuser.h, include Windows.h
                    Import library User32.lib
                    Minimum operating systems Windows 2000
                    Appears to be an error in my 2002 documentation.

                    Regardless, this code ain't gonna work on Win 9x/ME.

                    As an additional unsolicited comment.... I think the #OPTION VERSION5 metastatement should have been used when compiling to provide a somewhat more meaningful "load time" message to the users.

                    MCM
                    Michael Mattias
                    Tal Systems (retired)
                    Port Washington WI USA
                    [email protected]
                    http://www.talsystems.com

                    Comment


                    • #30
                      Originally posted by Michael Mattias View Post
                      >
                      Check the spelling of the lib and alias in your Win32API.INC file against the actual exported name, which can be found by using Show exports and imports for PB/Win 6x, 7x (original by Torsten Reinow) against your installed USER32.DLL. ALIAS is case-sensitive, LIB is not; you may or may not need the explicit ".DLL" file extension in your LIB clause, but it can never hurt to use the extension in the DECLARE statement.
                      No export was found by that name unfortunately. I checked it against my install disk too just in case something happened to USER32.DLL. Very nice utility there btw. (It has a few typos tho.)

                      Added: Ah, ICU solved the quandary. Any thoughts on how to get a better USER32.DLL?
                      Last edited by John Gleason; 11 Dec 2007, 04:09 PM.

                      Comment


                      • #31
                        Well, the only way to do that would be to get Win2000 or greater.

                        Whay you *CAN* do is Define your own SetLayeredWindowAttributes function, which does nothing, and drop the DECLARE of same from Win32API.INC. (Or maybe make a conditional DECLARE in Win32API.INC...

                        Code:
                        %Win9x = 1
                        
                        #IF %WIN9X 
                         FUNCTION SetLayeredWindowAttributes (same params as in DECLARE)
                          FUNCTION = 0
                         END FUNCTION
                        #ELSE
                         DECLARE FUNCTION SetLayeredWindowAttributes  ..<<< existing DECLARE statement)
                        #ENDIF
                        Then the program will compile and run, although it is not going to set layered window attributes.

                        MCM
                        Michael Mattias
                        Tal Systems (retired)
                        Port Washington WI USA
                        [email protected]
                        http://www.talsystems.com

                        Comment


                        • #32
                          If anybody wants to provide me with the code, not an example, to test operating systems and set equate values and if they have problems with certain features, such that transparency may have on an older operating system.

                          i would be more that happy to negate any of those features into the adding machine programs i am creating, and they will be there for the now versions and future versions.

                          paul
                          i would like for my programs to work under win95 and up, but i have spent more time on developing the basics of the main program and testing under windows 2000 and higher.
                          p purvis

                          Comment


                          • #33
                            If anybody wants to provide me with the code, not an example, to test operating systems and set equate values
                            That has to be done at or before compile time, unless your re-code your program to use LoadLibary/GetProcAddress/CALl DWORD for all externals you are not sure are supported.. by which time you could have looked up all the info in your SDK reference.

                            However... there is a tool here which could help you...Show exports and imports for PB/Win 6x, 7x (original by Torsten Reinow)

                            The enhanced version (my post) allows you to generate a "print report" (OK, so it's just a text file) of all the imports actually required by your compiled program. Printing this out will give you a "checklist" to use when you dig into the API documentation to ensure each such import is supported on your choice of target systems.

                            MCM
                            Michael Mattias
                            Tal Systems (retired)
                            Port Washington WI USA
                            [email protected]
                            http://www.talsystems.com

                            Comment


                            • #34
                              Paul,
                              Do you mean like this? OpSys Info Wrapper Win 3.1 up through Vista
                              Although this alone is no solution, only gives the operating system so you can better "ASSUME" if a DLL or a function in a dll exists.

                              As MCM has stated before, Loadlibrary is the way to go. (Although I should get into the habit more myself)
                              Engineer's Motto: If it aint broke take it apart and fix it

                              "If at 1st you don't succeed... call it version 1.0"

                              "Half of Programming is coding"....."The other 90% is DEBUGGING"

                              "Document my code????" .... "WHYYY??? do you think they call it CODE? "

                              Comment


                              • #35
                                thanks Michael and Cliff for the kind responses.

                                Michael i will have to come back to what you have suggested, thanks for responding, i am sure a lot of people received some great points.
                                Michael there where some minor fixes need in the program, if you can get some time, would you mind cut and paste that code and try to compile it under 8.0?
                                Rather than explain you will see what i am seeing and i believe others saw too, thanks.

                                I just wanted to implement something short in the being like Cliff's code.

                                I am rereading the pb for windows manual to get more familiar with all the commands to try to become more efficient with the compiler and more familiar with windows gui programming which i am finally starting to grasp.
                                After rereading the glossary in the manual at this point, all things are being to make more sense.


                                I really never understood that everything done in windows creates a message of one sort or another. Now i have to learn how to interpret those messages and put them to use.

                                Thanks Cliff i will implement that and see if i can get Michael's suggestion to start helping me out. I can only grasp so much information at one time.
                                That adding machine program i am doing is giving me a lot of skills quickly and has provide me a good hands on learning.
                                I have backed away temporary from the paulcalc project and am working on the fredcalc project, which i believe most people would find the most use for.

                                paul
                                Last edited by Paul Purvis; 13 Dec 2007, 01:25 PM.
                                p purvis

                                Comment


                                • #36
                                  Michael there where some minor fixes need in the program, if you can get some time, would you mind cut and paste that code and try to compile it under 8.0?
                                  I have a form letter I send out when I get individual requests like this from any public forum .. I know at least a dozen members here have received it over the years...


                                  DATE

                                  Thank you for your interest in Tal Systems, Inc.

                                  While we do provide software for download and often contribute to newsgroups, we only provide personalized consultation or research on a professional (paid) basis.

                                  If you are interested in engaging Tal Systems for this purpose, you may contact us using the information below.

                                  Thanks and Regards,

                                  MCM
                                  Michael Mattias
                                  Tal Systems (retired)
                                  Port Washington WI USA
                                  [email protected]
                                  http://www.talsystems.com

                                  Comment


                                  • #37
                                    Michael, i just thought you might want to correct some of your errors.

                                    When i post, i also want to make sure that what i post is correct even though
                                    it may contain errors through the process of cutting and pasting.

                                    It is a big turn off to anybody's code that has type errors.
                                    When i compile somebody's else code, i make changes if the errors are caused by incompatible compilers, but if i see where the code has glitches, i stop right there and do not spend any more time on the code.
                                    so your posting was treated this way.
                                    the error in the posting was probably small but how do i know, it was your code.
                                    i perceive you as a perfectionist and a very knowledgeable windows programmer for which i can learn from.
                                    i just wanted to be helpful in code that you pointed out, only helpful.

                                    paul

                                    i will not charge anything here for my professional consulting and advice on others code improvements.
                                    see i do have humor that you thought i did not.
                                    Last edited by Paul Purvis; 14 Dec 2007, 02:18 AM.
                                    p purvis

                                    Comment


                                    • #38
                                      There is a big difference between asking me to correct code I have posted here and asking me to compile your code.

                                      Show me an error in any code I have posted here and I will
                                      A) Acknowledge the error
                                      B) Fix it.

                                      More (relevant) ranting on this subject here: This whine's time has come

                                      MCM
                                      Michael Mattias
                                      Tal Systems (retired)
                                      Port Washington WI USA
                                      [email protected]
                                      http://www.talsystems.com

                                      Comment


                                      • #39
                                        Michael,

                                        I owe you an apology.
                                        I went back and reread my post and it did read as though i was asking you to review and compile my post. That was not my intention when i wrote that. I was referring to one of your post, but my post did not say that.
                                        I am sorry for any time and unpleasantness that i have caused you.

                                        I apologize, please accept my apology.



                                        the code i was referring to is located at
                                        http://www.powerbasic.com/support/pb...70022#poststop
                                        the first two times i tried to compile it, i had to make some edits, but it did not compile. But now i retrieved the code once more making edits and it
                                        apparently compiled successful, but i am not sure my edits where what you had originally coded.
                                        After compiling, i ran that piece of code and as somebody stated above, the program is a nice program that provides some very useful information on an exe. Thanks for sharing that code.

                                        paul
                                        p purvis

                                        Comment


                                        • #40
                                          I see.....that's another one of my demo posts which got converted to new forum software in all lower-case and who knows what other changes.
                                          Michael Mattias
                                          Tal Systems (retired)
                                          Port Washington WI USA
                                          [email protected]
                                          http://www.talsystems.com

                                          Comment

                                          Working...
                                          X