dynamically managing of layout in MFC + GridBagLayout in MFC or C++

Hi,
can anybody tell me how can I make or find a function in MFC to manage
layout of a dialog that dynamically has been create and also the
controls in the dialog?

I am new in MFC, what I am lokking for is something like GridBagLayout
in java? is there something like this in C++ MFC ?

any idea plz?

Thank u

0
4/27/2006 1:45:35 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
818 Views

Similar Articles

[PageSpeed] 53

There is nothing like GridBagLayout in MFC. However, you can achieve
the same functionality thru various means.

You have to move the controls manually on resize of the dialog or
window.

Please see the following examples:
http://www.codeproject.com/dialog/easysize.asp
http://www.codeproject.com/dialog/resizabledialog.asp

Hth,
Aru

0
4/27/2006 1:53:22 PM
As Arundhati says, we don't have something like this built in...  I think if 
they were redoing MFC they would probably add that functionality, but 
fortunately it is available through libraries.   I use the ResizeableLib one 
and it works great.  It even saves the size of the window so you can restore 
it the next time the program is run. I think all dialogs ought to behave 
this way.

Tom

"Memo" <1359.mohammad@gmail.com> wrote in message 
news:1146145535.929035.310570@e56g2000cwe.googlegroups.com...
> Hi,
> can anybody tell me how can I make or find a function in MFC to manage
> layout of a dialog that dynamically has been create and also the
> controls in the dialog?
>
> I am new in MFC, what I am lokking for is something like GridBagLayout
> in java? is there something like this in C++ MFC ?
>
> any idea plz?
>
> Thank u
> 


0
tserface (3860)
4/27/2006 2:37:08 PM
Reply:

Similar Artilces:

excel 2003 Resides in Task manager.
(On WinXP Pro SP2 / Access 2003 / Excel 2003) The following code, when run from Access, leaves a copy of Excel.exe hanging around in memory. '*********************************************** Sub testXL() Dim objXL As Object Dim wkbXL As Object Dim strFileName As String On Error GoTo errHandler strFileName = "C:\Test.xls" Set objXL = CreateObject("Excel.Application") Set wkbXL = objXL.Workbooks.Open(strFileName) exitHere: On Error Resume Next wkbXL.saved = True wkbXL.Close ' also tried this ' wkbXL.Close save...

service calendar in MS Dynamics 4.0
Does anyone knows how we can achieve the following requirement with MSCRM 4.0 In the service calendar in MS Dynamics 4.0 you are able to create new appointments and service activities. Appointments and Service Activities which are created will be present in the Service Calendar. To see all details of such a record[Subject(default Value)] you must open it. But by moving your mouse on the concerning appointment or service activity, a text-box-view appears with primary information. With appointments the content of the following fields is displayed: 'show time as', 'subject...

Send messages from Web-browser to MFC-application?
This might be wrong news-group, maybe somebody can help me with that too. I want my MFC-application to receive messages (DDE, Automation, WM_COPYDATA or whatever is not too hard to receive) from a hyperlink or button on a web-page. The MFC application and the Web browser are running on the same computer. This must work on IE7/IE8 but a universal solution is best. Is it possible to send messages to my MFC-application from an html-page running in my web-browser? How? Best regards from Gaute "Gaute" <Gaute@nospam.nospam> wrote in message news:%23tEsQgxSJHA.1560@TK2MSF...

dynamic resource
Hi, Anybody know how to load e.g. bitmap into resource dynamicaly? The bitmap file will be downloaded by application itself , so it has to be somehow inserted into resource and displayed. thanks What do you mean by "into resoure dynamically"? Do you want to load a ..bmp file and display it? If yes, take a look at GDI+, which is by far the easiest way to achieve this. ---------- Ajay Kalra ajaykalra@yahoo.com I misspelled this, yes I'd like to load new bitmap on the fly. But resource file looks like is static. I use ATL/MFC applicatation. "Ajay Kalra" <aja...

Data Migration Manager apparently does not have correct Mappings for BCM 2007 Data
I have been trying unsuccessfully for quite some time to migrate BCM 2007 data to CRM 4.0 via the Data Migration Manager using the existing mapping for BCM 2007. However, once I am in there, I have to re-map all data, and even after that, I am unable to successfully import the data. Has anyone had the same issue, and if so, is there a different mapping I should be using? Thanks. what are the failure errors are you getting? are you mapping any data to a lookup field? it is usually a data related issues! -- Kamal Hitari MBSS, MCNPS, MCTS 2B.net Ltd http://kamalhitari.blogspot.com jdmic...

Dynamic sum in Chart
Hello: So I've got this pivot chart that I've created, and it's great, EXCEPT when I select different categories to show up, I want to show a SUM of the categories, not the values of each category. I would appreciate any help/advice you may have. Thank you! Michelle In the pivot table you can select different thing like count and SUM etc. If you right click in the upper left vacant square and chose field settings, then select what you want to see in your data section. Misha wrote: > Hello: > > So I've got this pivot chart that I've created, and it's great...

