Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, alibaba, TipmyPip), 1,144 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 2 of 2 1 2
Re: Common Dialog Ex. w/ Win32 API menus (Lite-C p [Re: MrCode] #155762
10/18/07 09:30
10/18/07 09:30
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
thanks! this is very useful. it would be great if you could make more examples with other windows gui elements.

all editor tools like from triplex and shadow969 should use this!

Re: Common Dialog Ex. w/ Win32 API menus (Lite-C p [Re: MrCode] #155763
10/19/07 22:04
10/19/07 22:04
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline
User
MrCode  Offline
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
Umm, just 2 clarify on what I posted earlier (my edit time expired):

I'm not knocking you contribution, I think it's great that you were able to work this out, and I would use it if I really needed it. I'm just saying that if I were programming this sort of stuff myself, it would be easier to use the acknex.dll functions. It's mostly a matter of skill level.


Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Custom Dialog w/ Win32 API ? [Re: ventilator] #155764
10/23/07 20:21
10/23/07 20:21
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline OP
Member
yorisimo  Offline OP
Member
Y

Joined: Mar 2007
Posts: 197
I've looked into making custom dialog boxes, (modal and modeless) but I'm not getting very far. It seems that the usual way to do this is using resources (*.rc, not to be confused with gamestudio's *.wrs). I'm not very familiar with resources and don't know how to use them or even if it's possible to use them with Lite-C.
It seems making custom dialog boxes should be possible using Lite-C as the functions CreateDialogParam and DialogBoxParam are included in windows.h.
Any ideas/suggestions?


Joris Lambrecht
My Contributions: Relative Rotation, Window Sizing
Re: Custom Dialog w/ Win32 API ? [Re: yorisimo] #155765
12/30/07 03:08
12/30/07 03:08
Joined: Jul 2003
Posts: 47
Indiana
S3an Offline
Newbie
S3an  Offline
Newbie

Joined: Jul 2003
Posts: 47
Indiana
it is possible, although it takes alot of programming. You have to create the DLGTEMPLATE and DLGITEMTEMPLATE structures in memory. That means you must fill in a structure for each control on the dialog. Then pass the entire unified structure to CreateDialogIndirectParamA(...) and then call ShowWindowA(...) I'm sorry i don't have a 'C' code sample of how to do this, all i have is a BASIC version written in my own language, not much good if you aren't familiar with it.


A6 / A7 Commercial
Re: Custom Dialog w/ Win32 API ? [Re: S3an] #155766
01/15/08 15:02
01/15/08 15:02
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline OP
Member
yorisimo  Offline OP
Member
Y

Joined: Mar 2007
Posts: 197
I have gotten my own modal and modeless dialog boxes working now (all in C, no resources). Thanks S3an for the reply though.


Joris Lambrecht
My Contributions: Relative Rotation, Window Sizing
Re: Custom Dialog w/ Win32 API ? [Re: yorisimo] #155767
03/16/08 14:41
03/16/08 14:41
Joined: Sep 2003
Posts: 281
Arkansas\USA
raiden Offline
Member
raiden  Offline
Member

Joined: Sep 2003
Posts: 281
Arkansas\USA
First, thanks very much for this contribution

I noticed something however when running this in windowed mode, for me when I closed out the engine using the "X" in the top right corner, it seems as though the WndProc would not release causing the acknex.exe to continue to run. I checked System Processes in Task Manager to confirm this.

I added this case to the WndProc and it has corrected the issue:

Code:

case WM_DESTROY:
{
PostQuitMessage(0);
sys_exit(NULL);
return(0);
}



-raiden


"It doesn't matter if we win or lose, it's how we make the game."
--------------------
Links: 3DGS for Dummies
Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1