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 (3) 1 2 [3]   ( Go to first unread post )

TabControl, Manipulate the Items of a Tab Control, SetWindowPos API function

SeaFarer
Quote Post


Extremely Active Member
******

Group: Members
Posts: 1753
Member No.: 1464
Joined: 2-September 05


QUOTE (SeaFarer @ Aug 23 2007, 08:47 PM)
I guess this is where I say duh again.

Plus I am sure Antonis will confirm subclassing is the correct approach.


laugh.gif Antonis must have giggled when IsDialogMessage came to mind or something. unsure.gif

Although I have used IsDialogMessage in another program before, I could not get it to work right for this example. huh.gif

PM
Top
ChillyWilly
Quote Post


Very Very Active Member
*****

Group: Members
Posts: 91
Member No.: 5730
Joined: 5-January 08


if i make the main window able to maximize , how do i make the child tabs maximize with it? they dont stretch with it. i have a listbox that has too much text on a few lines and i want to be able to maximize the program to show the complete text
PMEmail Poster
Top
shoorick
Quote Post


Extremely Active Member
******

Group: Admins
Posts: 2301
Member No.: 160
Joined: 22-June 04


you have to process wm_size message, recalculate coords and move all child windows with your own code. i do know only status window which moves itself properly with "movewindow,0,0,0,0"
PMEmail PosterUsers Website
Top
ChillyWilly
Quote Post


Very Very Active Member
*****

Group: Members
Posts: 91
Member No.: 5730
Joined: 5-January 08


if i make the main window able to maximize , how do i make the child tabs maximize with it? they dont stretch with it. i have a listbox that has too much text on a few lines and i want to be able to maximize the program to show the complete text
PMEmail Poster
Top
shoorick
Quote Post


Extremely Active Member
******

Group: Admins
Posts: 2301
Member No.: 160
Joined: 22-June 04


take my translator: bin+source there
http://www.winasm.net/forum/index.php?showtopic=3053

although it has russian interface you may do this: run application and press Esc (pressing esc shows/hides list with results) and try resize main window.

to simplify application listbox width is 1/4 of main window client rect width, and height of all childs are 1/2 (or 1/3 if third edit window is visible)

how does it works: look at WM_SIZE processing in the source:
CODE
.wm_size:
invoke ShowWindow,[hZoom],SW_HIDE
   invoke MoveWindow,[hStatus],0,0,0,0,TRUE
   invoke GetWindowRect,[hStatus],rc
   mov eax,[rc.top]
   sub eax,[rc.bottom]
   push eax
invoke GetClientRect,[hWnd],rc
pop eax
   add eax,[rc.bottom]
   cmp [tran],0
   mov [rc.bottom],eax
   je  @F
   mov ecx,3
   xor edx,edx
   div ecx
   jmp .put_height
@@:
   shr eax,1
.put_height:
   mov [rc.bottom],eax    
invoke MoveWindow,[hText],0,[rc.bottom],[rc.right],[rc.bottom],TRUE
   push [rc.right]
   cmp [list],0
   je  @F
   mov eax,[rc.right]
   shr eax,1
   mov ecx,eax
   shr eax,1
   add ecx,eax
   mov [rc.right],ecx
   invoke MoveWindow,[hList],ecx,0,eax,[rc.bottom],TRUE
@@:
invoke MoveWindow,[hDict],0,0,[rc.right],[rc.bottom],TRUE
   pop [rc.right]    
   mov ecx,[rc.bottom]
   add ecx,ecx
invoke MoveWindow,[hTran],0,ecx,[rc.right],[rc.bottom],TRUE
xor eax,eax
ret


if you wish to run it and see listbox with text learn more there:
http://board.flatassembler.net/topic.php?p=94943#94943

regards!
PMEmail PosterUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Pages (3) 1 2 [3]  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