Hi Rage,
you could try CallCommand() with id 1019951 - calling this should delete all selected objects without deleting their children. Might also do what you're after?
WP.
Hi Rage,
you could try CallCommand() with id 1019951 - calling this should delete all selected objects without deleting their children. Might also do what you're after?
WP.
Hi gogeta,
I'm not sure on ScaleBicubic(), but I noticed in your commented line:
//bitmap->ScaleIt(scaledBitmap, defaultBrightness, true, false);
That last 'false' flag, try changing that to true. If you're scaling in a non-proportional way that should be true (might fix your non 'squeeze' issue).
WP.
Hi folks,
Might be nice to have a convenience link (icon) to the online docs up in the header area. Somewhere here where the red circle is:
Maybe to the high-level docs starting page? Or one to each of the main programming starting pages (C++, Python, Cineware).
Just a thought.
WP.
Do the GeUserArea sections display anything? Or are they just spacers?
A mock-up picture might help others to visualise.
How about a 'global' drag and drop function? So, make separate iCustomGui/GeUserAreas for each section. Then just point each of these to the same function held in the parent dialog? That way you only have to write the main drag/catch routine once, in the parent dialog.
Just a thought.
WP.
Hi folks,
I'm wanting to get various CTRL+X key presses in my dialog. I can get keys without the ctrl, and I can get the ctrl without keys, but I can't get any ctrl+key presses. In the dialog's Message() function I've tried variations like:
case BFM_INPUT:
{
BaseContainer KB;
GetInputState(BFM_INPUT_KEYBOARD,BFM_INPUT_CHANNEL,KB);
LONG qualifier = KB.GetLong(BFM_INPUT_QUALIFIER,NULL);
String input = msg.GetString(BFM_INPUT_ASC,"");
}
but none work. They key is always blank if control is pressed.
I've seen a couple of older posts that gave some suggestions, but nothing seemed to work.
Is there a particular way we have to do this? Or does it just not work for our own dialogs?
WP.
Thanks @ferdinand,
Agree. I've avoided using OS-specific calls up until now. But for this one I've had to make an exception. Not an ideal solution, but it seems to work:
To get around the lost window focus issue, I'm using the first dialog's Timer() to poll and check if any dialog in the menu has window focus. If none do, e.g., a user has clicked away, the system self-destructs. If a menu selection is made, it sends a Message() back to the calling object with details, and then self-destructs.
It's all a bit of a hack. But it works. :shrug:
WP.
Update: I'll mark this thread as solved. If I have any further questions I'll pop back in.
Thanks @m_adam,
I had to jump through a bunch of hoops with this one, because I put the queue process into a progress dialog so that for large file arrays there's an indicator of progress. Otherwise it just appears to hang and the user won't know why. But this made it tricky when the timer is also used because of the different thread contexts involved with the timer, the progress dialog and everything else on the main thread. But with a bit of care, it seems to work.
Thanks again,
WP.
Hi folks,
is it possible to get the number of files in a drag operation, before the execution of each one individually?
case BFM_DRAGRECEIVE:
{
KillEvents();
if(msg.GetData(BFM_DRAG_FINISHED).GetBool())
{
/* Custom handle function */
Handle_FileDrag(msg);
}
return SetDragDestination(MOUSE_NORMAL);
}
I'm currently getting multiple executions for a single drop. This isn't too much of an issue for a dozen or so files, but I'm concerned about many hundreds to 10's of thousands. The main issue is that I have to do a redraw for this operation. Is there a way around this?
WP.
@ferdinand, By the way, just a small forum issue I'm seeing, I noticed my 'Mark as solved' doesn't look right in the menu. Don't know if it's just me or if the css might need some attention?
Thanks again.
WP.
Hi @ferdinand,
I seem to have something working with the lib_pictureviewer.h library. Thanks for this. Maybe in future the standard ShowBitmap() could have a default empty string argument with it. Just a thought.
Thanks again,
WP.
Hi folks,
How do I set a name for an image sent to the picture viewer? This bit here:
I tried setting the bitmap data like this:
bmp->SetData(BASEBITMAP_DATA_NAME,"My name");
ShowBitmap(bmp);
but it does nothing.
WP.
Hi @i_mazlov
The dialog/gui is open. It's a progress dialog that I use to run an export function.
I did some more digging, and I believe I've solved it. I had to put the SetTitle() into the dialog's Timer() function. So, something like this:
virtual void MyProgressDialog::Timer(const BaseContainer& msg)
{
// 'title' is a class-level string variable
SetTitle(title);
return ProgressDialog::Timer(msg);
}
Seems to work as expected.
WP.
Hi folks,
is it possible to update a ProgressDialog's title inside the Main() function? I'm wanting to make the title "x of y complete". Doing this doesn't work:
// pseudo code
.. Main()
{
SetPercent(0.0);
for(int i = 0; i < 100;)
{
String title = String("Processing i+1 of 100");
SetTitle(title);
SetPercent((i + 1) / 100);
++i;
}
SetPercent(1.0);
}
I'm guessing because Main() is on another thread. Is this possible?
WP.
@ferdinand ah great, thanks. For others reading, may need a hard-refresh to get it to show.
Cheers,
WP.
Thanks Maxime. And apologies for the delay - I didn't see the response.
WP.
Hi folks,
Might be nice to have a convenience link (icon) to the online docs up in the header area. Somewhere here where the red circle is:
Maybe to the high-level docs starting page? Or one to each of the main programming starting pages (C++, Python, Cineware).
Just a thought.
WP.