WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
Pages (2) [1] 2   ( Go to first unread post )

Creating Dialog Boxes through code, or visually ?, Problem manipulating child windows...

admc
Quote Post


New Member
*

Group: Members
Posts: 5
Member No.: 275
Joined: 11-July 04


Hello,

I would like to use ASM to substitute other programming languages, because it's simpler for me. My question is that I should use dialog boxes as main window for larger programs or it would be better to use CreateWindow.

My problem is that I want to make a windows program for educational purposes, and I started to make a Dialog Box resource with WinAsm. I don't want to "code" the properties for the window, I prefer to do this visually. (I was using Visual Basic, so I am used to visually designing the dialogs).

But, I cannot control the controls on the Dialog Box Resource. I've created a scrollbar, but I don't know how to use it.

I've found functions in the Win32SDK, but they require the hWnd of the scrollbar...
The problem is that I don't know how to obtain it.

Maybe the hWnd is returned into the "eax" register, when the control is created programmatically using CreateWindowEx...
But, as i mentioned before, i prefer designing the dialog/controls visually..

Thank you.
Adam
PMEmail Poster
Top
akyprian
Quote Post


Administrator
******

Group: Admins
Posts: 2307
Member No.: 1
Joined: 12-May 04


Welcome admc,
QUOTE
My question is that I should use dialog boxes as main window for larger programs or it would be better to use CreateWindow?

This is up to you. You can use any method you like.

You always give "commands" to controls using their handle.
The GetDlgItem API returns the handle of a control.

I hope this helps,

Cheers,

Antonis
PMEmail PosterUsers Website
Top
admc
Quote Post


New Member
*

Group: Members
Posts: 5
Member No.: 275
Joined: 11-July 04


Thank you!

Now it works!
PMEmail Poster
Top
admc
Quote Post


New Member
*

Group: Members
Posts: 5
Member No.: 275
Joined: 11-July 04


Hello,

Now I tried to make a Group Box into my dialog box window and put controls in it, but when I started the program, it didn't redraw the frame, so it put out the frame border and left the window in the back inside.

How can I redraw it?

UpdateWindow didn't work, I tried it with the handle of the dialog box window, and with the handle of the groupbox.
PMEmail Poster
Top
andrew_k
Quote Post


Active Member
***

Group: Members
Posts: 41
Member No.: 34
Joined: 25-May 04


Hi Admc,

Could you post your code?

I am not sure if I get what you mean. Normally there is no need to call InvalidateRect and UpdateWindow on a dialog box, unless you have done some custom drawing (for instance), and an event has occurred that necessitates repainting.

If you post your code I am sure we can help a little more.

Cheers,
Andrew
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Pages (2) [1] 2  Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google