Hi! KetilO
I've resolved the problem about toggling toolbar, thanks you very very much!

I found problem when use RadASM, I associated asm, rc file with RadASM, when I open a asm file in RadASM, thu dblclicking a asm file, after it, i dblclicking another asm file, RadASM will create a new instance, I consider it a mistake, As MDI application, when open one more file, it should be open a MDI child window, KetilO, you should add some code to check if have a instance is running.

In addition, I cannot completely accepted ur explanation about API CreateDialogParam, close find or replace dialog use ENDDIALOG, but in MSDN, close it use DestroyWindow function, can U give me more detailed explanation

The message loop serves the main window and also the find / replace dialog. It is not neccessary to create a new message loop to serv the find / replace dialog.
Posted on 2002-02-20 08:27:31 by dREAMtHEATER
Hi dREAMtHEATER

I think a lot of RasASM users, including me, disagree with you on single instance. I often open more than one project to copy / paste code. I don't want to loose this.

KetilO
Posted on 2002-02-20 11:47:20 by KetilO
Hi KetilO
My meaning is that I can open files in the MDI child window of single instance of RadASM , the MDI child window can create as many as what I want, in case, i can change MDI window use "tab select", it's more convenient. at least, u can give me a chance to set this option.

In addition, this project updates so quickly, every time I must change your default option in the RasASM.ini and masm.ini when I install new version, it's so boring, I advice you save these option in the registry and make a installer check if previous version have been installed, so change only it should do.

Maybe I am stupid, I hope you give me more about CreateDialogParam
Posted on 2002-02-20 12:23:00 by dREAMtHEATER
Couldn't you create a shell program that you use to execute RadASM that only allows one? It would be a handy tool.
Posted on 2002-02-20 12:31:45 by bitRAKE
Hi dREAMtHEATER & bitRAKE

To my knowledge EndDialog calls DestroyWindow. Maybe I misunderstand your question, but I think I alredy have explained the best way I can. Like you English is not my native language.

A way to open multiple files in the MDI already exist (Open File). Is another way really needed?

Starting from the release of the 1.1.0 version, RadASM will maintain the ini files (I hope).

KetilO
Posted on 2002-02-20 13:20:53 by KetilO
Hi KetilO

Opening file thu "open file" menu is just one way, I can ssociated asm, rc file with RadASM, in this way, if already one instance exists, when i dblclick an asm file in the explorer, it will open another instance, it's so boring, i hope open this file in another new MDI, not in new instance, so you must add code to meet this way

EndDialog can close find dialog, why need DestroyWindow again? u don't like me, I think English and Norwegian come from the same root, but I say east language, it's another world.

the previous version of 1.1.0 don't crash again, I think it is the best IDE I ever used, give U the bigger support
Posted on 2002-02-20 13:53:16 by dREAMtHEATER
Hi dREAMtHEATER

Opening file thu "open file" menu is just one way, I can ssociated asm, rc file with RadASM, in this way, if already one instance exists, when i dblclick an asm file in the explorer, it will open another instance, it's so boring, i hope open this file in another new MDI, not in new instance, so you must add code to meet this way

I do understand what you want, I am just trying to aviod writeing a lot of code to solve a problem that there already is a solution.

EndDialog can close find dialog, why need DestroyWindow again?

Now I am confused. Can you show in code what you mean.

 u don't like me

If you are saying that you believe that I have any reason to dislike you, then it is not true. Disagree / dislike very different thing.

I think English and Norwegian come from the same root, but I say east language, it's another world.

True, but still very different languages. In fact a lot of elderly Norwegians don't understand a single word of English.

the previous version of 1.1.0 don't crash again, I think it is the best IDE I ever used, give U the bigger support

Thanks for your kind words. I need to hear such words from time to time as I am putting a lot of workinghours into this project.

KetilO
Posted on 2002-02-20 16:58:47 by KetilO
Hi KetilO

In ur richedit sample, find or replace is modeless dialog, u destory it use EndDialog, in MSDN wrote:

The EndDialog function destroys a modal dialog box, causing the system to end any processing for the dialog box.

