resize a fixed dialog

I am trying to figure out how I can resize a fixed dialog running in another 
process.  I have set a WH_CBT hook and added the WS_THICKFRAME style upon 
creation.  This achieves the affect of having a sizeable window border 
(sizing handle on lower right corner; cursor changes to sizing cursors when 
hovering over border).  But I cannot actually resize the border.

What I am not sure about is how I can monitor for the sizing-related 
messages.  In Spy++, there are absolutely no sizing-related messages being 
posted.

I happened to find a freeware utility called, ResizeEnable, that manages to 
do what I am trying to do for the most part, that is, resize the window, but 
it has an algorithm that just stretches every control on the window...I do 
not want that behavior.  According to its documentation, it runs in the 
system tray and hooks all 'unsizable' windows and intercepts all messages 
associated with sizing.  This is where I am lost.  What hook would I use to 
do this?

When this freeware utility is active and I look in Spy++, I now see many 
more messages being posted as I resize a dialog.  Why are all these messages 
suddenly being posted in Spy++?  What is that program doing to make that 
happen?

Thanks,
Jeremy
0
JR1 (208)
12/23/2008 6:39:02 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
1015 Views

Similar Articles

[PageSpeed] 13

You will need to add the SC_SIZE command to the system menu of the window 
that you want to change to sizeable.  And instead of WS_THICKFRAME you can 
simply use WS_SIZEBOX.


AliR.

"JR" <JR@discussions.microsoft.com> wrote in message 
news:74BA7A41-30F0-43D7-B6C8-A61ACA119E92@microsoft.com...
>I am trying to figure out how I can resize a fixed dialog running in 
>another
> process.  I have set a WH_CBT hook and added the WS_THICKFRAME style upon
> creation.  This achieves the affect of having a sizeable window border
> (sizing handle on lower right corner; cursor changes to sizing cursors 
> when
> hovering over border).  But I cannot actually resize the border.
>
> What I am not sure about is how I can monitor for the sizing-related
> messages.  In Spy++, there are absolutely no sizing-related messages being
> posted.
>
> I happened to find a freeware utility called, ResizeEnable, that manages 
> to
> do what I am trying to do for the most part, that is, resize the window, 
> but
> it has an algorithm that just stretches every control on the window...I do
> not want that behavior.  According to its documentation, it runs in the
> system tray and hooks all 'unsizable' windows and intercepts all messages
> associated with sizing.  This is where I am lost.  What hook would I use 
> to
> do this?
>
> When this freeware utility is active and I look in Spy++, I now see many
> more messages being posted as I resize a dialog.  Why are all these 
> messages
> suddenly being posted in Spy++?  What is that program doing to make that
> happen?
>
> Thanks,
> Jeremy 


0
AliR3470 (3234)
12/23/2008 10:04:38 PM
I believe you can find an article about this on www.codeguru.com.

"JR" <JR@discussions.microsoft.com> wrote in message 
news:74BA7A41-30F0-43D7-B6C8-A61ACA119E92@microsoft.com...
>I am trying to figure out how I can resize a fixed dialog running in 
>another
> process.  I have set a WH_CBT hook and added the WS_THICKFRAME style upon
> creation.  This achieves the affect of having a sizeable window border
> (sizing handle on lower right corner; cursor changes to sizing cursors 
> when
> hovering over border).  But I cannot actually resize the border.
>
> What I am not sure about is how I can monitor for the sizing-related
> messages.  In Spy++, there are absolutely no sizing-related messages being
> posted.
>
> I happened to find a freeware utility called, ResizeEnable, that manages 
> to
> do what I am trying to do for the most part, that is, resize the window, 
> but
> it has an algorithm that just stretches every control on the window...I do
> not want that behavior.  According to its documentation, it runs in the
> system tray and hooks all 'unsizable' windows and intercepts all messages
> associated with sizing.  This is where I am lost.  What hook would I use 
> to
> do this?
>
> When this freeware utility is active and I look in Spy++, I now see many
> more messages being posted as I resize a dialog.  Why are all these 
> messages
> suddenly being posted in Spy++?  What is that program doing to make that
> happen?
>
> Thanks,
> Jeremy 


