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
1934 Views

Similar Articles

[PageSpeed] 58

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 (3236)
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:

Edit box in a dialog box
Hi, I am trying to create an edit box inside a dialog box during runtime, using MFC. Mine is a single document/view application. The way I am trying to do, is as follows. In the OnInitDialog() function of my dialog box(CmyDialog::OnInitDialog()), I declare a CEdit object and call its Create() function. BOOL CmyDialog::OnInitDialog() { CEdit myEdit; CDialog::OnInitDialog(); myEdit.Create(ES_NUMBER | WS_OVERLAPPED | WS_VISIBLE, CRect(0,0,10,10), this, 1); myEdit.ShowWindow(SW_SHOWNORMAL); return TRUE; } I am expecting an edit box...

if the cell value exceeds the limit to have a dialog box appear
Is there a way that, if the cell value exceeds a certain limit, a dialog box would appear? Thanks for any assistance. Dave Check Data Validation: Select the cells Data>Data Validation Allow: (check out the number options: whole number, decimal, etc) Does that help? *********** Regards, Ron "Dschro" wrote: > Is there a way that, if the cell value exceeds a certain limit, a dialog box > would appear? > > Thanks for any assistance. > > Dave > Ron, Here's the scenario -- on an Expense Report: If an employee was to fill in any amount in the &...

I can no longer add words to my dictionary, can this be fixed?
I have noticed that a lot of features are no longer available to me on word, most of which I have been able to fix, but I cannot save any changes to the dictionary. I need to add a spelling and I cannot use the Add to Dictionary feature. Is there a specific file/folder that I should be looking for? See the relevant portion of http://sbarnhill.mvps.org/WordFAQs/MasterSpellCheck.htm -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Mrs.Heide" <Mrs.Heide@discussions.microsoft.com> wrote in message news:...

Fix for Unsent Messages
If your having a problem with "unsent" messages that have no "date" and are not in "Italics," (several people seem to be having problem) I just got the fix from my support group. It's a conflict with the Norton anti-spam program. There may be another way to defeat the anti- spam program but here's how they had me "fix" it. Go to My Computer/C:/Program Files/Common Files/Symantec Shared/Anti-Spam and find the file named MSOUPLUG.dll and rename it MSOUPLUGold.dll. Close out and restart the computer. Fixed it for me. Hope it works for ...

Excel 2003 / Windows Explorer (XP) sort order differs
In Excel 2003, mpeg2_MP@H1440_1280x720p_29.97fps_CBR_40Mbs_openGOP_zzscan.mpv comes before mpeg2_MP@H1440_720x576i_25fps_CBR_45Mbs_closedGOP_alternatescan_LFF.mpv In XP's Windows Explorer and also using DIR/ON in a command prompt shell window, the sort order is reversed. How do I reconcile the two so they sort in the same order? Thank you kindly. Try this group instead http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.excel.misc&cat=en_US_34a4dcef-6aac-414e-9881-2ba33de8be2f&lang=en&cr=US "John Bartley K7AAY" wrote: > I...

Macro: Dialog boxes....... click ok
Hi guys. Im doing some macro programming , and i have a problem. In 2 specific macros excell prompts me (close of a excell=20 doc) with a save changes. (yes, no, cancel) who can a=20 make my macros "click NO"??? In another macros ask=B4s me if i really want to delete=20 that sheet (what of course, i want!) Thanks a lot guys! SpeeD ...

Can't Find Macro In Dialog Box
In my file name AutoInsert_NewRows_WithFormulas_Repeated_Without_Constants.xls I went into VBE Insert Module and Pasted: Sub InsertRowsAndFillFormulas(Optional vRows As Long) ' Documented: http://www.mvps.org/dmcritchie/excel/insrtrow.htm ' Re: Insert Rows -- 1997/09/24 Mark Hill <markhill@charm.net.noSpam> 'Dim vRows As Integer ' row selection based on active cell -- rev. 2000-09-02 David McRitchie ActiveCell.EntireRow.Select 'So you do not have to preselect entire row xxxxxxxxxxxxxxxxxx blah, blah.... End Sub When I go back into the spreadsheet and Alt...

auto-incrementing the next fixed asset ID
Hello: Does anyone have code to auto-increment the next Asset ID in GP 10.0 Fixed Asset Management? childofthe1980s Hi Child, grrr, I feel your pain. The way I have done it is with VBA. I put a button on the form to get the next ID number. I stored the last ID number in the DUOS table and then retrieve and increment it. My client sometimes wants to assign their own, hence the button. Kind regards, Leslie "childofthe1980s" wrote: > Hello: > > Does anyone have code to auto-increment the next Asset ID in GP 10.0 Fixed > Asset Management? ...

