Carl,
I had a go with BCXDevSuite and there are a number of issues.
You are using bcx 7.1.7 but include an ancient bcx help file.
The biggest problem I see is you are using a Windows callback routine but create the window with CreateDialog.
Take a look at translated "c" source from the dlgtest.bas example included with bc9adp.(compiles fine with bcx 7.1.7)
Dialog callbacks never call DefWindowProc
Note BCX_MDIALOG and BCX_DIALOG are broken. There was a Yahoo bcx group thread awhile ago.
There is a way to use the method you have now
register a windows class and then use that in the resource dialog.
James
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You would know more about this than I but I did this:
The BEGIN/END EVents creates the wndProc process so I use that as the callback for all windows. In the testing I have done this seems to work a treat even if it is not exactly how it should be done.
Don't get me wrong, I bow to your superior knowledge of C/CPP in Windows so would you suggest an alternative callback?
Thanks
Carl
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Again, my Windows experience is limited. This is what I read on MSDN.
Calls the default window procedure to provide default processing for any window messages that an application does not process. This function ensures that every message is processed. DefWindowProc is called with the same parameters received by the window procedure.
So I am assuming somewhat:
1) As long as we process all messages that out app needs we should be ok anyway?
2) Can I just and a catchall at the end of the event loop in BCX (WndProc) that if it the message hasn't been picked up then it calls DelWindowProc?
Your thoughts are appreciated.
Thanks
Carl
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Carl,
While it is possible to use bcx and it's associated BCX_XXX intrinsics without much of a Windows or "c" foundation you will NEED to study up on both before you try your hand at code generation/manipulation.
My c is fair and my c++ is still in the noob stage.
My Windows knowledge is fair but I am not a teacher. I will help where I can but you must do your part and get some basic Windows foundation. Petzold's "Programming Windows" is the bible.
As to BCX specifics BEGIN / END EVENTS is a callback for a BCX_FORM.
A BCX_FORM is created with the Windows CreateWindowEx function call.
Search MSDN for the difference between a Dialog call back and a CreateWindowEx call back.
I posted an example of how to use a Dialog script as a regular window on the forum.
I just noticed no reference in the latest BCX help file on:
BEGIN DIALOG
BEGIN MODAL DIALOG
???
James
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A couple of observations. I assume you referring to defdlgproc as i am cresting each window as a dialog rather than createwindow. Secondly, if tgat isnt getting called and i havent coded for wm_paint messages, how does the 'form' get 'painted' if not by the default processing?
I am confused.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Carl,
This observation is from viewing the generated "c" code from the GUI_DEMO.
In the LOAD_IDD_MAIN function you call CreateDialog to create your window.
On this page: https://msdn.microsoft.com/en-us/library/windows/desktop/ms644996(v=vs.85).aspx
check out the Creating a Modeless Dialog Box callback procedure. It does not call DefWindowProc.
You should only use DefWindowProc on a "Window" callback created with CreateWindowEx.
The intrinsic BCX_FORM creates a window using CreateWindowEx and the BEGIN/END EVENTS is the callback for it.
James
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey,
i want to say that if guys want to downlad games in arabic language today i have found an amazing site that provide free games in arabic language Wifi4games
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
تحميل لعبة جاتا 5 للكمبيوتر من تورنت
لعبة grand theft auto v torrent هي واحدة من ألعاب الفيديو الأكثر شهرة والتي تحظى بشعبية هائلة في جميع أنحاء العالم. تعتبر هذه اللعبة من نوع الحركة والمغامرة، وقد طورها فريق Rockstar North ونشرتها شركة Rockstar Games.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Carl,
I had a go with BCXDevSuite and there are a number of issues.
You are using bcx 7.1.7 but include an ancient bcx help file.
The biggest problem I see is you are using a Windows callback routine but create the window with CreateDialog.
Take a look at translated "c" source from the dlgtest.bas example included with bc9adp.(compiles fine with bcx 7.1.7)
Dialog callbacks never call DefWindowProc
Note BCX_MDIALOG and BCX_DIALOG are broken. There was a Yahoo bcx group thread awhile ago.
There is a way to use the method you have now
register a windows class and then use that in the resource dialog.
James
James
You would know more about this than I but I did this:
The BEGIN/END EVents creates the wndProc process so I use that as the callback for all windows. In the testing I have done this seems to work a treat even if it is not exactly how it should be done.
Don't get me wrong, I bow to your superior knowledge of C/CPP in Windows so would you suggest an alternative callback?
Thanks
Carl
James
Again, my Windows experience is limited. This is what I read on MSDN.
Calls the default window procedure to provide default processing for any window messages that an application does not process. This function ensures that every message is processed. DefWindowProc is called with the same parameters received by the window procedure.
So I am assuming somewhat:
1) As long as we process all messages that out app needs we should be ok anyway?
2) Can I just and a catchall at the end of the event loop in BCX (WndProc) that if it the message hasn't been picked up then it calls DelWindowProc?
Your thoughts are appreciated.
Thanks
Carl
Carl,
While it is possible to use bcx and it's associated BCX_XXX intrinsics without much of a Windows or "c" foundation you will NEED to study up on both before you try your hand at code generation/manipulation.
My c is fair and my c++ is still in the noob stage.
My Windows knowledge is fair but I am not a teacher. I will help where I can but you must do your part and get some basic Windows foundation. Petzold's "Programming Windows" is the bible.
As to BCX specifics BEGIN / END EVENTS is a callback for a BCX_FORM.
A BCX_FORM is created with the Windows CreateWindowEx function call.
Search MSDN for the difference between a Dialog call back and a CreateWindowEx call back.
I posted an example of how to use a Dialog script as a regular window on the forum.
I just noticed no reference in the latest BCX help file on:
BEGIN DIALOG
BEGIN MODAL DIALOG
???
James
A couple of observations. I assume you referring to defdlgproc as i am cresting each window as a dialog rather than createwindow. Secondly, if tgat isnt getting called and i havent coded for wm_paint messages, how does the 'form' get 'painted' if not by the default processing?
I am confused.
They also dont create a custom class so isnt all default processing taken care of in default class?
Carl,
This observation is from viewing the generated "c" code from the GUI_DEMO.
In the LOAD_IDD_MAIN function you call CreateDialog to create your window.
On this page:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms644996(v=vs.85).aspx
check out the Creating a Modeless Dialog Box callback procedure. It does not call DefWindowProc.
You should only use DefWindowProc on a "Window" callback created with CreateWindowEx.
The intrinsic BCX_FORM creates a window using CreateWindowEx and the BEGIN/END EVENTS is the callback for it.
James
Carl,
If you use
BEGIN DIALOG AS WndProc
END DIALOG
instead of
BEGIN EVENTS / END EVENTS
I believe it creates the correct code.
James
James,
Where to look for that example?
Ad,
http://www.bcxbasic.com/smf/index.php?topic=887.0
James
Hey,
i want to say that if guys want to downlad games in arabic language today i have found an amazing site that provide free games in arabic language Wifi4games
تحميل لعبة جاتا 5 للكمبيوتر من تورنت
لعبة grand theft auto v torrent هي واحدة من ألعاب الفيديو الأكثر شهرة والتي تحظى بشعبية هائلة في جميع أنحاء العالم. تعتبر هذه اللعبة من نوع الحركة والمغامرة، وقد طورها فريق Rockstar North ونشرتها شركة Rockstar Games.