0
cli4 (6)
12/24/2008 2:00:36 AM
Reply:

Similar Artilces:

Show Access Print Dialog to Ask for a Printer
Using Access 2002 I used the command wizard to create a button on the form to print the form's currently selected record. The record prints fine, but it does not allow selecting of a printer. I want to let users select a printer, and then use the code that the Toolbox Wizard created to print the selected record (code attached). Private Sub cmdPrint_Click() On Error GoTo Err_cmdPrint_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.PrintOut acSelection Exit_cmdPrint_Click: Exit Sub Err_cmdPrint_Click: MsgBox Err.Description ...

problem with resizing
Hi! I'm writing a MDI application. Child window is splitted in three panes. In the one pane I've got a FormView with some buttons. How to do, that this FormView was in the center of a pane (even during resizing )? And the second problem, how to do, that during resizing, splitters dividing window were always in the same places? Please, help me. I would be appreciate. bart ...

Disabling Esc and Enter in a Modeless dialog box
I am having a dailog based application in which another dialog is embedded as a child.The settings of this dialog are child with no border and visible. The child dialog is created using the "Create" function of CDialog and hence is modeless. On press of Esc or Enter the dialog gets destroyed. I want to override this normal behaviour. How can this be done? !!! Thanks & regards, Senthil a couple possibilities. 1. change the accelerator key definitions to remove those key mappings 2. override the onok and oncancel member functions of cdialog and make yours not call the cdialog ...

resizing problems
I am using OpenGL in my MFC app. The problem is when I resize the window from the left or top border the whole scene of my OpenGL moves even before my OnPaint event handler is called and when my OnPaint is called after this it repaints the scene so this produces a flicker. If, however I resize the window from the right or bottom border this problem doen't occur. Can anybody please tell me what is happening? Thank you ...

How to fix keys t s h c v non-responsive only in Excel?
When I press keys t s h c and v in Excel 2003, nothing happens. If I use the Shift key, then the keys work, but only as caps. The keys work fine in other Office applications, and worked fine in Excel 2003 until this morning. bareedy, Interesting. Try the stuff at http://www.smokeylake.com/excel/vfaq.htm, "Excel acts generally goofy." -- Earl Kiosterud www.smokeylake.com/ ------------------------------------------- "bareedy" <bareedy@discussions.microsoft.com> wrote in message news:E613210C-9895-4DDD-906D-219336F7CDD8@microsoft.com... > When I press ke...

Bitmap resize on same DC
I am a little be confused! I have a custom control with a bitmap inside I create the bitmap with this code ************************************************* CClientDC dc(this) ; if (m_dcGrid.GetSafeHdc() == NULL) { m_dcGrid.CreateCompatibleDC(&dc) ; m_bitmapGrid.CreateCompatibleBitmap(&dc, m_nClientWidth,m_nClientHeight) ; m_pbitmapOldGrid = m_dcGrid.SelectObject(&m_bitmapGrid) ; } ************************************************ and in OnPaint i have: ************************************************ CPaintDC dc(this) ; // device context for painting CDC memDC ; CBit...

CStatic derived dialog and auto-resize
Hi, I would like to add auto-resizing feature to my Cstatic derived control. I mean when I load a bitmap I would like to adjust size dynamically. I tried to SendMessage WM_SIZE but it doesn't work. >I would like to add auto-resizing feature to my Cstatic derived control. I >mean when I load a bitmap I would like to adjust size >dynamically. >I tried to SendMessage WM_SIZE but it doesn't work. You can resize a window by using the SetWindowPos or MoveWindow APIs. Dave -- MVP VC++ FAQ: http://www.mvps.org/vcfaq ...

SP2 Fix
I cannot install SP2 fix. I keep getting a message, "Office hotfix Intaller incountered a problem. Sorr for the inconvenience" Does anyone know a fix for this or where I could get one? ...