Tab seq dynamically...
I have a button which added dynamically to a property sheet. Now for setting the tab sequence with this new button, Am using SetWindowPos() method. Now tab sequence is proper. THE PROBLEM IS Through the arrow keys, I could not navigate to the last button for which I called SetWindowPos. where as through tab keys I could go to the last control. I will appreciate ur help in this. DETAILED DESCRIPTION I have three buttons (OK,Cancel, Help)on the property sheet. I added a button "Default" to the property sheet and positioned between Cancel and Help. I set the tab sequence as ...

Inventory management and sync in Small Business Accounting
There should be a sync in POS connector to Small Business Accounting 2006 for Inventory. Also mapping for Correct SBA 2006 accounts should be followed. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbro...

SharePoint Alternate Access Mapping to my Dynamics GP BP site
Hello, If I have posted this question in the wrong forum please let me know! I’m looking for some guidance on changing the Alternate Access Mapping for my Dynamics Business Portal site. So I can implement Single Sign On via ISA Server which is supported on one web listener. Present configuration: Default Zone: http://geneva:222 I would like to add: Internet Zone: http://dynamicsbp.proclub.com I presently have another SharePoint Collection (The Main Portal) http://geneva configured which listens on Port: 80. I tried to add the Alternate Access Mapping http://dynamicsbp.proclub.com...

dynamic charting #2
Hi I have to update a weekly spreadsheet With week numbers in column B x series and three y series percentages in G,H,I columns. Could someone please help I need these to update automatically. If someone can explain in detail I would appreciate 39 2097 2165 68 1770.7 97 96.86 118.43 40 2443.15 2201 -242.15 1548.93 97 111.00 157.73 41 2162.83 2259 96.17 1600.78 97 95.74 135.11 42 2163.08 2241 77.92 1545.1 97 96.52 140.00 43 2137.5 2271 133.5 1664.6 97 94.12 128.41 44 2160.67 2298 137.33 1455 97 94.02 148.50 Ta Brian ...

2 C# Class's Questions
Hi, There are 2 Questions on C# Classes :-> Quest 1. What will be result of below program. Class A { A() { B objB = new B(); } } class B { B() { A objA = new A(); } } } ...

MFC COM #2
Hi all, How can i register a COM DLL developed using MFC????I tried with regsvr32 in command line but getting the following error message'Cannot find the entry point in the DLL",and in the code i dont have DllMain(),but it has DllRegisterServer()..>So how to register this Dll??? Thanx in advance -- For all problems in ur life u r the only solution. LoadLibrary GetProcAddress(h, "DllRegisterServer); call register server. - Tim "Underdog" <underdog@discussions.microsoft.com> wrote in message news:B4B16155-4D3C-407A-876B-B985F4D6ACB4@microsoft.com... >...

Need a method to Dynamicly change the X axis Scale on a chart. #2
I dynamically change the amount of data on a chart. This causes the X axis Scale to either to either show too few values or too many values ( a solid black line if too many). I would like a method to dynamically change the scale values in relation to the data span. Joe - Do you want to limit the number of points displayed? http://peltiertech.com/Excel/Charts/Dynamics.html http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=246 Or do you want to link the axis scales to something you calculate in the sheet? http://peltiertech.com/Excel/Zips/SwitchXYAxes.zip - Jon ----...

Dynamically populate a drop down list
Hi, I'm trying to dynamically populate a drop down list in MS CRM (1.2) based on certain parameters. I suppose I could do it using a SQL stored procedure, but I would prefer to use standard/supported CRM customizations. Any assistance in this would be greatly appreciated. Thanks! -Dave- Dave, You can do it in 3.0 pretty easily based upon an example in the SDK... Here are some pretty pictures... http://blogs.msdn.com/midatlanticcrm/archive/2005/12/04/499868.aspx I have not tried it with 1.2, but it could probably work... Thanks Ben "Dave" <renor321@yahoo.com> wrot...

CRM Integration with MBS/Dynamics products
Hi, Anyone know anything about the integration between CRM 3.0 and ...say.... Dynamix AX/Axapta? I'm thinking sharing of customer data and such.... Jeppe Jespersen Denmark There is nothing available yet. You would need to build it. -- Matt Parks MVP - Microsoft CRM "Jeppe Jespersen" <jdj curly jdj dot dk> wrote in message news:OAfVImWLGHA.3276@TK2MSFTNGP09.phx.gbl... Hi, Anyone know anything about the integration between CRM 3.0 and ...say.... Dynamix AX/Axapta? I'm thinking sharing of customer data and such.... Jeppe Jespersen Denmark ...

Dynamics GP 10 and Dynamics AX 4.0
just a half year ago, our company has started to work with Dynamics AX 4.0. Now i am doing some programming in X++ and almost customizing reports. Accidently, i stumpled on Dynamics GP 10.0 and i am wondering what s the difference between AX and GP? What stands GP for? Maybe GP is to replace AX, and our company backs to wrong horse? Does GP 10 contains AX 4.0? I have learnt lot of X++ programming, would it be possible to using X++ in the GT 10 field, too? Great Plains (GP) is another ERP system that Microsoft acquired a few years ago when it acquired the company of the same name. GP ...

