[Dialogs] : Adapt to resolution

Hi,

I am pocket pc programmer and I would like to know how tou would do this.
I have mobile devices with different screen resolutions(240x240, 
240x320) and I would like to know how I can adapt my dialogs and
controls in function of this.
I can get device resolution but after how can I resize my dialog 
resource to fit the resolution.
0
richom.v (84)
3/9/2006 9:34:55 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
732 Views

Similar Articles

[PageSpeed] 29

I am assuming that we are talking about dialog boxes.

There are only two ways to solve this problem.

One is to have separate dialog templates, one for each resolution you want
to support. (most preferred way I would say)

The other is to move controls around depending on the resolution of the
device.
This might come in handy: http://www.codeproject.com/dialog/easysize.asp

AliR.

"Vincent RICHOMME" <richom.v@free.fr> wrote in message
news:44109f7d$0$19115$626a54ce@news.free.fr...
> Hi,
>
> I am pocket pc programmer and I would like to know how tou would do this.
> I have mobile devices with different screen resolutions(240x240,
> 240x320) and I would like to know how I can adapt my dialogs and
> controls in function of this.
> I can get device resolution but after how can I resize my dialog
> resource to fit the resolution.


0
AliR3470 (3235)
3/9/2006 9:44:17 PM
Reply:

Similar Artilces:

Dialogs
Hi Is there any arguments to I can add to the statement below for the dialogue's "Look in:" to default to a specific folder? Application.Dialogs(xlDialogOpen).Show Thanks. >-----Original Message----- >Hi > >Is there any arguments to I can add to the statement >below for the dialogue's "Look in:" to default to a >specific folder? > >Application.Dialogs(xlDialogOpen).Show > > >Thanks. >. > You can try FileFilter = FileFilter + "Look in: name of directory,," ...

Links in Outlook 2003 open Save As... dialog box
I'm not sure exactly when this started happening. Whenever I click a link in Outlook 2003 now, it opens the Save As... dialog box as well as the Website connected to the link. It doesn't matter what type of link it is; the dialog always shows up with the .exe file type selected. Any ideas? Does it oen the Save As dialog or does it open the Locate Link Browser dialog? In case of the last direct it to iexplore.exe -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -Backup and Restore -Create an Office XP CD slipstreamed with Service Pack 3 ----- "S...

How to Move Two Dialogs at Once
Hello, One of my work's project specifications is to allow users to move two Dialog boxes together so when a user moves one box, the other one moves together with the first. This is what I am trying to do: 1) Create OnMove() event //Import a function to create a Second Dialog extern "C" __declspec(dllimport) long CallDlg(); //Import a function to move a Second Dialog extern "C" __declspec(dllimport) long CallDlg2(int x, int y); void CSvg::OnMove(int x, int y) { //Detect if a user selected two-dialogs move option if (m_attach) { ...

Dialog form Linked To Report
I have created a dialog form, on this form I select the company name from the dropdown list. when a company name is selected, then the report should be generated. presently I have a button on the form when i click on it the macro is set to propt the dialog where i have to type the name of the company, if the company name is wrong the report opens with no values, if the company name is right then I get the report. whereas what i want is insted of button I should have the List Box with company names. Which I have created. But am stuck linking this form with the report Name &q...

Dialog on Dialog?
Hello, Following up from a request several days ago regarding frames, I would like to ask for a little assistance on actually implimenting it! I have creating my 2 dialog templates, both have a class associated with them already. I have added an object of the kind i wish to make child of the main dialog, but I can not figure out how to go from here with rgeards to actually creating it. Could someone give me some indication pleasE? - MR MR, You will now want to investigate creating modeless dialogs. CDialog::Create is the call you use for this. Add a member variable of one of the s...

Modal dialog box question
Hi, I've created a dialog called InfoWindow. Previously I had called it like so: c_InfoWindow = new InfoWindow(); c_InfoWindow->Create(InfoWindow::IDD, this); c_InfoWindow->SetWindowPos(NULL, r, t, w, h, SWP_NOZORDER); c_InfoWindow->ShowWindow(SW_SHOW); Now I want to create it as a Modal dialog, but I can't work out how to set it's size / position at runtime. InfoWindow IW(); // somehow set properties here (SetWindowPos gives runtime error) IW.DoModal(); Hi, Could you try to pass some variables to InfoWindow before calling its DoModal()? For example: MyDlg dlg; ...

How to show icon for a dialog.
Hi, I am adding a simple dialog to my aplication. This dialog is not having any customized code..I want to add my custom icon for that dialog. i mean whenever the dialog is shown it should display 16 X 16 icon in the titlebar.. so, how to do that ? Jigar In OnInitDialog method of your dialog box class load the icon using ::LoadIcon(..) and the call the dialog box's SetIcon(..) method. AliR. "Jigar Mehta" <jigar.programmer@gmail.com> wrote in message news:1141156992.695173.29930@v46g2000cwv.googlegroups.com... > Hi, > > I am adding a simple dialog to my aplic...