Dialog Box: Which control gains the focus?
Hello everybody! Sample: extern CMyDialog* pDial; (initialisation) .... (entering datas) pDial->ShowWindow(SW_HIDE); (other processing) pDial-ShowWindow(SW_SHOW); pDial->SetFocus(); Which control has the focus? In a project developped with Visual Cpp version 5 & 6, it's the last control having the focus when dialog was visible. An other project developped with Visual Studio .Net, it's always the first control (first in tabulation order) which has the focus. With or without MFC, the behaviour is the same. Who knows the reason why? What is exactly behind pDial->S...

auto resize text without resizing cell in excel
format|cells|alignment tab|check "shrink to fit" Ferd wrote: -- Dave Peterson ...

How to resize a CTreeCtl when the dialog window is resized
Hello, Is there any documentation on how to do this? Or does anyone have any suggestions? Thanks, Linda >-----Original Message----- >Hello, > >Is there any documentation on how to do this? Or does anyone have any >suggestions? > >Thanks, >Linda > >. You can handle the message WM_SIZE of dialog to change the size of CTreeCtrl. Use message mapping. Then call the MoveWindow function to change the size: CTreeCtrl::MoveWindow(x, y, width, height) >-----Original Message----- >Hello, > >Is there any documentation on how to do this? Or does anyo...

Money Problem in Vista FIXED
Hello: I just spent a couple days trying to fix MS Money and after an 88 minute call to MS Support, we finally fixed it. I want to pass this on, and hopefully someone can put this in one of the FAQs as well. I am using Windows Vista Ultimate 32 bit. I had this problem in MS Money Deluxe 2007, however, I then went and bought MS Money Plus Deluxe thinking that installing a newer version would work, but this did not make any difference. My problem was, whenever I would update my bank information, MS Money would stop working and close down. Also, the background application would stop as w...

Fixed Assets ACRS tables
Is there a way to update/change ACRS tables? Can new ones be added? Our client here in sydney is reporting to their US headquarters, and they are using depreciation rates table from Gap 20. The rates are not on the ACRS tables of GP. Thanks. ...

Drop Down box resizing on open
I'm using Excel 2000 and have created a workbook with lots of drop down boxes which keep resizing when I open up the sheet. I have the drop downs in column B, with linked cells in column A with IF's in column D based on column's A values. I have macro's running in the background autofitting column D (the IF variables can give results which range from 1-10 lines taken from another sheet). The drop down boxes have been positioned in the lower half of the cells so the cell contents can be read. I have made sure that each drop down box has 'move but dont size with cells&...

Importing Binairy Fixed length data.
Hello, At the moment I am investigating how to import data from a legacy database. One off the methods we are considering is importing: Binairy Fixed Length data. ================== This data can be supplied in files. Is it possible with SSIS to import this data into tables? Importing each record (of fixed length up to 512 bytes) into a single field in a table would be sufficient. Suggestions? Webpages pointing in the right direction? *) Some numbers. The binairy data is never long. Most 'records' have a fixed length of less than 512 bytes. Each byte can contai...

Resizing trendline title in legend
G'day, Im having trouble resizing the legend from 3 lines to 1. I have used a scatter chart and then Add Trendline>Moving average. The legend that is auto-generated is "10 per. Mov. Avg. (PROJECTED INITIAL YELD" The title is broken up into 3 lines as above, and no matter how much I resize or how much big I make the legend area or how small the font, it INSISTS on using 3 lines. Because the title is auto-generated (10 per. Mov. Avg.....) there is nowhere where I can actually edit the title eg make it shorter, or remove the alt-enter line breaks (if thats what it is). The ...

Two Dialog Resources, one dialog object?
Can someone please tell me if it is possible to have two dialogs in my resource view that link to the same dialog object? or will I have to implement a 'dialog functionality' object that is called from my event methods? I want to allow my users to choose from two different sized dialogs (one large, one small) depending on their registry settings. The dialogs would essentially be the same, with identical controls, just different layouts. Alternatively, is there any way to dynamically 'scale up' my dialog whilst still allowing it to be edited in resource view? I am using Visua...

