flat assembler
Message board for the users of flat assembler.

Index > Windows > code doesn`t work, help please

Author
Thread Post new topic Reply to topic
veach1



Joined: 16 Jul 2004
Posts: 165
veach1
I`m trying to make switching between tabs working.
What is wrong? I don`t get it. Maybe I just don`t see the mistake.
Help please.


Description:
Download
Filename: 1.zip
Filesize: 1.25 KB
Downloaded: 112 Time(s)


_________________
dream of mind creates a monster
Post 11 Oct 2004, 14:40
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
1. You should pass not processed notification messages to DefWindowProc:

Code:
default:
        invoke DefWindowProc, [hwnd], [wmsg], [wparam], [lparam]
        jmp finish
    


2. on WM_NOTIFY, [lparam] contains pointer to the NMHDR structure. Use it this way:
Code:
        cmp [wparam], IDC_TAB
        jne default
        mov eax, [lparam]
        cmp [eax + NMHDR.code], TCN_SELCHANGE
        jne default

        invoke SendMessage, [htab], TCM_GETCURSEL, 0, 0
    


3. IMHO, you should use more local labels in your sources (those prefixed with ".") and you should work more on your writing style - I mean source should look better and some comments would be just OK. Smile


Regards.
Post 12 Oct 2004, 07:37
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
you can check out my coding style, it may be not the best but i am certain it is not the worse :p

sincerely
sulaiman chang
http://sulaiman.thefreebizhost.com
Post 12 Oct 2004, 07:46
View user's profile Send private message Visit poster's website Reply with quote
veach1



Joined: 16 Jul 2004
Posts: 165
veach1
Everything is working fine. Thank you!

It`s good to have advisors at the distance of stretched hand Smile
Post 12 Oct 2004, 11:52
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
veach1 wrote:
Everything is working fine. Thank you!


You are welcome. Smile

Quote:
It`s good to have advisors at the distance of stretched hand:)


Hm, are you keep your keyboard so far from your hands? Wink

Regards.
Post 12 Oct 2004, 12:52
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
veach1



Joined: 16 Jul 2004
Posts: 165
veach1
Quote:
Hm, are you keep your keyboard so far from your hands? :wink:


not keyboard, but monitor :wink: :)

_________________
dream of mind creates a monster
Post 12 Oct 2004, 13:46
View user's profile Send private message Reply with quote
veach1



Joined: 16 Jul 2004
Posts: 165
veach1
About writing style - I`m trying to divide source into logical blocks, but I see that it`s not so good idea. Is there any tips or patterns (or style rules) for source formatting?
Post 12 Oct 2004, 14:20
View user's profile Send private message Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
try this:
labels at first column, local labels - after 2-5 spaces; instructions after a tab; then press tab once more and write instruction's arguments. I use this method in my programs, it is used in Fresh, and finally in FASM and the examples.
Post 12 Oct 2004, 14:31
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.