I believe that, since you could understand your first solution well, you can implement this easily. :) Or, are you in any trouble with that?
- ns ami -
I believe that, since you could understand your first solution well, you can implement this easily. :) Or, are you in any trouble with that?
- ns ami -
:) Well, you missed WS_TABSTOP style.
AJ83 wrote:
m_ceEdit->Create(WS_VISIBLE| WS_BORDER |ES_READONLY, CRect(10, pointY, 130, pointY + 25), m_gbGroupBox, ID_CURRENT_SN_EDIT + i);
And the following is not needed...
AJ83 wrote:
if (x > 0) { CEdit* pEdit = (CEdit*)GetDlgItem(nCtlrID - 1); m_ceEdit->SetWindowPos(pEdit, 10, pointY, 130, pointY + 25, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE ); } m_ceEdit->ShowWindow(SW_SHOWNORMAL);
- ns ami -
In this case the tab order will be same as the creation order. So no need to set the Z-order again. Anyway, is this a compilable code? Argument count of SetWindowPos seems as wrong. Note that you are creating edit control as child of that GroupBox (a static control, i think). In that case the tab key navigation will not enter to the controls inside the GroupBox. Applying WS_EX_CONTROLPARENT style to GroupBox will help you. For instance, m_gbGroupBox->ModifyStyleEx( 0, WS_EX_CONTROLPARENT );
- ns ami -
I presume that "dynamic edit box" means you are creating edit box dynamically at run time. If so, you can use SetWindowPos API to set the Z-order of edit control. You will get more information from the API documentation. The parameter hWndInsertAfter (or pWndInsertAfter in the case of MFC) can be the window handle of control, which is needed to be before in tab order. For example, m_edit2.SetWindowPos( &m_edit1, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZER | SWP_NOACTIVATE ); This will set the tab order as edit1 -> edit2. Hope this info will help.
- ns ami -
Thank you for the reply. Now, I think it is better if we dynamically manage dialog bar controls than going for chevron feature. Also chevron is from rebar control, which does not support docking.
- ns ami -
Hi, My intention is to find the best possible method for my requirement. Please share your ideas. Requirement: I need to create a dialog bar (I think so) in which I have to place controls (including some custom controls) dynamically. The controls can be placed in one row or more according to a dynamic setting. If there is not enough space to hold all the controls, a drop down button should be there at the right side of the dialog bar. When that button is pressed, the remaining controls should be listed as a popup. The dialog bar need to be dock-able too. My plan: Searching for direct support in MFC/Win32. If there is no such support, I am planning to create a custom dialog bar (or derive from CDialogBar) and implement the rest. Thank you.
- ns ami -
Emilio Garavaglia wrote:
Who are you to disable my system's features if I didn't authorize you to do so?
I am not disabling any system feature than making my application react differently... for example, when pressing Print Screen key, my application will be painted as black. That's all! :) And if I give the user full permission to take copies as he/she desires, then I have to raise the price of the product that much higher in order to meet development expenses and all. That cannot be bearable for the user. And I am not creating an open source application. So I have to deliver the product with a minimum price tag, and with enough profit. If the user makes copies and spread it easily, then my product will end in loss of money. Especially if the product is for a specific kind of people (say, technical students).
- ns ami -
Iain Clarke, Warrior Programmer wrote:
That was my guess, really.
Great! :) Your points are really valuable. I too believe that 100% foolproof software cannot be created. But I am trying to increase the difficulty to take unauthorized copies so that its frequency will get decreased. Thank you for your suggestions!
- ns ami -
Iain Clarke, Warrior Programmer wrote:
Are you embarrassed about your UI design?
Never! But if the application is a viewer for a confidential document? And if the vendor never interested in redistribution of that document without his approval? :)
Iain Clarke, Warrior Programmer wrote:
I suppose you might be able to RegisterHotKey and grab PrntScr for yourself.
Thank you. I have to check that and similar things to avoid Print Screen.
Iain Clarke, Warrior Programmer wrote:
But users could run some other screen capturing program. Using DirectXYZ won't help either - people take screen captures from games, after all.
Yes. But trying to avoid such things to the maximum possible extent.
Iain Clarke, Warrior Programmer wrote:
You could look to replace the shell, so people can't run other applications. But will your software also come with an armed guard to stop people from taking photos of the screen? Placing their flat screen on a scanner?
:D
- ns ami -
That's nice... :-D
- ns ami -
Hi, Is there a way to avoid taking screen shots of my application? I need to avoid Print Screen as well as other utilities doing the same. Any suggestions or hints are greatly welcome. :) Thank you.
- ns ami -
Thank you for your reply. As you mentioned, the order can be based on hue. I have already done some experiments with that. If we use HSV or HSL color model, and then the priority is as hue > sat > val/lum, still the order was not satisfying. Then I tried CIELAB, but have no idea on how to sort the colors in this color space. In some sites, it is said that this color space is best for our (human) perspective. I just want to get an order in the appearance of colors. I doubt, it is not so easy to sort and list the colors in one dimension. Trying again and again... :)
- ns ami -
Hi, I have a list of colors (with RGB value and name). I need to sort them according to the RGB. The list is expected as linear (1 dimensional). Sorting means, similar color (for eg., shades of blue) should come nearby. From googling I found that CIELAB color space is better to use for this. But even though I converted to CIELAB and do a lot of experiments, I couldn't sort successfully. If you have some suggestions or guidelines please share. Thank you.
- ns ami -
Thanks! But why a reply now, after years? (just due to curiosity) :)
- ns ami -
For both hardware adapter and Microsoft Loopback adapter, the type obtained is MIB_IF_TYPE_ETHERNET. Not MIB_IF_TYPE_LOOPBACK for Microsoft Loopback adapter. So I cannot distinguish which is the hardware adapter.
- ns ami -
Did I miss something??? :confused: If you mentioned about MIB_IF_TYPE_ETHERNET, it is coming same for both real hardware and microsoft loopback. Could you please clarify?
- ns ami -
Hi, How can we identify the valid hardware MAC address from the list obtained by GetAdaptersInfo API? For example, in my machine there is a real Network Adapter and a Microsoft Loopback Adapter. I need to get the MAC address of the real Network Adapter. Thanks in advance!
- ns ami -
rnendel wrote:
Hope this helps Of course, based on the date of the post ( 3 years ago ), probably not LOL.
This solution was not applicable (at that time) I think... :)
- ns ami -