Resizable CPropertySheet In Resizable CFormView
I'm trying to build an MFC-based SDI app that has a look somewhat like that shown by Joseph M. Newcomer at http://www.flounder.com/proppage.gif in his page "The Graphical Developer Interface" ( http://www.flounder.com/gdi.htm ). The property sheet and the pages in it should be resizable, and it's the resizing that I'm having problems with. I selected a CFormView-based application and put a CPropertySheet in it, with appropriate pages. (I selected a CFormView over a dialog-based app because I wanted the framework's support for all the things you don't get with a...

Linking Dialog box content with cells in "regular" sheet
How to link data in Edit box (from Dialog caption) with exact cells in "regulal" Sheets? Or is there another way to link exact content from Dialog sheet to normal sheet? For example, if I have number 200 in Dialog, I need that exact number 200 on another ("regular") sheet to preform calculations with it. thnx ...

problem in making perticuler color transparent on an imaged dialog
HI frnds, I used below 3 line code to make perticuler color transparent on an imaged dialog in OnInitDiaolog(). its working fine but it makes not to work "C" file, which is been added to the project. if i remove these 3line code C file works if i keep these 3line code it makes my C file nowork. /////////////////////////////////////// HWND hWnd=GetSafeHwnd(); SetWindowLong(hWnd, GWL_EXSTYLE, GetWindowLong(hWnd, GWL_EXSTYLE) | WS_EX_LAYERED); SetLayeredWindowAttributes(hWnd,RGB(255,0,255),0,LWA_COLORKEY);//I have make pink color as transparent /////////////////////////// any ideas...

How to implement transparent static on dialog box?
I would implement a transparent static text to show the status text of the progress on dialog box. The background of dialog box is not default system color. Originally, I set the bk mode of the static to transparent mode and return a NULL_BRUSH in OnCtlColor() of dialog class. It can fit my requirement if the static text is not changed. However, the old text is not erased if the static text is changed. I think I need to override some function to erase background first. Which function do I need to override to erase the background? or I need to implement my own static class to do so? and how? ...

Fixed Heading
I was wondering is anyone can tell me to how to have a fixed heade row. By that I mean, I have a pretty long spreadsheet. I want the first ro (row 1) that has my headers in it to remain fixed when I go down th page. The rest of the rows (row 2 onwards) need to scroll down when move my scroll bar. thank -- bombayterro ----------------------------------------------------------------------- bombayterror's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2285 View this thread: http://www.excelforum.com/showthread.php?threadid=49857 How about Freezing the row. Cl...

resize
trying to resize a template from 1 to 1 to 1 to 10. it has a frame around the page and every time i resize, it resizes the frame to make it really small in the corner. is there a way this can be locked? thanku sounds like the frame may be associated with a background page, that often happens with some materials that I put together. Al "Harry Archer" <ha092003@removehotmail.com> wrote in message news:eDkN9%23pqDHA.392@TK2MSFTNGP11.phx.gbl... > trying to resize a template from 1 to 1 to 1 to 10. it has a frame around > the page and every time i resize, it resizes the f...

Can I automatically resize all controls in a Dialog without adding user codes
Dear All, Can I design a Dialog that automatically resizes all controls when the Dialog is being resized? Many thanks, Yes. You can resize or move them as you wish by handling OnSize of the dialog. SetWindowPos can be used to change the size and/or position. Here is a helpful link: http://www.codeproject.com/dialog/resizabledialog.asp --- Ajay No. You must explicitly take action on the OnSize handler to resize them. Sometimes, there are packages called "geometry managers" that make this fairly straightforward (check www.codeproject.com and www.codeguru.com for examples)...

Access 2007: Resizing one textbox resizes all
Created a new form, all textboxes were auto-created from the Data Source table. Now, I want to resize some of the textboxes to smaller and larger. When I give focus to one textbox and drag to resize, all textboxes automatically get focus and resize as well. Or, when I change the textbox width in the Properties for one text box, all of them change. Never saw this behavior in Access 2003. A2007 has a new feature for linking all the controls. Sometimes a very handy feature, sometimes not so handy. To remove the linking, select one of the linked controls, go to the arrange m...