473,406 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

I tried to move dialog around. but..

Dear all,

I tried to maximize dialog in dialog based application. I used
'ShowWindow(SW_MAXIMIZE);'

and

I tried to move dialog around.

I used

::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default

AfxGetMainWnd()->PostMessage(WM_NCLBUTTONDOWN, HTCAPTION,
MAKELPARAM(point.x,point.y));
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_SIZENWSE));

// CDialog::OnLButtonDown(nFlags, point);
}
I don't want to move maximized dialog when I push left mouse button. but it
moves.

and I want to move normal dialog uesed 'ShowWindow(SW_RESTORE)' when I push
left mouse button.
Nov 16 '05 #1
1 1619
I used flag.
flag =0 when dialog maximized

if (falg==0)
{
AfxGetMainWnd()->PostMessage(WM_NCLBUTTONDOWN, HTCAPTION,
MAKELPARAM(point.x,point.y));
}

I solved. thank you.
"mihyon" <ei******@e-castle.co.kr> wrote in message
news:bo**********@news1.kornet.net...
Dear all,

I tried to maximize dialog in dialog based application. I used
'ShowWindow(SW_MAXIMIZE);'

and

I tried to move dialog around.

I used

::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default

AfxGetMainWnd()->PostMessage(WM_NCLBUTTONDOWN, HTCAPTION,
MAKELPARAM(point.x,point.y));
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_SIZENWSE));

// CDialog::OnLButtonDown(nFlags, point);
}
I don't want to move maximized dialog when I push left mouse button. but it moves.

and I want to move normal dialog uesed 'ShowWindow(SW_RESTORE)' when I push left mouse button.

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
by: George | last post by:
Is there a way to customize the open file common dialog? I am trying to modify the button text so I can create a delete file common dialog. I need the same functionality of the open file common...
7
by: joseph.inglis | last post by:
I have a web browser object on a form which I have set to edit mode and use the UCOMIConnectionPointContainer interface to hook in and catch events. All working sweetly. Except there...
0
by: mihyon | last post by:
I make maximize dialog used 'ShowWindow(SW_MAXIMIZE)'. and void CEds1000_3Dlg::OnLButtonDown(UINT nFlags, CPoint point) { // TODO: Add your message handler code here and/or call default...
0
by: diatom | last post by:
Hello, In a windows application, I just created a new custom user control. This custom user control is simply a dialog that I want to re-use. When my dialog opens, by default it is located in...
0
by: hmm | last post by:
Hi all I have two problems: Problem #1: I'm using a .NET Form with the property 'FormBorderStyle' set to 'None'. The idea is to completely cover the area of that Form with a UserControl. In...
11
by: VK | last post by:
In the continuation of the discussion at "Making Site Opaque -- This Strategy Feasible?" and my comment at http://groups.google.com/group/comp.lang.javascript/msg/b515a4408680e8e2 I have...
9
by: Gord | last post by:
In VB6, a custom dialog can be easily created by adding a new form, adding whatever controls you like, sizing it as you like, adding code and then just loading/unloading it whenever you like....
0
by: Paul | last post by:
Hi, I am looking to create an eLearning resource using VB2008. I have a form with a background picture of a cross section of a strand of hair magnified x1000. The around the edge of the hair...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.