Dynamic Range
Hi All, I have the following two dynamic ranges =OFFSET(PBR!$A$1,0,0,COUNTA(PBR!$A:$A),1) =OFFSET(PBR!$A$1,0,0,COUNTA(PBR!$A:$A),2) Note: there will be two ranges namecount & namelist The formula which would be using the above range is =IF(MAX(namecount)<ROW(1:1),"",VLOOKUP(ROW(1:1),namelist,2)) Big question!!!, can I join these ranges together in to one statement. if so than how ??? Thansks, Rashid Hi! If I follow what you want: Named range: List Refers to: =OFFSET(PBR!$A$1:$B$1,,,COUNTA(PBR!$A:$A)) Then: =IF(MAX(INDEX(List,,1))<ROW(1:1),"",VLOOKUP(R...

Invert layout
Not sure how to words this, but bascially, I have an excel doc that I want to invert, i.e make the data in the rows into columns, and the data in the columns into rows.. The reason I want to do this is because I have 2-3 rows, but 20-30 columns. You can't print the doc nicely like that. Any ideas? I'd insert a new worksheet. Then select the original range and edit|copy then go to A1 of that new worksheet and edit|paste special|transpose and print the sheet (and delete it???) Moshe Rosenberg wrote: > > Not sure how to words this, but bascially, I have an excel doc that I ...

Error when accessing HQ manager
my customer gets this error trying to access hq manager: Invalid object name '#Temp'. SELECT * FROM #Temp WHERE [Status] IN (0,1,2,3,4) I tried a solution provide in a KB article that addressed the problem for 1.2 and 1.3, but it did not seem to work for him. Please advise. I have that error too....but..I don't know if there are fix for that... the only thing working was .... type your user id and password....pause for 30 secs then press Enter. Good Luck "Retail Labs Tech" wrote: > my customer gets this error trying to access hq manager: > Invalid obje...

IE8 quit by itself when select manage add-ons
Using IE 8 on XP Pro with latest updates. After selected Manage Add-Ons, IE quit by itself. Tried to reset default settings; started with -extoff option; and removed and reinstall IE 8 still the same. WinXP SP2 or SP3? Are both KB980182 and KB979683 listed in Add/Remove Programs? What anti-virus application or security suite is installed and is your subscription current? What anti-spyware applications (other than Defender)? What third-party firewall (if any)? Were any of these applications running in the background when you installed, uninstalled, and/or reinstalled IE8? ...

Linking errors with MFC Dialog Based application and Crypto++
Hi, For quite long now I've been trying to get the Crypto++ ([url]www.cryptopp.com[/url]) library working with a simple MFC Dialog Based application. The strange thing is that a Win32 console application links and works fine with the same settings :-| Here are the errors I'm getting: > > --------------------Configuration: dialog - Win32 > Debug-------------------- > Linking... > LINK : warning LNK4049: locally defined symbol ""public: __thiscall > std::ios_base::Init::Init(void)" (??0Init@ios_base@std@@QAE@XZ)" > imported > LINK : warni...

SP2 on DC running Management Tools?
Hi, probably a very easy one, but just about to apply SP2 to my Exchange Server. The DC (Seperate box) runs the Exchange Admin Tools. Presumably I need to install SP2 to the DC as well? If someone could quickly clarify that would be great. ta Ah. The answer is in Article 555562 sorry to trouble y'all! "blueboy1894" wrote: > Hi, probably a very easy one, but just about to apply SP2 to my Exchange > Server. The DC (Seperate box) runs the Exchange Admin Tools. Presumably I > need to install SP2 to the DC as well? > > If someone could quickly clarify that wou...

dynamic menus
I want to be able to create a hierarchy of menus under the view menu. I don't know at design time how many items will be under each submenu. I have been able to access and add to the view menu itself. By I have not been able to add anything under that added menu. I know it shuold be a popup menu. but when I make it a popup, I get an assert when I try to open the view menu. Here's what I have so far (some experimentation still remains): m_pWndMenu = GetMenu(); //int count = m_pWndMenu->GetMenuItemCount(); //CString string; //m_pWndMenu->GetMenuString(2, string, MF_BY...

Business Portal
UserA created a requisition. His supervisor, userB, got "Requisition Approval Failure, Error in the application, Message: Unable to reconcile changes for entity" when he tried to approve this requisition. Please help. Thanks. ...

MFC GDI Resource leak reintroduced in WinXP SP2?
G'day, I've been testing with WinXP sp2 and have noticed that the bug fix in in WinXP SP1 desribed to this article http://support. microsoft.com/?kbid=319740 seems to be undone. It relates to any MDI MFC application leaking 6 GDI resources everytime a child window is created, when XP theming is turned on. The culprit was UXTheme.dll. Win 2003 server with theming turned on also exhibits this leak. Can anyone else confirm this? Thanks, Barnaby Just some further information on UXTheme.dll shipped in the various OS versions: FIXED: XP SP1 = 6.0.2800.116 Date Created: 16/10/2...