Resize query
Very basic but I cannot get this work work and do not understand why.I would appreciate any help Graham Dim myrange As Range Set myrange = Range("AF1").CurrentRegion myrange.Resize(7, 0).Select I keep getting an application defined or object defined error. Try... myrange.Resize(7).Select -- Jim Cone Portland, Oregon USA custom sorting... http://www.contextures.com/excel-sort-addin.html "Graham" <graham@haughs.orangehome.co.uk> wrote in message news:em4cFvC2KHA.5036@TK2MSFTNGP02.phx.gbl... Very basic but I cannot get this work ...

How to show "Run as" Dialog from MFC application
Hi, I have a SDI MFC application. I need to do the following: When I run the MFC application for a non-admin user in Windows XP by clicking on the executable, I need the application to pop - up the "Run as following user" dialog. And, if the credentials are right the application thread should run under administrative privileges. In short, I want the behaviour to be same as doing a right click on the .exe and selecting Run As option. Please Help!! Regards, Susanna See if the following link helps you http://tinyurl.com/33l6lt Cheers Check Abdoul ---------------...

Trouble with a CRichEditCtrl in a Dialog
I've a read only CRichEditCtrl in a resizable dialog for displaying a block of text. On Win98(but not 2K) the vertical line spacing is so small that the underscore character gets erased by the line beneath it. I empirically find that the following code corrects the problem but it makes no sense, as I can verify that the CHARFORMAT is not modified by a subsequent GetDefaultCharFormat(). Am I forgetting to initialize something that gets corrected on a SetDefaultCharFormat(cf)? CHARFORMAT cf; bzero(&cf, sizeof(CHARFORMAT)); cf.cbSize = sizeof(CHARFORMAT); m_richEditCtrl.GetDe...

Why does "Purchase" button not appear in Fixed Assets?!!
Hi all, I want to ask: why does "Purchase" button not appear in Fixed Assets general window?!! although both modules fixed assets and Purchase already installed on the system!! Notice that when i go to modifier on the same window, this button is appearing ! Plz can any body help? On Jun 15, 2:36=A0pm, Yassir Humaid <yassir.hum...@gmail.com> wrote: > Hi all, > > I want to ask: why does "Purchase" button =A0not appear in Fixed Assets > general window?!! although both modules fixed assets and Purchase > already installed on the system!! > > Noti...

resizing CListCtrl in CFormView
I have a CListCtrl in a CFormView and I want the list control to resize with the window but the SetWindowPos function is not working. Does anybody know? I am trapping the WM_SIZE message which seems tobe the right one. Chris Baker wrote: > I have a CListCtrl in a CFormView and I want the list control to resize with > the window but the SetWindowPos function is not working. Does anybody know? > > I am trapping the WM_SIZE message which seems tobe the right one. Chris: Show your code. The correct approach always is to handle WM_SIZE in the parent, and move the children. Dav...

Restarting System Jobs after fixing
My original problem was solved in this post: http://groups.google.com.au/group/microsoft.public.crm/browse_thread/thread/3588ab28efe7eb07/52a840002958d854?hl=en&lnk=st&q=System+Jobs+for+Matchcode+update+stuck+in+waiting+status&pli=1 In short, I moved the MSSQL server behind the scenes, and then renamed the hostname and changed the port of the CRM Server (:80) I followed this Article from Microsoft on how to update CRM after a port change: http://support.microsoft.com/kb/947423 Everything now is working as expected. However, the 600+ jobs that are 'Waiting' are not runn...

Getting a value from a Text box in a dialog Box
Hello everyone, I am new to developing in Visual Studio .Net, and I created a dialog box that has a textbox on it. I was wondering how I could retrieve this text box value as well as assign it a certain value as well. Also, I was wondering if someone could post some good tutorials that would answer some of my basic questions like I stated above. I have a lot of c++ books, but nothing that describes MFC or the Win32 API in particular. Thanks sleepster wrote: > Hello everyone, I am new to developing in Visual Studio .Net, and I > created a dialog box that has a textbox on it. I w...

Resizing columns
I have small tables in 1 worksheet. I want column A in both tables to be different sizes. Is this possible? Hi no, a column width applies to the whole worksheet the only "alternative" is in the table where you want column A to be wider is to merge it with column B - however, this is not really a good idea as it can cause problems with sorting / filtering etc. Cheers JulieD "Jill Leyland" <Jill Leyland@discussions.microsoft.com> wrote in message news:2CCD0971-4E1B-4710-AD9B-EEA2CF09AC59@microsoft.com... >I have small tables in 1 worksheet. I want column A...

