|
|
I am having a problem when the resolution of the screen changes in my app. I made the app in a high resolution and the borders and the drawings i make in the app seems great in that resolution, but when i change the resolution to a smaller value and i execute the program every thing will out of order then i decided i have to scale down the dimension of every drawing depending on the resolution selected but i was wondering if there was a suitable factor (scale down or scale up ) factor taking one of the resolutions as a base for example if the scale factor in 640*480 is 1 then the scale factor @ 800*600 is 0.72 or smtn like that if so pls let me know
|
|
|
|
|
i also experienced the same problem, and some of the applications which i found , doing this fairly well..
i solved my problem temperorly like, i made two kind of GUIS, one for higher resolution and other for lower resolution,
but i heard that some of the activex's available in some site can shrink/grow our graphices elements as well as the controls according to the screen resolution..
i am also searching for a solution for this..i posted the same problem 2-3 times here..but no one answered me..!!!
programming in VB is like riding a kiddy bike, while programming in C++ is like driving a Formula 1 racing car
|
|
|
|
|
Hi
Get the clientrect using the GetClientRect and resize the controls @ the
onsize event(ie add resizing code). Hope this might help you
Sujan
|
|
|
|
|
Yes, because designing to 'the resolution' will always get you into trouble.
Resolutions and aspect ratios appear differently on different monitor types and the windows coordinate mapping can be different inside dialogs for diffeent fonts, or if 'use small fonts' is enabled. You need to dynamically size your items.
You can use GetCLientRect for interior drawing or GetWindowRect if you are drawing the entire window area.
|
|
|
|
|
OK, I'm writing an app (in win32 / plain c++) and I need to have several toolbars in the main window. These toolbars must be flat-style, and be a mixture of text and non-text buttons - in other words, I need to use toolbar features only present in common controls 5.81 and above (win2k+ and winME+)
Now, I'd also like to support Windows NT and Win9x as the rest of my application has no such limitations. So the problem I'm facing is, what do I do to get the toolbar functionality on these "lesser" platforms?
Option #1 is write my own toolbar UI code completely from scratch.
Option #2 is to make my app "fail gracefully" and use "normal" toolbars on the older O/Ss.
(yuck, I really hate the boiler-plate code required to get those horrendous toolbars up and running)
I've already done option#1, it wasn't too hard and I'm quite happy with the result. The problem is, although my app is now 100% backward compatible, it is no longer future compatible - i.e. when new features / themes are introduced, my application won't be able to take advantage of them unless I rewrite the toolbar code.
So what would you do in my situation? Deploy custom, bespoke non-standard toolbars that behave *exactly* as I want them to, or suffer the limitations of the *cough* cruddy *cough* standard windows toolbars?
James
http://www.catch22.net
|
|
|
|
|
Maybe you can wrap your class so that, when available, it delegates on the common control. Best of both worlds.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I would say Option 2. I love consistancy. If you are running NT4 and you install a new app you would expect that the GUI elements would be consistant with other apps. You dont want one app that has a custom coded toolbar to look like toolbars in Win2k and another app where they have made the toolbar look like a Mac program and other apps that have the standard NT4 type toolbar.
|
|
|
|
|
Hello group,
I was wondering if you guys can help me out to understand how to create a link list holding a copy of a structure and a link list holing a pointer to a struture.
Any clue?
Thanks in advance
Jim
Thanks
|
|
|
|
|
Are you rolling your own data structure or are you using the one in the STL? If the latter, I think it's as simple as:
struct mystruct<br />
{<br />
int num;<br />
char val;<br />
};<br />
<br />
list<mystruct, mystruct> mylist;<br />
list<mystruct*, mystruct*> myptrlist;
I don't use the STL, so this might be a tad off.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Thanks David,
There was a forgotten point. It should be:
mystruct mylist;
right? or I'm missing somehing. Since the code doesn't point to the structure itself. But my point was how can I put pointers to a structure into a link list instead of its copy.
Thanks
Thanks
|
|
|
|
|
Jim Smith1 wrote:
There was a forgotten point. It should be:
mystruct mylist;
right?
I'm not sure what you mean by this.
To add to the first list, use:
list<mystruct, mystruct> mylist;
mystruct ms;
mylist.insert(ms); To add to the second list, use:
list<mystruct*, mystruct*> myptrlist;
mystruct *pmystruct = new mystruct;
myptrlist.insert(pmystruct);
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Ok, first thanks for your help. Honestly, I'm kind of confused.
I'm assuming the first one makes a copy of a structure into the link list
and the second works to copy a pointer to the sturucture into the list.
Correct?
let me know please.
Thanks for reading my aticle
|
|
|
|
|
Ramsin wrote:
I'm assuming the first one makes a copy of a structure into the link list
Correct?
Yes. I think you'll need a copy constructor and/or an assignment operator for it to work, though.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Can you suggest how I could proceed?
At present there is a directory and it contains pdf and txt files. Every day some person opens this directory and prints and deletes these files.
Is there an API or some generic method to move the contents this directory to an outqueue that would print. I know how to read through the directory (CFileFinder) but how do I go about submitting these files to a writer?
thanks
|
|
|
|
|
The easiest way would be to use ShellExecute(..., "print", ...) .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
How can we ensure that menu and button accelerators (&<letter>) are displayed when the dialog or application are created? Our application only shows the underlined characters after the ALT key is pressed. On the menu, the underlined characters go away, but on the dialog they stay. We'd like the underlines to always show up.
This seems to be an application-wide setting. For example, notepad and internet explorer 6 don't show the underlined characters until the ALT key is pressed. Mozilla and Outlook do. I know that this is a display setting in XP/2000, but there has to be some work-around since all the office programs have persistent underlines for the hotkeys.
Thank you,
Josh Lindenmuth
Paytime, Inc.
jlindenmuth@paytimepayroll.com
|
|
|
|
|
You are right that it is a display setting ( SystemParametersInfo (SPI_GETKEYBOARDCUES, 0, &bSet, 0) ).
But my copy of IE6 hides the _ until the Alt key is pressed too.
My guess is that Mozilla et al draw their own buttons and (naughtily) ignore the users preferences.
I know Office apps reimplement loads of controls each time a new version is released. Then the rest
of us who want to look "modern" play catch up!
You could also do owner draw windows, but that sounds like a lot of hard work!
Surely this is a choice your user makes, not you. If they want to the _s that much, show them how
to toggle the preference. If not, let them not see the _s, as that is how they want it!
Iain.
|
|
|
|
|
The problem is that hiding the hotkeys is the default behavior in Windows 2000/XP (so the users don't "want it", they just don't know any better). We also have hundreds of clients who are relatively computer illiterate, and think they can't use the keyboard to access all buttons (which they can).
Since hotkeys are always visible in Office, Outlook, Mozilla, and many other applications under XP/2000, it is difficult to believe that Microsoft and others are spending the time to create new controls or owner drawn windows just to enable hotkeys to be visible ... seems more likely that there is an application setting somewhere.
Thoughts?
Josh Lindenmuth
Paytime, Inc.
jlindenmuth@paytimepayroll.com
|
|
|
|
|
Josh Lindenmuth wrote:
it is difficult to believe that Microsoft and others are spending the time to create new controls or owner drawn windows just to enable hotkeys to be visible
Microsoft seem to have a team that redesign the UI in order to keep us all on our toes playing catchup. They are always changing the GUI style.
I guess Mozilla uses open source cross platform libraries and therefore does not look for the particular windows settings.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Josh Lindenmuth wrote:
...it is difficult to believe that Microsoft and others are spending the time to create new controls or owner drawn windows just to enable hotkeys to be visible...
Actually, it's all too plausible. Just look at the new menu styles, the flat look brought in by
Encarta, etc. The underlining bit is probably incidental.
There is nothing to stop your application calling SystemParameterInfo (SPI_SETKEYBOARDCUES, ...).
But this could be in your options page, with a note above it warning that it has an effect on all programs.
Or, when the program is first run, or at installation, detect the setting and ask if the user wants
to change it. And so on.
My company supplies PC with my software preinstalled. So it is the reason that PC exists. So I don't
have to be a good software citizen. But it would annoy me as an end user if software I installed
unilaterally overrode my settings. Prompting me that changing them may improve my experience is a
valid compromise...
Iain.
|
|
|
|
|
|
This is a user-configured thing (i.e., what would the user think if an application came along and overruled their UI settings).
You've probably already found this, but right-click the desktop and select Properties. Click the Effects tab. Un/check the "Hide keyboard navigation indicators until I use the Alt key" checkbox.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi guys!
I'm looking for a quicktime expert (or C++) who tell me how I can get the header of a Quicktime movie File. I know that The movie header is inside a QTAtom named MovieDirectory but I don't know how access to that atom starting from the movie File.
I'm using the QT6SDK. There is a GetMoviePropertyAtom function but I didn't understand what this function really do.
Thanks a lot for your help (if you can....).
Mokkari
P.S. I'm sorry for my english. I know it isn't very good.
|
|
|
|
|
hi gang!
am wondering if win32 memory mapping using "CreateFileMapping" ,"MapViewOfFile" ,"OpenFileMapping" ...
is thread safe or not ?
i mapped a queue in the file mapping section and i must know if this section is syncronized by default or i've to sync it manually .
please give me u'r clues .
many thanks in advance !
network security programmer from middle east!
|
|
|
|