|
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!
|
|
|
|
|
Short answer is no.
Its not any more thread safe than un-file-mapped memory. The only real difference is that
your changes are occasionally flushed to a file, and that it can be reflected in memory
in another process.
On another note, if you are using the mapped memory between processes, then any variables
in it that are pointers are unlikely to be valid in the other process. So a queue may
be dangerous, depending on how you've implemented it.
You can get around the synchronisation problems by using named synch objects in both processes.
Iain.
|
|
|
|
|
hi,
i want help:
i want to make an Address Book for the MS-Outlook to use it from a customized message form.
i made a personal form to send an sms`s using the same form of new message.
any way, the Address Book i`m trying to make is an Address Book that will just show the contacts whom have a mobile phone number in there properties,
will u plz help me, i can`t know where to start from, or how.
thanx alot
i hope to hear from u soon.
|
|
|
|
|
Dear Friends,
Sometime my application gives an error and an abnormal error dialog box gets created and immediately after that my application closes. Also some time my application hungs-up.
I am not able to find out the actual error because usually it never happens but sometime it happens and that is why it is not easy to track errors.
1. Thus please tell me how to create a log file to track of each operation.
2. Also I would like to track few errors like access violation, abnormal error window generation.
As I am also unable to get the exact error so I cannot give any more idea abt errors so it may help if I can create a log file or can track few errors as specified.
Thus please help me to find out the solution.
Also please write to me whether I can make my program to generate a particular error to check whether my preventive measures are working properly.
I am new to VC++ and at present I am unable to find any solution of it. Although I find a function say GetLastError(), but how to use it, to a particular error, I am not getting........I think WM_ENABLE message may also help me in case of hung-up but how to add this message to class wizard?
Thus please help me to find the solution...
Thanking You in advance.
Billar
|
|
|
|
|