Hello 
Author Message
 Hello

Is anyone getting my posts?  I have asked for help 3 times and not gotten
any reply at all.  Are my posts getting out???


Thu, 23 May 2002 03:00:00 GMT  
 Hello
After ~2weeks..
Quote:

>Is anyone getting my posts?  I have asked for help 3 times and not gotten
>any reply at all.  Are my posts getting out???



Thu, 23 May 2002 03:00:00 GMT  
 Hello
You only asked the question on 11/28 ("why doesn't this equate work?")

You followed up on 12/2 stating you had used your son's e-mail account

There was no third request I could find, until today's (12/5) which simply
said you had no answer after three tries.

It's not unusual to wait a couple of days, especially over a weekend.
Actually, it's not without precedent to not get an answer, period.

I just looked at your problem. You do not combine %WS_TOP or any other
constants in an API call using the plus sign; you use a logical OR.

Your code:
CONTROL ADD OPTION, hDlg,%ID_Frame11, "S",  50, 170, 18, 34,_
                           %BS_TOP + %WS_GROUP + %WS_TABSTOP, 0

Correct version (assuming you want those attributes):
CONTROL ADD OPTION, hDlg,%ID_Frame11, "S",  50, 170, 18, 34,_
                           %BS_TOP OR %WS_GROUP OR %WS_TABSTOP, 0

MCM

You might try posting your equest on the powerbasic Web BBS at
http://www.powerbasic.com

--
Michael Mattias
Tal Systems
Racine WI USA
The views and opinions expressed herein are my own.
As I am self-employed, they also express the views of my employer.

Quote:

>Is anyone getting my posts?  I have asked for help 3 times and not gotten
>any reply at all.  Are my posts getting out???



Fri, 24 May 2002 03:00:00 GMT  
 Hello
    Thank you very much!!! actually my first post was on 11/23 followed by
my reply to myself on 11/28 followed by my reply to my reply on 12/2.   I do
apologize to the group as a whole if I sounded impatient and petulant.  I
was really beginning to wonder if my posts were even getting out!
    Again Michael I appreciate your reply and help I'm going to go try it
right now.  I guess I was just assuming the + sign and the OR were
equivalent.  I had been using the plus sign in the following DIALOG NEW
statement and it was working.  I got my minimize button, maximize button,
Thick border and system.
  DIALOG NEW 0, "Meal Planning Program", ,, 240, 120, %WS_SYSMENU + _
                            %WS_MAXIMIZEBOX + %WS_MINIMIZEBOX + _
                                              %WS_THICKFRAME  , 0 TO hDlg


Quote:
> You only asked the question on 11/28 ("why doesn't this equate work?")

> You followed up on 12/2 stating you had used your son's e-mail account

> There was no third request I could find, until today's (12/5) which simply
> said you had no answer after three tries.

> It's not unusual to wait a couple of days, especially over a weekend.
> Actually, it's not without precedent to not get an answer, period.

> I just looked at your problem. You do not combine %WS_TOP or any other
> constants in an API call using the plus sign; you use a logical OR.

> Your code:
> CONTROL ADD OPTION, hDlg,%ID_Frame11, "S",  50, 170, 18, 34,_
>                            %BS_TOP + %WS_GROUP + %WS_TABSTOP, 0

> Correct version (assuming you want those attributes):
> CONTROL ADD OPTION, hDlg,%ID_Frame11, "S",  50, 170, 18, 34,_
>                            %BS_TOP OR %WS_GROUP OR %WS_TABSTOP, 0

> MCM

> You might try posting your equest on the PowerBASIC Web BBS at
> http://www.powerbasic.com



Fri, 24 May 2002 03:00:00 GMT  
 Hello


Quote:
>     Thank you very much!!! actually my first post was on 11/23 followed by
> my reply to myself on 11/28 followed by my reply to my reply on 12/2.   I
do
> apologize to the group as a whole if I sounded impatient and petulant.  I
> was really beginning to wonder if my posts were even getting out!
>     Again Michael I appreciate your reply and help I'm going to go try it
> right now.  I guess I was just assuming the + sign and the OR were
> equivalent.  I had been using the plus sign in the following DIALOG NEW
> statement and it was working.  I got my minimize button, maximize button,
> Thick border and system.
>   DIALOG NEW 0, "Meal Planning Program", ,, 240, 120, %WS_SYSMENU + _
>                             %WS_MAXIMIZEBOX + %WS_MINIMIZEBOX + _
>                                               %WS_THICKFRAME  , 0 TO hDlg

Actually, if you are using bit flags then either "+" or "or" will work. By
bit flag I mean that each constant is a number representing a singe bit in a
byte or word or other integer value -- for example, 1, 2, 4, 8, 16, etc.
When these types of bit flags are combined using addition, the result is
USUALLY the same as a logical OR.  I say usually because of the following:

%BIT1 = 1
%BIT2 = 2
%BIT3 = 4
%BIT4 = 8

' The next two lines are equivalent -- the result is 15

PRINT %BIT1 + %BIT2 + %BIT3 + %BIT4

PRINT %BIT1 OR %BIT2 OR %BIT3 OR %BIT4

' However, the next two lines are not equivalent.

PRINT %BIT1 + %BIT2 + %BIT3 + %BIT4 + %BIT1

PRINT %BIT1 OR %BIT2 OR %BIT3 OR %BIT4 OR %BIT1

' The first produces a result of 16, the second a result of 15

The difference is due to the effect of ORing %BIT1 twice (the result is
still turning on the 1 bit) versus ADDing %BIT1 twice.

Most programmers use OR to set these kind of flags to avoid potential
errors.

In your code, I see no such error, so you should investigate other
possibilities.

Scott



Fri, 24 May 2002 03:00:00 GMT  
 Hello
    Thanks for the reply and your explanation of why it is good coding
practice to use the OR instead of the plus sign.  I will in the future use
the OR.

    I have indeed tried using OR instead of + and it still doesn't work
below is a copy of what I'm trying to do:

FUNCTION New_Customer () AS LONG

    LOCAL hDlg AS LONG
    DIM Patient AS LOCAL STRING
    LOCAL result AS LONG
    DIM separator AS LOCAL STRING

    separator = STRING$(74,"_")

    DIALOG NEW 0, "Family Entry Screen", , , 320, 240, %WS_SYSMENU + _
               %WS_MAXIMIZEBOX , 0 TO hDlg

    CONTROL ADD LABEL  , hDlg,              -1,         "Sex",_
                            2, 140,  45,  12, %SS_RIGHT
    CONTROL ADD OPTION, hDlg,%ID_Sex11, "M", 50, 140, 18, 14,_
                        %WS_GROUP + %BS_RIGHT + %WS_TABSTOP, 0
    CONTROL ADD OPTION, hDlg,%ID_Sex12, "F", 75, 140, 20, 14,_
                                                 %BS_RIGHT , 0

    CONTROL ADD LABEL  , hDlg,              -1,       "Frame",_
                            2, 170,  45,  12, %SS_RIGHT
    CONTROL ADD OPTION, hDlg,%ID_Frame11, "S",  50, 170, 18, 14,_
                            %BS_TOP + %WS_GROUP + %WS_TABSTOP, 0
    CONTROL ADD OPTION, hDlg,%ID_Frame12, "M",  75, 170, 20, 14,_
                                                       %BS_TOP , 0
    CONTROL ADD OPTION, hDlg,%ID_Frame13, "L", 100, 170, 20, 14,_
                                                     %BS_TOP , 0

    CONTROL ADD LABEL  , hDlg,              -1,    "Activity",_
                            2, 185,  45,  12, %SS_RIGHT
    CONTROL ADD OPTION, hDlg,%ID_Activity11, "1",  50, 185, 18, 54,_
                            %BS_TOP OR %WS_GROUP OR %WS_TABSTOP, 0
    CONTROL ADD OPTION, hDlg,%ID_Activity12, "2",  75, 185, 20, 54,_
                                                     %BS_TOP , 0
    CONTROL ADD OPTION, hDlg,%ID_Activity13, "3", 100, 185, 20, 54,_
                                                     %BS_TOP , 0
    CONTROL ADD OPTION, hDlg,%ID_Activity14, "4", 125, 185, 18, 54,_
                                                     %BS_TOP , 0
    CONTROL ADD OPTION, hDlg,%ID_Activity15, "5", 150, 185, 20, 54,_
                                                   %BS_TOP , 0

    DIALOG SHOW MODAL hDlg

END FUNCTION

The reason I have the yy parameter for the Activity level controls set at 54
is I felt the problem might be I didn't have enough height to include both
the radio button and the label.

Quote:
> >     Thank you very much!!! actually my first post was on 11/23 followed
by
> > my reply to myself on 11/28 followed by my reply to my reply on 12/2.
I
> do
> > apologize to the group as a whole if I sounded impatient and petulant.
I
> > was really beginning to wonder if my posts were even getting out!
> >     Again Michael I appreciate your reply and help I'm going to go try
it
> > right now.  I guess I was just assuming the + sign and the OR were
> > equivalent.  I had been using the plus sign in the following DIALOG NEW
> > statement and it was working.  I got my minimize button, maximize
button,
> > Thick border and system.
> >   DIALOG NEW 0, "Meal Planning Program", ,, 240, 120, %WS_SYSMENU + _
> >                             %WS_MAXIMIZEBOX + %WS_MINIMIZEBOX + _
> >                                               %WS_THICKFRAME  , 0 TO
hDlg

