Solved

Changing dialog appearance

Posted on 2000-04-12
4
288 Views
Last Modified: 2013-11-20
Hi,

I want to change the appearance of my CDialog (um, Dialog App) wgile the program's running, but I have no idea if this is possible. I think it is since I found some functions called "ModifyStyle" and "ModifyStyleEx" (but can't get them to do what I want). I want to add/remove the border of my dialog when the user hits a certain key... I don't know if it's possible but still.

Thanks :)
0
Comment
Question by:mgdPaul
  • 2
  • 2
4 Comments
 
LVL 5

Expert Comment

by:vachooho
ID: 2709862
ModifyStyle(WS_BORDER, 0); // to remove
ModifyStyle(0, WS_BORDER); // to add
do not forget to call UpdateWindow();
it should works
0
 

Author Comment

by:mgdPaul
ID: 2709883
Thanks! :) It works indeed :)
Only one thing, when I use this the title bar does disappear, but there's still some kind of border around my dialog... is it also possible to remove the entire border? (like when you select "Border: None" in the resource editor/dialog properties)
0
 
LVL 5

Accepted Solution

by:
vachooho earned 50 total points
ID: 2709957
look in dialog editor and notice with which flags your dialog created.
Then remove all set flags using ModifyStyle()

actualy window with no frAME coudl have only WS_POPUP (or other WS_xxx window style - WS_OVERLAPPED ... ) and WS_VISIBLE visibility flags.
0
 

Author Comment

by:mgdPaul
ID: 2709993
Thanks! :)
This seems to work just fine :)
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Complete beginner needs help making a cron job 9 116
either24  challenge 19 97
fix34  challenge 9 116
Trying to run powershell  in a batch file. How do I do this? 8 89
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question