|
have you changed the dialog font?? from properties.
|
|
|
|
|
Why would I change the font? Does the dialog size scale based on the font size selected?
|
|
|
|
|
yes i had faced similar problem when i increased the dialog font size from properties.
|
|
|
|
|
and BTW the 500 width you saw was it in Resource editor??
If yes i dont think it is in pixels like your screen resolution.
Do GetWindowRect() to get the dialog width in pixels.
|
|
|
|
|
I see. I assume there is no way to diable this feature?
If not, I'll have to code the dialog manually (which I'd rather not do).
Changing the font is not really an option as it would have to be changed in a large number of places, for consistency. Something I don't have time for.
Is this problem a VS resource editor problem (feature?), or an issue with dialogs in Windows itself?
|
|
|
|
|
Brian Dunne wrote: I am designing a dialog with a width of 500 pixels.
Dialog's are measured in DLUs.
Brian Dunne wrote: My screen resolution width is 1680.
Screen resolution is measured in pixels. It's really a bad idea to design dialogs in terms of pixels. Screen resolution will vary from machine to machine, and any attempt to think about pixels at design time is doomed to failure. Don't even worry about it. If you need something sized in pixels to a specific size, you have to do it at runtime.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
typedef UINT (CALLBACK* LPFNDLLFUNC1)(DWORD,UINT);
...
LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer
The above declaration seems confusing and any easy way to declare func. ptrs.
|
|
|
|
|
I thought typedef is supposed to be easy way to declare function ptrs.
|
|
|
|
|
LPFNDLLFUNC1 lpfnDllFunc1;
is alternative to
UINT (CALLBACK* lpfnDllFunc1)(DWORD,UINT);
Which one does look simpler?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I think maybe he was looking for something simpler, like:
typedef UINT (CALLBACK* X)(DWORD,UINT);
...
X y;
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
or something more managed, like
delegate int X (int, int);
...
X x;
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi,
How can I maximize the dialog box?
|
|
|
|
|
call ShowWindow(SW_MAXIMIZED)
|
|
|
|
|
The final D is a common mistake (I did it often).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
|
Try ShowWindow(SW_MAXIMIZE);
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
use ShowWindow [^] with nCmdShow equal to SW_MAXIMIZE .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
If you want to maximized dialog you must also set postion and size of other controls that you can use of WM_SIZE.
|
|
|
|
|
Dear gurus,
I have the following question.
I heard/read somewhere that it does not make sense to check for a zero-pointer if operator new is used, as
int *p = 0;
p = new int [5];
if ( 0==p ) { ..some action here.. }
It also is allowed to use operator delete even on zero-pointers. ...and more such issues.....
Can somebody give me a short link to a good document on such topics?
Thank you very much
|
|
|
|
|
See here [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Another question:
If I want to use the no-throw-Version:
T *pt = new (std :: nothrow) T();
What happens if allocation fails? Can I test 'pt' for 0 then?
Or does pt have any undefined value?
|
|
|
|
|
Are you prearing for any interview??
|
|
|
|
|
Well, I think you may test in both cases.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
The C++ Standard guarrantees that new(nothrow) returns NULL if fails.
--
=====
Arman
|
|
|
|
|
Tomerland wrote: I heard/read somewhere that it does not make sense to check for a zero-pointer if operator new is used...
What if new fails?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|