Outlook '02 Network Password Dialog box
Help! I have recently added 1 additional email account to my outlook. Now everytime the email checks for messages I get a dialog box with "Enter Network Password". It comes up in the middle of the screen no matter what I am doing. I have clicked on "Save this password in your password list" box but it continues to come up everytime. Is there a way to get rid of this box? Thank you. Kris ...

Dynamic creation of owner-drawn button inside a dialog
Hi some months ago I created a owner-drawn button class that works really fine when assigning this class to a resource id via a DDX member variable. But now we want to reuse this class for dynamic creation of a button control inside the OnInitDialog member funtion of a dialog. Creating the control like that MyButton.CreateNULL,NULL,WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON|BS_OWNERDRAW,CRec t(0,0,100,100),this,2); seems to be OK. But the button never appeared inside the dialog. DrawItem of the button class is never called. So what may be missing? Thanks in advance Bernd How have you declared My...

Common dialog not registered
When trying to load the common dialog tool I get the message 'not registered' why is this and how do I register? Hi, As the message says that control isn't licensed for use in Excel except 'as I understand' in the Developer edition. I believe this performs a similar function fname = Application.GetOpenfileName(.... Mike "Cash" wrote: > When trying to load the common dialog tool I get the message 'not registered' > why is this and how do I register? ...

dynamics navision-synch only via biztalk adapter?
hi, is the only possibilty to synch data between crm 3.0 and navision still the biztalk adapter? has its quality improved in the meantime? or does any other company provide a better interface in the meantime? -- thanks in advance / danke im voraus, fritz -- Fritz Theiss ...

