|
If you don't get that solution working. I suggest you to use radiobutton. Radiobutton is more for exclusive selections and checkbox for multiple selections.
Here[^] (section "Using the Dialog in Your Application") you have an example (you can also take a look on the whole contents, it may have infos for other questions you have).
[quote from chapter 2]
The Check Box Control
A check box is a square that the user can click to check or uncheck. The check box control is used to turn a particular value on and off. They are basically on/off switches with an occasional third, in-between state. You normally use check boxes to control discrete, on/off-type variables.
The Radio Button Control
A radio button is a circle that the user can click to fill with a black spot. The radio button is similar to the check box control, but it is used in a group of two or more where only one of the values can be in the on state at a time. You normally use radio buttons in groups of at least three, surrounded by a group box. The group box allows each group of radio buttons to be independent so that only one radio button in each group can be in the on state at any time.
[/quote]
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Thanks Nelek for your detailed advice.I will try Radio Button Control.
|
|
|
|
|
You are welcome
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Hi Expert,
Please help me
How to set a tooltipCtrl to be popped up from the system tray ?
Thanks,
Spk
|
|
|
|
|
|
Just adding to the above reply, you could consider using CPPToolTip v2.1[^], which I thought was very good.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
I'm trying to use my own image (.png) as a ribbon button.
I've managed to place a windows icon on my custom button using this code
<code>
STDMETHODIMP CConnect::GetCustomUI(BSTR RibbonID, BSTR * RibbonXml)
{
if (!RibbonXml)
return E_POINTER;
*RibbonXml = SysAllocString(
L"<customUI xmlns=\"http://schemas.microsoft.com/office/2006/01/customui\"\>"
L"<ribbon>"
L"<officeMenu>"
L"<menu idMso=\"FileSendMenu\">"
L"<button id=\"OfficeButton1\" imageMso=\"HappyFace\" label=\"Happy Print\" description=\"Prints a random joke in the footer of each document\" onAction=\"ButtonClicked\"/>"
L"</menu>"
L"</officeMenu>"
L"</ribbon>"
L"</customUI>"
);
return (*RibbonXml ? S_OK : E_OUTOFMEMORY);
}
</code>
From what I've googled, I'm supposed to create GetImage or LoadImage callbacks. How to do this?
|
|
|
|
|
he:
How many files can be created by methord "GetTempFileName()"
wait answer.
|
|
|
|
|
See here[^], looks like as many as you want.
|
|
|
|
|
65,535 if the path and prefix are the same.
"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
|
|
|
|
|
In practice when a folder contains more then 6-9000 files Windows isn't happy anymore..
|
|
|
|
|
I have Resource ID (for a stringtable value)in string format. ex ("IDS_VALUE").
How can i convert it into ID format (UINT) to get the the string using LoadString method.
If anybody come across the problem .pls let me know the solution.
Advance thanks!
|
|
|
|
|
Just curiosity: how can be you have just the string?
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]
|
|
|
|
|
the string containing the ID was "composed" using predefined strings from a XML file.
modified on Thursday, January 7, 2010 3:36 AM
|
|
|
|
|
Intead of "IDS_VALUE", you can keep the actual integer values like "2344" in the XML file. And you can easily convert the "2344" to 2344 by using atoi().
|
|
|
|
|
this was an idea, but i want to keep the xml file readable.
if a tag is 2344 instead of NAME (e.g.), it will be difficult to do that.
|
|
|
|
|
Directly to put forward a corresponding relationship between int an string
|
|
|
|
|
You should maintain both the string value and the corrensponding numeric one inside the XML file. IMHO you've no way other than parsing the resource.h in order to decode the string (BTW why are you building a XML replica of the resource.h file?).
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]
|
|
|
|
|
Thank you. I will use a map eventually (the xml file will remain the same).
There is a strong relation between stringtable values in resources and the data from the xml file, but is not a replica .
|
|
|
|
|
Using a map<string, int=""> would be fine.
|
|
|
|
|
You can also use strings rather than integers to refer to your resource items. If you do not give resource names a #define value, then you can refer to them by the name as string value, rather than its integer equivalent.
|
|
|
|
|
i dont't want to use #define because i use stringtables for different languages.
a map seems to fit to my needs.
|
|
|
|
|
ronovice wrote: i dont't want to use #define
That is what I was trying to explain in my previous post. If you do not use #define then the resource names can be accessed by their actual name as extracted from your XML, no need for a map or any other type of transform.
|
|
|
|
|
i wanted to use LoadString method which will need as parameter a UINT, but i have only the string .
How can I get from resources the text associated with that UINT if i cant convert the string to UINT ID?
if there is another solution(even without using LoadString), I will gladly use it.
|
|
|
|
|
You could try using FindResourceEx()[^] rather than trying to access it directly. This should allow you to use the name as a string and also to select which language you wish the string to be in.
[edit]My apologies, this does not hold true for STRINGTABLE entries, although you could possibly use a user defined resource type.[/edit]
modified on Thursday, January 7, 2010 8:14 AM
|
|
|
|