Dialog boxes created by the DialogBox, DialogBoxParam, DialogBoxIndirect, and DialogBoxIndirectParam functions must be destroyed using the EndDialog function. An application calls EndDialog from within the dialog box procedure; the function must not be used for any other purpose.


I cannot understand how the main window message loop serv also the find/replace dialog, I wanna know how the message queue execute when find/replace dialog was destoryed, it maybe first call EndDialog of find/replace message proc--->transfer control to main window message loop ----->call DestroyWindow to destory find/replace dialog, it is my guess, can u give me the correct answer

The explanation in MSDN and the way in ur sample are conflicting each other, can u understand completely what I expressed, I hate my bad bad English.
Posted on 2002-02-20 22:17:58 by dREAMtHEATER
Hi

MSG structure

typedef struct tagMSG { // msg
HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
} MSG;


A typical messageloop

.while TRUE
invoke GetMessage,addr msg,NULL,0,0
.break .if !eax
invoke IsDialogMessage,hFind,addr msg
.if !eax
invoke TranslateMessage,addr msg
invoke DispatchMessage,addr msg
.endif
.endw

As you can see the MSG struct contains a hwnd item. This way windows knows what window (modless dialogbox that has focus, subclassed child window or main window) proc to send the message to (DispatchMessage). The API IsDialogMessage translates commands such as Tab in a modless dialogbox. Like MSDN say you must not destroy a window that is not a dialogbox with EndDialog. You can however destroy a modless dialogbox with DestroyWindow if you ever should want to do that.

KetilO
Posted on 2002-02-21 03:07:33 by KetilO
Hi KetilO
Thanks you for sharing ur knowledge with me, u are great!

The last question about CreateDialogparam I want ask is who is the ture killer when destory the modeless dialog, for instance, in you find/replace dialog proc, is EndDialog or main proc, or with other way?

now I have another question about richedit, I am writing my own richeditor, as u konw, richedit can paste rtf format text, but I just wanna extract the pure text from the clipboard that maybe include rtf format text, then paste it into my richedit control, in this way, I must set the pasted text into the same font style as the other text in the richedit , how do it?

when will the RadASM v1.1.0 come? I am waiting ur news.
Posted on 2002-02-21 04:43:07 by dREAMtHEATER
Hi dREAMtHEATER

In the RichEditEditor example it is EndDialog that destroys the find dialog. MSDN says you should use DestroyWindow, but I have not seen any example that does this with a modless dialogbox, so I assume it is perfectly safe to use EndDialog.

I am not an API guru. You should probably ask this question on the Main forum. What I do in RadASM is to trap the WM_PASTE and paste the text to a hidden edit control and then cut and paste from this to the RichEdit. This was the only way I could find that could paste any text. There probably are better ways to do this. On Win98 the text to paste ar limitted to 64K. If you find a better way, let me know.

When 1.1.0 is ready to be released, I don't know. I am very busy with my real life just now.

KetilO
Posted on 2002-02-21 05:38:05 by KetilO
Thanks for your kind words. I need to hear such words from time to time as I am putting a lot of workinghours into this project.

I frankly think that you are doing work that usually done by team of pros.
And I frankly think that the job have a very good chance to seriously change programming world.
That's why I may be haven't said lots of kind words but wish to
say with all my heart - don't stop Ketil, don't relax, the all general
things is found and done, 98% is over, you need last affort to
finalize things, but without this 2% 98 weights lightly than they
should.
You are about to finish very serious thing. Don't let little details
to spoil greate result you are about to achive.
I'll say it again - it is about to become a very big thing, noticable
not only by asm programmers.
Posted on 2002-02-22 20:57:42 by The Svin
Thanks The Svin

Coming from someone like you gives the words weight. I have not come to the optimizing stage yet. I need a little more speed in my search engine and will have to have a close look at the inner loops. Stability is the most important part and only bug testers can help me here. That it works on my computers does not mean it works on others. It's just the way the M$ world is.

KetilO
Posted on 2002-02-23 02:43:39 by KetilO