> Actually, if you are using bit flags then either "+" or "or" will work. By
> bit flag I mean that each constant is a number representing a singe bit in
a
> byte or word or other integer value -- for example, 1, 2, 4, 8, 16, etc.
> When these types of bit flags are combined using addition, the result is
> USUALLY the same as a logical OR.  I say usually because of the following:

> %BIT1 = 1
> %BIT2 = 2
> %BIT3 = 4
> %BIT4 = 8

> ' The next two lines are equivalent -- the result is 15

> PRINT %BIT1 + %BIT2 + %BIT3 + %BIT4

> PRINT %BIT1 OR %BIT2 OR %BIT3 OR %BIT4

> ' However, the next two lines are not equivalent.

> PRINT %BIT1 + %BIT2 + %BIT3 + %BIT4 + %BIT1

> PRINT %BIT1 OR %BIT2 OR %BIT3 OR %BIT4 OR %BIT1

> ' The first produces a result of 16, the second a result of 15

> The difference is due to the effect of ORing %BIT1 twice (the result is
> still turning on the 1 bit) versus ADDing %BIT1 twice.

> Most programmers use OR to set these kind of flags to avoid potential
> errors.

> In your code, I see no such error, so you should investigate other
> possibilities.

> Scott



Fri, 24 May 2002 03:00:00 GMT  
 Hello
Have you tried searching for the API call in Microsoft's knowledge base?  
Perhaps it's no possible to do, or there is some kind of bug in Windows.

--Dave



Sat, 25 May 2002 03:00:00 GMT  
 Hello
Hello Dave,
    It is supposed to be part of the CONTROL ADD OPTION statement.  It is
one of the style& options.  To be quite honest with you, while I am
confident and proficient in DOS based programming, I am fairly new to
Windows programming.

Tom


Quote:
> Have you tried searching for the API call in Microsoft's knowledge base?
> Perhaps it's no possible to do, or there is some kind of bug in Windows.

> --Dave



Sun, 26 May 2002 03:00:00 GMT  
 Hello
Thanks for your suggestion Michael.  I posted the message on the Power Basic
chat boards and did indeed get an answer.  Not the answer I wanted maybe but
it works and how I could have overlooked such a simple fix is beyond me,
(brain freeze)  All I had to do was print the text using an additional
CONTROL ADD LABEL statement wherever I wanted it, ie above or below the
radio button:
  CONTROL ADD LABEL  , hDlg,              -1,       "Frame",_
                          2, 185,  45,  12, %SS_RIGHT
  CONTROL ADD LABEL  , hDlg,              -1,         "S",_
                         51, 180,  45,  12, %SS_LEFT
  CONTROL ADD LABEL  , hDlg,              -1,         "M",_
                         67, 180,  15,  12, %SS_LEFT
  CONTROL ADD LABEL  , hDlg,              -1,         "L",_
                         83, 180,  15,  12, %SS_LEFT
  CONTROL ADD OPTION, hDlg,%ID_Frame11, "",  50, 187, 10, 14,_
                          %BS_TOP OR %WS_GROUP OR %WS_TABSTOP, 0
  CONTROL ADD OPTION, hDlg,%ID_Frame12, "",  65, 187, 10, 14,_
                                                   %BS_TOP , 0
  CONTROL ADD OPTION, hDlg,%ID_Frame13, "",  80, 187, 10, 14,_
                                                   %BS_TOP , 0
Quote:
> You only asked the question on 11/28 ("why doesn't this equate work?")

> You followed up on 12/2 stating you had used your son's e-mail account

> There was no third request I could find, until today's (12/5) which simply
> said you had no answer after three tries.

> It's not unusual to wait a couple of days, especially over a weekend.
> Actually, it's not without precedent to not get an answer, period.

> I just looked at your problem. You do not combine %WS_TOP or any other
> constants in an API call using the plus sign; you use a logical OR.

> Your code:
> CONTROL ADD OPTION, hDlg,%ID_Frame11, "S",  50, 170, 18, 34,_
>                            %BS_TOP + %WS_GROUP + %WS_TABSTOP, 0

> Correct version (assuming you want those attributes):
> CONTROL ADD OPTION, hDlg,%ID_Frame11, "S",  50, 170, 18, 34,_
>                            %BS_TOP OR %WS_GROUP OR %WS_TABSTOP, 0

> You might try posting your equest on the PowerBASIC Web BBS at
> http://www.powerbasic.com



Mon, 27 May 2002 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Hello Smalltalk, bye bye Java (was Sprint: Hello Java, bye bye Smalltalk)

2. coding "hello /options" (hello-world)

3. 'hello' == 'hello' answers true

4. 'hello' == 'hello' answers true

5. Hello Topspeed.... Hello Topspeed .... is anyone home?

6. Hello? Hello?

7. Hello!

8. Hello, world!

9. Hello

10. Spook SAYS HELLO?

11. Hello!?

 

 
Powered by phpBB® Forum Software