|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
ian
Joined: 17 Nov 2006 Posts: 5
|
Posted: Sat Dec 09, 2006 10:52 pm Post subject: Problem understanding the basics? |
|
|
Hi, I’m new to c++, Plato 3 and ClearWin+, are there any internet sites that you can direct me to that have tutorials or sample code to down load using ClearWin+, I have some books on c++ and I’m getting around Plato okay. I am using #pragma windows 500000,500000, #include <windows.h> and #include <dbos\graphics.h> in the header. I am using the instruction ‘winio’. In some of the examples that I have found in you help section you use the instruction ‘ans=winio@’ if I use that I get a compiler error that ‘ans’ has not been declared. I have tried putting 'INCLUDE <windows.ins>' in the header.I think that I’m having a problem knowing what to put in the header, I appreciate that depends on the instruction that you want to use in your program, but why does ‘ans=winio@’ from your help section cause error in this compiler. Should I have loaded a different header? I’m sorry if I’m missing something obvious!! |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon Dec 11, 2006 8:19 am Post subject: |
|
|
Your immediate problem is that ans must be declared in your code as an int.
ClearWin+ is mostly used with Fortran although it can be used with C/C++. There is a help file for using ClearWin+ with C/C++ called cwpscc.hlp. This should be in the folder as the C++ compiler SCC.EXE.
Apart from that you are probably on your own. If you can write in Fortran, there is a large user base and a significant number of contibutions to this forum. |
|
Back to top |
|
|
ian
Joined: 17 Nov 2006 Posts: 5
|
Posted: Tue Dec 12, 2006 6:16 am Post subject: |
|
|
Hi Paul,
Thanks very much for your help the other day, I had not found that help file before but it helped me greatly in my understanding of ClearWin+. I have one further question if you can help please, and that is, in ClearWin+ when creating windows forms using winio, using the %ww command to set the window as an application window, an icon appears at the top left in the blue windows bar. On windows XP O/S the icon is a blank white square, however on windows 2000 the icon in the same position is the windows flag found next to the start button (which is slightly different to the flag next to the start button on XP). I have found this icon in the following directory C:\WINNT\system32\user32.dll. How do I attach or redirect to this icon in my executable file? I believe that there should be an address referenced in the windows.h file to the icon, is this correct? Thanks a lot in advance.
Regards,
Ian. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Dec 12, 2006 8:20 am Post subject: |
|
|
The default icon will vary from one operating system to another.
You can specify the icon by using %mi but you will have to separate the icon into a file and provide a resource script.
You will need a resource editor such as Visual Studio if you want to extract the icon from the DLL, otherwise you could capture the image from the screen and make your own icon by pasting into an icon editor. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Thu Dec 14, 2006 1:18 am Post subject: |
|
|
I hope that this is some use to you. I use a .rc file as follows:
ICON_1 ICON "SS_Main_icon.ico"
ICON_2 ICON "SS_Minim_icon.ico"
SPLASHBMP BITMAP "SPLASH-SS.bmp"
ICON_1 isn't referred to explicitly in my ClearWin code, and my application quite happily uses it as the icon for the application, and for the main window. All my subsidiary windows use ICON_2, which I explicitly associate with them by using %mi. ICON_2 shows up on the title bar of those subsidiary windows, and also on the taskbar at the bottom of the screen if those windows are minimised. ICON_1 is more pixels, and more colours than ICON_2. SPLASHBMP is a largish bitmap that displays for a few seconds on startup (like when you run PLATO), the code for this is (thanks to Paul some months ago):
IB=winio@('%ww[no_border,no_caption,no_maxminbox,topmost]&')
IB=winio@('%^bm[SPLASHBMP]&','EXIT')
IB=winio@('%dl%lw',2.0D0,'EXIT',ictrl)
(this is FORTRAN, of course)
Eddie |
|
Back to top |
|
|
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|