Loading default drag and drop cursors into my app - winapi

I am trying to implement drag and drop in my listview control so I can rearrange items.
I want to use system default cursors to indicate when drop is/isn't allowed.
I have checked documentation for LoadCursor function and have found nothing.
The best resemblance I could find was for the case when drop is not allowed -> IDC_NO has the same look as the cursor in OLE drag and drop, but it is red ( I have tested this on my Windows 7).
QUESTION:
How to use LoadCursor (or some similar function) to load default cursors used in OLE drag and drop?

If you use LoadCursor, then you must set it later with SetCursor: https://msdn.microsoft.com/en-us/library/windows/desktop/ms648393(v=vs.85).aspx

Related

SWT Table - How to change columns width using keyboard only?

I am using SWT tables in my project and there are few columns which are having longer strings which are not completely visible by default (for ex. path to a file location). Though I have tooltip to show the content and using mouse we can increase the column width to see the complete value.
Is there a way to do it with only keyboard usage?
Note: This question is more related to accessibility.
The following answer is based on my experience under windows. It can be different for other OS.
I'm afraid that there's no keyboard-only default way to adjust the size or reorder the column in a table, tree view or list view.
This is true not only with SWT but also with all other frameworks based on native win32 such as wxWidgets.
You must provide a keyboard-only way to resize and reorder columns yourself. here are a few ideas implemented by some applications:
Provide an option somewhere in the application that opens a dialog box with a checkbox list of the different columns. Ctrl+Up/Down to swap two items. Check/uncheck an item with spacebar to make the column visible or invisible.
Make the headers focusable. Use Shift+Left/Right to resize, Ctrl+Left/Right to swap two columns. Application key / Shift+10 opens a context menu where you can check/uncheck columns to show/hide and an option to open the column selection dialog box.
Some screen readers allow to do it by simulating mouse operation in some way. For example, use Jaws cursor, click lock on a header, release lock on the header to swap with.
But it's quite complicated, not always reliable, and thus very rarely actually used.
This is a very good question. I would be happy to give 100 rep to someone giving an answer being for windows and:
generic, working by default, everywhere or in most cases
Independant from screen readers (Jaws, NVDA, etc.) and techniques that simulates the mouse with keyboard (mouse keys)
Unfortunately, I don't think it exists.

Oracle Apex Onscreen Keyboard

I want to developed restaurant management system on Oracle Apex front-end like below screenshots taken from desktop applications which was developed on .net. I just want to show my developed numeric keyboard on screen and to prevent device keyboard to be opened throughout application. I'm using oracle apex 18c. You will get my point clearly after looking into below screenshot.
You need to create the layout manually. In this case default components are not going to help you a lot, If I were you, I will try to create my own html and css and implemented into static region.
Yes, it is possible to create this layout in APEX, There is more than one approach to develop this layout.
One of the easiest approach is:
Create a static region with text fields and buttons which executes
dynamic actions on click.
If you want to display the clicked Button text, store the value in an
APEX Item and return it so that it will be displayed in the page.
Easy pease, just remember that APEX apps are responsive and things may look different in certain screens.
You can create Static Regions with button or page items and have them occupy a spefici number of columns (Column Span property). that should work for your grids.
For the inputs, instead of the template being "Floating" or "Optional Above", just change it to "Optional", which will make the labels stay on the left side. Btw, when you change it to optional it will enable a "Label Column Span" which you can use to define the size of the label.

Is there a standard way to create "combined" Windows cursors (e.g. Arrow+Stop)

It is well known that the WinAPI offers a number of default cursors. Among these, there is for example the default arrow (IDC_ARROW) and a "stop" icon (IDC_NO).
When using drag'n'drop in the Windows Explorer (e.g. in Windows 7), you can notice that Windows shows a combination of the two aforementioned cursors when dragging a file to some place where it cannot be dropped. This cursor does not exist as a .cur file and it cannot be configured in Windows' mouse setup.
I didn't stumble upon any obvious function to "combine" cursors, so I'm wondering if there's a default way in the WinAPI to create a cursor like the one in the example, or if I have to toy around with the two cursors manually and blit them together into a new cursor on my own.

How to add more than 254 Controls in vb6?

I'm working with VB6 and I have one form with multiple tab controls.
When I drag and drop any control in form it shows me this error:
VB6 has a limited number of named controls per form. To add more controls, you can use a control array. That means, give some related controls the same name, then you can access them by name and index number. So instead of OptionAlways, OptionMaybe, and OptionNever, you could have Option(0), Option(1), and Option(2).
Also, if your dialog is very complex and most of its features are rarely needed, consider moving some options to additional dialogs behind an [Advanced...] button.

UI alternatives for Drag & Drop

I'm implementing Drag & Drop for an application of mine so a user can drag some item to a folder. Regardless of the programming language/Gui Framework I used I never liked implementing Drag & Drop code at all.
Further I often see computer users who don't use Drag & Drop if you don't tell them exactly how it works. They are searchig for an "Add"-Button instead of just dragging the item to the folder for instance (I have seen this in iTunes several times).
So I ask myself if there isn't a better alternative to the Drag & Drop paradigm. You could for instance blend in context sensitive buttons near every item when a folder is highlighted. The button-click would then add the item. Usability-wise not the best example but maybe you know better ones.
Do you know nice alternatives, applications that implement this "item-to-folder-functionality" without resorting to Drag & Drop?
It makes me think of the 'Move to' function in GMail. You select the messages your want to move with the checkboxes. On top, there is a dropdown button (with autocomplete support to easily locate the label you want) that allows you to move the messages to the label/folder. No drag and drop and intuative indeed.
(That said, I find DnD very natural, I definitely would consider it if building a GUI)

Resources