|
We already know from OP what you want to decrease...
However, we don't know how you are doing it. Richard MacCutchan asked you to post the code related to your problem, but you only have posted some irrelevant lines of your code.
So sorry! 
|
|
|
|
|
You imagine a window has Edit control i have to draw rectanle or Edge inside non client area of Edit Control so i have to decrease the width of clint area of edit i think and draw rectangle or Button Shape ( with drawedge api ) between windowrect.right and clientrect.right
|
|
|
|
|
Sorry! i cannot imagine what you meant without seeing the code you implemented for this action!
|
|
|
|
|
how you Draw button inside edit control (t1he right side) ?
to do this i have to make some space in non client area , not client area if button draw in client area when user enter char in edit control , that area ( right side of edit control ) disappear and when move cursor outside again appears
|
|
|
|
|
Member 11803607 wrote: how you Draw button inside edit control (t1he right side) ?
I don't. I never needed it to do myself.
Member 11803607 wrote: to do this i have to make some space in non client area not client area if button shape draw in client area when enter char in edit control that area was drawn button disappear and when move cursor outside again appears
What exactly are you going to achieve? What kind of "button" are you trying to insert inside an edit control and what for? 
|
|
|
|
|
i think i asked my question in wrong forum , if somebody work with api fubction maybe can help me .
|
|
|
|
|
Member 11803607 wrote: i think i asked my question in wrong forum , if somebody work with api fubction maybe can help me .
Then, please, rewrite your question much more clear enough to to understand what you want, need, ... and where would be the best place to ask!
|
|
|
|
|
I do not know what that is supposed to be, but that code will not even compile.
|
|
|
|
|
Some variant of Qt?
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Take a look at the afxeditbrowsectrl.cpp file. It contains the source to CMFCEditBrowseCtrl which (I think) does exactly what you want.
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
The problem is that the WM_NCCALCSIZE message with WPARAM 0, is only sent when the Window is first created. If you are subclassing the Window then you will never see that form of the message, because you cannot subclass until after it has been created.
|
|
|
|
|
Cannot Put Gif If Can Show My Problem
|
|
|
|
|
I have been investigating these messages and my opinion is that it will be very difficult to achieve what you want. In order to make it work you need to adjust the client size every time the Window moves or is resized. This means keeping track of the Window (or Control) in terms of size and position, and recalculating the values that you need. And, to be honest, Windows does not really want you to do it this way, so a rethink of your design would be a better idea.
|
|
|
|
|
There is a CComboBox with three string in dropdown. I want to pop up a message if I didn't select anything from the drop down and press a button.
I tried checking using CComboBox variable like m_combo.IsEmpty() but it didn't work.
How can I check whether it is empty or not.
|
|
|
|
|
Member 14575556 wrote: it didn't work. That does not help to understand your problem. Please provide precise details of your code and exactly what results you get.
You appear to be building this project question by question in this forum. Time to take stock and do some internet searches, and reading of the online documentation for the MFC classes, many of which include sample code.
|
|
|
|
|
Depending of your CComboBox style, you can check either
if(CB_ERR == m_combo.GetCurSel())
{
}
or
CString sValue;
m_ComboBox.GetWindowText(sValue);
if(sValue.IsEmpty())
{
}
|
|
|
|
|
Member 14575556 wrote: I want to pop up a message if I didn't select anything from the drop down and press a button. Don't allow button to be "pressed" unless a selection is made. Allowing the button to be "pressed" if one or more controls are in error violates the basic principles of GUI design. Not to mention it is extremely annoying.
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
That's not a given.
Tying the validation to the button "click" ("record" validation) is a lot simpler than context /
field validation.
In this case, he would have to "disable" the button (to "not allow a press"), then enable it when a selection was made.
The more fields, the more "options", the more complex the enabling / disabling logic.
So, "it depends".
The Master said, 'Am I indeed possessed of knowledge? I am not knowing. But if a mean person, who appears quite empty-like, ask anything of me, I set it forth from one end to the other, and exhaust it.'
― Confucian Analects
|
|
|
|
|
Gerry Schmitz wrote:
Tying the validation to the button "click" ("record" validation) is a lot simpler than context / field validation. True, but that does not make it right.
Gerry Schmitz wrote:
In this case, he would have to "disable" the button (to "not allow a press"), then enable it when a selection was made. Which is extremely easy. A "balloon tip" on the OK button briefly telling why it is disabled makes it even more intuitive.
Gerry Schmitz wrote:
The more fields, the more "options", the more complex the enabling / disabling logic. Only if done incorrectly. Yes, a common approach is to sprinkle enable/disable code all over the place to do that very thing, but that's what adds unnecessarily complex (and possibly unmaintainable) code.
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
I am trying to access of Google Chrome's web-page to read it and perform some actions for that I have to enable accessibility for chrome below is my sample code but it is not working for chrome.
IAccessible *pCAcc
..
...
IServiceProvider *pServProv = NULL;
pCAcc->QueryInterface(IID_IServiceProvider, (void**)&pServProv);
ISimpleDOMNode *pNode = NULL;
if (pServProv)
{
const GUID refguid = {0x0c539790, 0x12e4, 0x11cf, 0xb6, 0x61,
0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8};
HRESULT hresult = pServProv->QueryService(refguid, IID_ISimpleDOMNode,(void**)&pNode);
//This QueryService call is failing for chrome browser. BUT but if install "FireFox
//browser " in my system this
// QueryService is working for chrome and firefox perfectly.
if (SUCCEEDED(hresult) && pNode != NULL)
{
//some code
}
}
What I have tried:
if install "FireFox browser " in my system this QueryService is working for chrome and firefox perfectly.
MY Question is :Is there a way to get it to work "chrome browser" without having firefox installed in my computer?
Can anyone explain what are that component or module or dlls are installed with FF browser.
|
|
|
|
|
|
Did you debug the code before and after you installed FireFox ? Maybe in this way you can know what exactly is not working in your code.
modified 25-Sep-19 7:08am.
|
|
|
|
|
Yes I debug the code when FF installed QueryService(...) is return success. if I uninstalled FF browser it returns fail "hresult = E_FAIL"
I am assuming some components or dlls are installing after FF browser installed so that chrome also working.
I want to know what dlls installing with FF browser
|
|
|
|
|
In this afternoon I can tell you a little software who can know what dll is installing on your PC when you install Firefox. I don't rememeber his name, but I have it at home.
|
|
|
|
|
The program that I am talking about is called RegShot[^], I haven't had it anymore, but as far I am see now, I don't know if it tell you about dll's, but you can retrieve valuable data when you install something, even Firefox.
Short documentation: How to Use Regshot To Monitor Your Registry[^]
|
|
|
|