Pub 2k3 Resize Column Evenly
Hi, Would you guys teach me how to resize/distrib the columns in a table evenly please? Thanks! Best way is to create ruler guides and adjust the columns manually. -- Mary Sauer http://msauer.mvps.org/ "Tom" <nospam@yahoo.com> wrote in message news:ew55YgW$IHA.1452@TK2MSFTNGP02.phx.gbl... > Hi, > > Would you guys teach me how to resize/distrib the columns in a table evenly > please? > > Thanks! Mary Sauer wrote: > Best way is to create ruler guides and adjust the columns manually. > I am using a actual technical ruler and I use the ruler o...

Can't Create a DLL Dialog Box object
Hi I created a Dialog box class within a MFC share Regular DLL. I use the Resource Wizard to create the Dialog and Class Wizard to define the derived class. I'm exporting the class with the _declspec(dllexport) storage class type specifier. When I try to create an object of that derived Dialog box class in the client application... the object pointer is NULL. I get no errors. The DLL is loaded at load-time, the DLL Library is included in the linker. Do you know what step(s) I might be leaving out ?? One person suggested adding the AFX_MANAGE_STATE macro... but, none of the CDialog base ...

Fixed Assets labels.
Hi, A customer is using GP 8.0 whit fixed assets module installed. He wants to do an inventory assets and ticket every asset whit a code bar. I think it can use a label field to store a code bar for each asset. Also, this field can be imported into fixed assets module. Is that correct? Thanks. -- Evelin. Yes, you are correct. Go into Setup> Fixed Assets > User Preferences to identify the location of the files for the asset label (etc.) export. -- Jim "Ana Evelin Rosa" wrote: > Hi, > > A customer is using GP 8.0 whit fixed assets module installed. He wants...

Sender iD and 905214 hot fix
Hello all If im runnign windows 2003 sp1 and exchange 2003 sp2 do i still need to install the hotfix? Thanks You do if you are going to implement SenderID checking. If you are not going to implement this filter, then the hotfix is not needed. -- Ben Winzenz Exchange MVP MessageOne "skip" <skip@discussions.microsoft.com> wrote in message news:A03790B6-E27B-4DA5-B7F5-B3ADDE789E0C@microsoft.com... > Hello all > > If im runnign windows 2003 sp1 and exchange 2003 sp2 do i still need to > install the hotfix? > > Thanks Thanks but when i read the KB ab...

Dialog Controls
I want to dynamically move controls to x,y coordinates (I am skinnning my app and will retrieve coordinates from ini) I am stuck. Nothing I do is working. I can retreve the coordinates, but how do I set them? CRect Rect; ScreenToClient(&Rect); m_List2.GetWindowRect(&Rect); //ListBoxControl TRACE("X=%d,Y=%d",Rect.top,Rect.left); How they heck do you set them, I tried MoveWindow(Rect) and it doesnt seem to work. Any help would be apprecaited greatly! Thanks, Scott Kraemer Scott Kraemer wrote: > I want to dynamically move controls to x,y coordinates (I am skinnn...

Expanding the 'Refers To' Box in the Define Name Dialog Box
I'm trying to get my head around Excel Programing using VBA. I'm reading various books, some of which provide examples on CD. On the subject of named formulas, when I look in the examples using the define name dialog box, the actual formula completely fills the 'Refers to' box. Is there a way of expanding this box so I can see the contents in total. The same thing happens in the Data Validation dialog box when I select List, I cant view the complete entry in the source box. It's probably something very elementary and your help would be gratefully received. Thanks I do...

Backing Up Fixed Assets
Our accounting staff would like a "stand alone backup of the fixed asset portion of GP". They are undertaking year-end processes and would like to recover the data should they do something horribly wrong. I have nightly backups of sql server, but is there another quick way to just do this information? I see there may some informaton in system manager online manual, but have no access to that. Thanks For fixed assets you may want to create an archive company and just store a backup of the current company as a 'test' company so they will be able to look back at the...

Inventory purchase moved to Fixed Asset
Hi. What is the proper way in GP to "purchase" an item out of our own inventory and bring in as a fixed asset? For example, we have a workstation in inventory, an employee's workstation dies and needs replaced. Need to "buy" the item and add to Fixed Assets. Is there an easy way to do this in GP? Thank you. Forgot to mention - since the item was originally brought in for resale, when it is moved to fixed assets, needs to have Use Tax added to it. Thanks, "Neil" wrote: > Hi. > > What is the proper way in GP to "...

HTTPS Connection using Proxy authentication without poping the error Dialog
Hello, I am try to connect web server but if i have all acesses (INTERNET_OPEN_TYPE_DIRECT) then it is ppossible to get and post the data but if I use INTERNET_OPEN_TYPE_PROXY then it is not possible to get the data. i am giving it Proxy name and port like proxy:port, and giving user name and password also but still 405 ect error r comming. What are the basic need to acusse Web server unsing WININET If there is a setting for proxy server on your machine, you can avoid using it by specifying DIRECT. Try OPEN_TYPE_PRECONFIG to let Wininet detemine when to use the global proxy info. OPEN...