flat assembler
Message board for the users of flat assembler.

Index > Windows > Dialog Box as a Main Window not working

Author
Thread Post new topic Reply to topic
Inagawa



Joined: 24 Mar 2012
Posts: 153
Inagawa 30 May 2012, 21:27
Hi there, I have been following Iczelion's tutorials (translating it to 64 along the way) and I've come across the Dialog Boxes. But I have a strange problem (shown in the screenshot below).

I am posting my exact source code, please help me, I have been sitting over this forever and the damn tutorial even just copy-pasted has the exact same issue.

In case the screenshot doesn't make it clear - the "window" has no borders, cannot be closed, the second editbox and button are just unclickable ghosts... It's just weird


Last edited by Inagawa on 01 Jun 2012, 18:13; edited 1 time in total
Post 30 May 2012, 21:27
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 30 May 2012, 21:51
You are not returning false or true. My suggestion is that you follow the model in the FASM package and read a little bit on MSDN.

Your styles might also be messed up. Use defined styles i.e(WS_OVERLAPPEDWINDOW) not numeric ones unless you memorized them all.
Post 30 May 2012, 21:51
View user's profile Send private message Reply with quote
Inagawa



Joined: 24 Mar 2012
Posts: 153
Inagawa 30 May 2012, 22:04
Ha, return of 0 did the trick, I can't believe it!

I'll take the advice to heart, I was just trying to save some space. Thanks a lot
Post 30 May 2012, 22:04
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 30 May 2012, 22:16
Glad you got it working. Very Happy
Post 30 May 2012, 22:16
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1619
Location: Toronto, Canada
AsmGuru62 31 May 2012, 15:46
@Inagawa: using my commenting style?.. nicely readable code!
Post 31 May 2012, 15:46
View user's profile Send private message Send e-mail Reply with quote
Inagawa



Joined: 24 Mar 2012
Posts: 153
Inagawa 31 May 2012, 20:26
Yes, I loved the comments I saw in your code. Razz
Post 31 May 2012, 20:26
View user's profile Send private message Reply with quote
Inagawa



Joined: 24 Mar 2012
Posts: 153
Inagawa 01 Jun 2012, 18:10
I can't figure out how to check for the EN_UPDATE notification code.

I have my code something like this:

Code:
  cmp          [wMsg], WM_COMMAND
  je           .Message_Command

.Message_Command:
  ;
  ; IDI_EDITBOX is the ID of the EditBox for which I want the EN_UPDATE
  ;
  cmp          [wParam], EN_UPDATE shl 8 or IDI_EDITBOX 
  je           .Command_EditBoxUpdate
    


Am I doing it wrong? The "shl 8 or" business works for checking if a button was clicked, but this notification isn't firing at all. I wouldn't be asking if I didn't already try all I could think of.
Post 01 Jun 2012, 18:10
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1619
Location: Toronto, Canada
AsmGuru62 01 Jun 2012, 19:17
"shl 16" should fix it.

Laughing button click works because BN_CLICKED is 0, so no matter where you SHL it - it is matching!
Post 01 Jun 2012, 19:17
View user's profile Send private message Send e-mail Reply with quote
Inagawa



Joined: 24 Mar 2012
Posts: 153
Inagawa 01 Jun 2012, 19:30
Very Happy I'm glad you're laughing at my problems, this was only the beginning. By the way, I could swear I tried shifting by 16 before and it did nothing. It's like when you can't find something in your drawer and your mother finds it without any problem.
Post 01 Jun 2012, 19:30
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 01 Jun 2012, 20:06
Inagawa wrote:
It's like when you can't find something in your drawer and your mother finds it without any problem.


Like your underwear ? Very Happy Very Happy
Post 01 Jun 2012, 20:06
View user's profile Send private message Reply with quote
Inagawa



Joined: 24 Mar 2012
Posts: 153
Inagawa 01 Jun 2012, 20:12
Lol I didn't mean anything specific.
Post 01 Jun 2012, 20:12
View user's profile Send private message 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.