|
thx for for your kind supplies, you helped me find the spot.
WM_ONSETTINGCHANGE is the message i needed
this simple code did the job:
void CMainFrame::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
{
CFrameWnd::OnSettingChange(uFlags, lpszSection);
// TODO: Add your message handler code here
RECT rect;
SystemParametersInfo(SPI_GETWORKAREA,0,&rect,SPIF_SENDCHANGE);
MoveWindow(rect.left, rect.top, rect.right, rect.bottom)
}
|
|
|
|
|
If I recieve the ID of the folder with SHBrowseForFolder, use BindToObject, EnumObjects etc. and set up the
while (pFolder->Next(1, &pNewId, &pActual) != S_FALSE) loop. then how do i add the files from the folder if it's a folder in the loop? cause it's only a single-level pidl, so i can't use it in BindToObject for example. can i make a single level pidl to a fully qualified pidl? is there a way to make a fully qualified pidl if you have the single-level pidl, or if you have the complete folder path? or how do i do it`?
Thanks
|
|
|
|
|
You must have had the pidl to the folder which you bind to, so just
append the simple pidl to that pidl.
But you should be able to use BindToObject() for a subfolder with just a simple pidl.
|
|
|
|
|
How do you append two pidls?
|
|
|
|
|
A pidl is a list of SHITEMID's you have to alloc a new block that is the size of the old + the size of the new and then copy the pidls into the new ITEMIDLIST.
The memory should be allocated by the shells allocator. SHGetMalloc(),
or use CoTaskMemAlloc().
(really shouldn't, but they do the same thing currently)
An other way is passing the complete path to ParseDisplayName() of the
desktop folder, then you get the full pidl back.
But as i said i dont think you need to bother with this, the simple
pidl should be all you need.
|
|
|
|
|
Thanks. But i'm not so experinced with this. Should i first do this?:
LPMALLOC pMalloc;
SHGetMalloc(&pMalloc);
pMalloc->Alloc(sizeof(pNewId)+sizeof(ENUMIDLIST));
and then how do i copy the first into the second, is there a function for that?
|
|
|
|
|
you should Alloc(sizeof(completePidl)+sizeof(simplePidl)+sizeof(terminating NULL))
There is no API function for this.
But if you try and find the namespace extension sample or the NSE appwizard, both from MS. (think sample is called cabview)
There are som functions there that does this that you can use.
|
|
|
|
|
I have downloaded the cabview sample, but there's nothing with shell extensions in it.
|
|
|
|
|
Maybe i remebered wrong, but i think there should be some pidl helper functions in there somewhere.
PidlCopy(), PidlCompare()....etc.
(and the entire cabview sample is a shell extension)
|
|
|
|
|
|
i want to write something like a text editor for
html, javascript and i want to be able to include
an autocomplete feature, either by a new list that
shows the possiblities or just by completing the text
when a known object is entered.
is there any way to do this without automation and
querying for all it's properties and methods?
is there an activeX that does something like this,
or it can be done through microsoft's VC++ or VB?
|
|
|
|
|
There's a class to do it on CP, I am pretty sure. It's basically a case of the autocomplete having a dictionary to look up for the terms that may apply in a situation.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
Right now I am creating a compatible DC and drawing directly into it using LineTo() and MoveTo()
Then I BitBlt it into the actual CDC
But for a few nasty nano-seconds I can see the original background
Is there any way to speed up things? There is a pretty heavy loop with some maths calculations and stuff.
Would it be faster to directly draw onto the CDC?
Regards
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|
|
You need to draw in OnEraseDC, then you won't see it.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
|
|
First of all where is CG?
he made me waste 15 minutes searching MSDN/Google etc. for a non-existant message and message handler
OnEraseDC() my right foot!!!!!!!!!!!!
okay, now that, that's over, this is what I did
I added a CBitmap member and I draw my stuff onto this bitmap.
Thus during OnEraseBkgnd I simply use BitBlt to put this bitmap onto our CDC
Nice eh?
Donno if there are any hidden loopholes
I am just beginning this stuff, you see.
My GDI awareness is just two days old - started this week
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|
|
Sorry - I am watching 'The Others' and just came by and saw the question. OnEraseBkgnd is right. My GDI is rusty too.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
Christian Graus wrote:
Sorry - I am watching 'The Others' and just came by and saw the question
Now fancy that! The nice man was watching "The Others" and just came by and seeing the question thought it'd be really nice to lead the guy onto a wild goose chase looking for a non-existant function!
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|
|
MSDN should have a good example under the bitblt definition.
Like it or not, I'm right.
|
|
|
|
|
|
CPaintDC dc(this);
CRect rect;
GetClientRect(&rect);
CDC dc2;
dc2.CreateCompatibleDC(&dc);
dc2.FillSolidRect(0,0,100,100,RGB(0,0,127));
dc.BitBlt(0,0,rect.Width(),rect.Height(),&dc2,0,0,SRCCOPY);
CDialog::OnPaint();
Nothing happens
Why is the BitBlt failing?
If I comment out the BitBlt line and call FillSolidRect directly on dc it works
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|
|
|
|
Let's see some code...
How do you do it?
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|