flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
frech 24 Mar 2009, 07:10
Hi to everybody!
First of all thanks for anyone who helped me with my first problem about getting HIWORD(wparam) and LOWORD(wparam). Now I'm facing with a similar problem: I decided to convert my application into an MDI one, but now I need a "local" flag to NotSaved state. By "local" I mean a flag who "belongs" to any child windows, and not a "global" flag for all the program, otherwise if I set that flag to TRUE one time for a date child window, it will be TRUE even for all the other children windows. I discovered for example Code: invoke GetWindowLong,[hwnd],GWL_USERDATA Any tip?
Last edited by frech on 14 Apr 2009, 07:37; edited 3 times in total |
|||||||||||
![]() |
|
frech 07 Apr 2009, 12:24
Thx, bitshifter.
I one way or oneother, now I'm able to set that variable, and I solved the problem. Now I wonder if I can just set a variable or if I can also check its value. I mean, in this editor I set GWL_USERDATA to Saved or NotSaved according to the state of the child control, but with this method can I use just one variable "State" and change its value from TRUE to FALSE or viceversa? |
|||
![]() |
|
bitshifter 07 Apr 2009, 15:35
SetWindowLong returns the previous value.
|
|||
![]() |
|
frech 08 Apr 2009, 09:45
But only of that variable, I suppose. I mean, if I use
Code: invoke SetWindowLong,[hwnd],GWL_USERDATA,[variable] Code: invoke SetWindowLong,[hwnd],GWL_USERDATA,[variable2] Code: invoke GetWindowLong,[hwnd],GWL_USERDATA So, I think I should set a [struct] instead of [variable] and [variable2], so when I invoke GetWindowLong I would retrieve the whole [struct] and I'd be able to check the values of its elements, is this correct? |
|||
![]() |
|
frech 09 Apr 2009, 09:21
I solved the problem, sending EM_SETMODIFY and EM_GETMODIFY messages instead of invoking SetWindowLong and GetWindowLong.
Thx. |
|||
![]() |
|
frech 09 Apr 2009, 13:28
I solved the problem sending EM_SETMODIFY and EM_GETMODIFY messages instead of invoking SetWindowLong and GetWindowLong. Thx.
But now I'm facing with a new problem (what's life without a bit of spice? ![]() The new problem is that if I open a file and then close it without editing it, it closes, but if I open two files and ask to close them all, again without any modification, only the first one closes, but the other asks me for a confirm. Also new, untitled child windows ask me for the same confirm, even if I set EM_SETMODIFY to FALSE... ![]() Any hint?
|
|||||||||||
![]() |
|
frech 09 Apr 2009, 13:49
I'm also looking at the source of MDIRichEdit by habran, but still I can't figure how to solve this bug...
|
|||
![]() |
|
frech 14 Apr 2009, 07:37
Bug fixed. I just needed to send an EM_SETEVENTMASK message with EN_CHANGE as parameter, and now all is ok.
Thx! |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.