|
Actually this predates Vista; on the NT side, even Win 2000 let you change the font size (small fonts, large fonts).
What you need to do is first handle the WM_DISPLAYCHANGE message, which tells you that some display setting has changed. Then, you need to resize and reposition the controls and background image to fit properly with the new settings. See (as an example) CResizableDialog[^].
|
|
|
|
|
Thanks Hans,
I will try it soon.
|
|
|
|
|
|
Thanks Charles,
I just checked out "Enable DPI Awareness" property does not come in VS2008. I will checkout in VS2010 tomorrow.
Thanks for the reply,
-Rahul
|
|
|
|
|
Hi ,
I have created a timer using ::SetTimer () and provided a TIMERPROC. This is working fine when I use ::GetMessage () , TranslateMessage () ,DispatchMessage in a Message Loop. I have not created this Timer for any specific window by providing NULL in first parameter to SetTimer ().
I have 3 threads and each thread will be having a Timer. Is it a good practice to use multiple message loop in an application. Wont they get messages of each other's message que.
|
|
|
|
|
A separate message queue exists for each thread that is having a message loop.
Each message loop will only process messages for that particular thread.
All window messages will be processed by its corresponding UI thread.
|
|
|
|
|
How can I get all combination of string whose lenght is spaficic (say 5) which can includes a-z charcter (all alphabet).
Can you suggest me something related to this to achieve it?
|
|
|
|
|
john5632 wrote: How can I get all combination of string whose lenght is spaficic (say 5) which can includes a-z charcter (all alphabet).
You mean, like, permutations of a string?
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
Isn't this just a different way of saying who is capable of doing this homework assignment?
The emphasize on length is just to fool the reader
I am a HUMAN. I have that keyword in my name........
_AnsHUMAN_
|
|
|
|
|
Haha. That makes sense.
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
not permutation, I need to search the string of particuler length, It can be any combination from a to z. How to do that?
|
|
|
|
|
john5632 wrote: not permutation, I need to search the string of particuler length, It can be any combination from a to z. How to do that?
So, you need to search a string? Is that some sort of a c++ string object, or a character array, or do you have to implement a search, etc., What exactly do you need?!
Please read this post[^] and include all relevant information so that someone can answer your question. It's ambiguous, and confusing right now.
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
john5632 wrote: I need to search the string of particuler length...
That's a vastly different request than you initially posted. What exactly are you looking for? Be specific. Provide examples. Show pseudo code. What have you tried so far? Have you taken preliminary steps and worked this out on paper first (if not, how can you possibly expect the computer to know any different)?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
|
Just count, in base-26 , from aaaaa to zzzzz (11881376 items in base-10 , if I got you).
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
[My articles]
|
|
|
|
|
i have checkbox...
i want when i check my checkbox,my DLL know that i checked
someone have solution?
thanks so much
|
|
|
|
|
The checkbox checked notification is sent to the parent dialog of the checkbox.
You will need to call some method in the DLL when you get this check event.
The event is BN_CLICKED .
|
|
|
|
|
i understand your idea but i don't know how make it..
can you write a sample ( function GetEvent) for me?
or any document to understand it...
thanks Hans
|
|
|
|
|
I elaborate just a bit the good Superman's answer.
The CheckBox 'check' is a GUI event and should be handled by the GUI code (as Superman already suggested, you typically handle the BN_CLICKED notification code of the WM_COMMAND message in the parent window of the CheckBox control).
The best way to 'notify something' to a DLL is calling a DLL 's function. So:
- Define a
DLL function, e.g. OnMyCheck() . - In the parent window of the
CheckBox control handle the WM_COMMAND message: on BN_CLICKED notification coming from the CheckBox control call in turn the DLL 's function OnMyCheck .
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
[My articles]
|
|
|
|
|
both good answers, my 5 to both.
|
|
|
|
|
thanks so much
|
|
|
|
|
I am using cFileDialog to save a file on disk, I used OFN_OVERWRITEPROMPT flag to prompt for overwriting a file. Is there anytihing can be done if drive is full?
|
|
|
|
|
You mean you're using cFileDialog to get the filename or to save the file? (or both?)
Er, um - why wouldn't you just catch the error-code generated by calls to CreateFile or WriteFile - surely there will be a hint of the lack of diskspace there??
Alternately, if you wish to prevent the selection(creation) of a file on a disk that you already know to be full - wouldn't you just check the returned path from an OpenFileDialog - ensuring that it doesn't exist on the full disk. If the prohibited disk is chosen, you could just re-show the dialog along with a message advising the user to choose a location on another drive.
|
|
|
|
|
You might check for sufficient disk space (using GetDiskFreeSpaceEx) before asking for a specific file path, but then you would be assuming the partition or disk to be known beforehand. Or you might check all partitions to make sure each of them has sufficient free space, but then every small or full partition would distract the user's attention. So you have to choose an approach that fits your most likely situation.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
The file dialog only responsibility is too get the name of a file (and path), it does not know the size of the data to be written to the disk.
You could add a hook to warn about low disk space when the user change the path in the file dialog.
It's your job to handle errors from the various APIs and SDK calls that will create the file.
Watched code never compiles.
|
|
|
|