how to pass a value to a modeless dialog?
hi all.. i have created a modeless dialog i had no compiler errors. i want it to take a global value (buffer) from the parent dialog and do some processing to it. i tried putting the processing code i need immediately after i create & show the modeless dialog.but it didn`t work.i also tried to override the constructor for modeless dialog & make it take a pointer to the parent dialog as a parameter& reach the buffer i want but it didn`t work also.what`s the problem?? There are a couple of things you can do. First let me ask you. if the data is global why do you have to pass anyth...

MFC Dialog app "Including" another MFC Dialog app problems.
WIN XP, VC6 I'm trying to use a CDialog based app from another CDialog based app and can't get around the following error: bla,bla\..\WagCom\DlgThreadmill.h(27) : error C2065: 'IDD_THREADMILL' : undeclared identifier IDD_THREADMILL is obviosly resource in the "Included" app. I don't know how to make that resource visible to the calling app. I have the Include statement in the calling object : #include "..\WagCom\DlgThreadmill.h" and I know that the path is correct.. Any help appreciated. Thanks Is the ID in the using applications resource.h...

modeless dialog boxes #2
I have a VS 6.0 MFC dialog-based application. The main dialog has an edit box for displaying messages as things happen. A button on the main dialog starts a modeless dialog. The modeless dialog has a 'DoIt' button which executes a long process, updating the main dialog edit box. I'm finding that the main dialog and modeless dialog are unresponsive as long as I'm in the 'OnDoIt' routine. I had thought that a modeless dialog box would essentially run 'independent' of the main dialog but that doesn't seem to be the case. What have I misunderstood? ...

How to hide the dialog in a dialog based application..
Hi, I have a dialog based application which has MFC support.. (developed from class wizard...) Now, according to the my database situation, i want to show / hide the dialog.. so, what should i do ? What i do currently is, inside, oninit i start a thread and pass a dialog pointer.. now, after 500 ms of initialization, i will call ShowWindow(SW_HIDE) to hide the dialog.. and to work in invisible mode.. but this is not a good way.. so, any other way to hide the dialog before it gets shown.. ?? My exe should run in processes but it should not show the dialog only.. Hope you understand my...

Dialog::OnOK....
I want my dialog box to show a messagebox when I click "ok". With certain conditions I want my dialog box to return to it's original state and not close which nomally happens after clicking "ok" Is there an easy way to do this or do I need to create a command button? Thanks, RABMissouri Override the virtual function OnOK. If you don't call CDialog::OnOK then the dialog box does not close. void CMyDlg::OnOK() { if (MessageBox("Are you sure?","Exit",ID_YESNO) == IDYES) { CDialog::OnOK(); } } You can do the same thi...

Howto: Place icon in a Wizard dialog?
Being new to MFC, I was happy to read how the SetWizardMode() call of a CPropertySheet could reprecent a Wizard dialog automatically. I have one major problem with this build-in shortcut for creating wizards and that has to do with the icon - or lack there of - in the application. Apparently CPropertySheet is a specialization of CDialog WITHOUT the possebility of setting style for including an icon in the caption area. I tried: <CPropertySheet>.SetIcon(LoadIcon(IDR_MAINFRAME),FALSE); And many other things but neither yields an icon. I am quessing it is simply impossible to have...

How to display a dialog as part of a dialog
Hello, i have two dialog-resources in my project IDD_DIALOG1 and IDD_DIALOG2 and i want to be the second a "real" part of my first one. I don't want to show it modal or modeless, the user should not recognize that this are two dialogs. How can i do this or where can i get a simple example? Thx. This must be the third time we have had this question in the past week. The short answer to your question is : Declare the second dialog in your dialog editor as a Child not a popup. And then in the OnInitDialog of the first dialog create the second dialog like you would a modless (...

Handling mouse messages for a ListBox in a dialog created in the editor
I created a dialog in MSVC resource editor and placed a listbox in there for which I need to handle certain mouse messages (WM_LBUTTONDOWN) to get the cursor position when the button was clicked. I can't solve this by inheriting my own class from CListBox because the dialog is created in the resource editor? TIA. Sure you can; I do it all the time. Twice, this morning. Just create your subclass, and the use the classWizard to create a control member variable. Done. Take a look at my essay on Avoiding GetDlgItem for more details. joe On Thu, 06 Nov 2003 17:20:21 GMT, Daar <user@is...

File name list in the open dialog box.
In the open dialog box, how to delete the list of files appearing in the file name drag down menu in excel 2007? Not sure where you are finding this list. Do you mean the Recent Documents you see when you click on the Button? You can clear that by setting your MRU list to 0 under Button>Excel Options>Advanced>Display. If you mean the list you see when you go to Button>Open then you will have to set a new default file path to a folder that is empty. Gord Dibben MS Excel MVP On Thu, 4 Mar 2010 09:10:01 -0800, Acs <Acs@discussions.microsoft.com> wrote: ...

Pinning dialog on top of other dialogs
I have an MFC app[1] that is essentially a dialog app controlled by a process control layer. The control layer is responsible for hiding and showing the various dialogs. All of these dialogs are modeless dialogs created when the app starts (for speed reasons), then hidden, like so: pFrame->Log(_T("Symbol Bar loading")); m_pDlgSymbolBar->Create(IDD_SYMBOL_BAR, NULL); OnInitDialog: ShowWindow(SW_HIDE); When it's time for a dialog to appear, it is sent a message along with any new data. The dialog updates itself and calls its parent class to make it visible. It...

Transparent bitmap in dialog box
Hi! I want to display a bitmap in a dialog box. I use the resource editor to specify the bitmap. How can I make the bitmap transparent? For example; all white areas should have the same color as the dialog window. Regards /Anders I remember seeing examples on how to do this but for the life of me I now cannot find them! Try looking at: www.codeproject.com www.codeguru.com Larry "Anders W�hlin" <anders.wahlin@erv.ericsson.se> wrote in message news:bi2div$25b$1@newstree.wise.edt.ericsson.se... > Hi! > > I want to display a bitmap in a dialog box. I use the resou...

Dialog based application and generated OnPaint for the dialog class
Hello, I'm using MSVC++ 8.0 SP1 and I created a dialog based MFC application using the application wizard. In my CDialog-derived class, MyDialog, the appwizard generated the following OnPaint() for me: // If you add a minimize button to your dialog, you will need the code below // to draw the icon. For MFC applications using the document/view model, // this is automatically done for you by the framework. void MyDialog::OnPaint() { if (IsIconic()) { CPaintDC dc(this); // device context for painting SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc....

Open Dialog has changed
Hello When I click open the file listing has changed... For instance If I sort by filename the files are sorted but there is a line that says "A" then all the A files, a "B" then all the B Files etc. This is happening in all office applications but not in windows explorer. Has anyone seen this before and how to I retore it? Operating System has a lot to do with what Views are available, but if you select View in the dialog box you should have your choice there. Thanks wrote: > Hello > When I click open the file listing has changed... > For ins...

Log on dialog box
I don't need the log on box, but can't find out how to deactivate it. Can you help - please? Hi, ninner. "ninner" <ninner@discussions.microsoft.com> wrote in message news:6697A114-6951-4F86-A8D5-9B3B8467AA6D@microsoft.com... > I don't need the log on box, but can't find out how to deactivate it. Can > you > help - please? At an Administrator Command Prompt, enter: control userpasswords2 In the next window, clear the box that says, "Users must enter a user name and password to use this computer." RC -- R. C. White, C...