|
Hi,
navigate to the bitmaps section of this site.
there there is a solution.
Vitali
|
|
|
|
|
I have a tree control where i have drag and drop however if you want to drag to something thats scrolled off the screen you have to using the arrow keys or scroll button while still holding the item your dragging my question is how can i make it so when the user drags the mouse to the bottom its starts scroll untill the user stops moving the mouse i tried ScrollWindow But that seemed all screwed up and i tried mapping the OnVScroll but im not really sure what paremeters to pass it can someone pls point me in the right direction thanks
|
|
|
|
|
Hi Marissa,
You can use varuious tecknikues to implement drag and drop,
but in any case you can use
HitTest and EnshureVisible to determine position
and show item in a tree control.
Vitali
|
|
|
|
|
Hi All,
When I am trying to select the value of any of the selected node inside a CTreeCtrl, the NM_CLICK returns the value either previously selected or some other value.
Can anybody tell me how to correctly get the value selected by Left Mouse Click.
Thanks.
The Phantom.
|
|
|
|
|
void CBuilderDlg::OnClickTree(NMHDR* pNMHDR, LRESULT* pResult)
{
TVHITTESTINFO tvhit;
CPoint p;
GetCursorPos(&p);
m_EnvTreeCtrl.ScreenToClient(&p);
tvhit.pt=p;
HTREEITEM hItem=m_EnvTreeCtrl.GetSelectedItem();
tvhit.hItem=hItem;
m_EnvTreeCtrl.HitTest(&tvhit);
hItem=tvhit.hItem;
m_EnvTreeCtrl.SelectItem(hItem);
hItem=m_EnvTreeCtrl.GetSelectedItem();
if (hItem)
{
...
}
}
~RaGE();
|
|
|
|
|
You can use the code snippet, the best way is however to handle TVN_SELCHANGED (so the selection changed message) instead of the NM_CLICK
~RaGE();
|
|
|
|
|
Hi,
you also can use fillowing :
1) TVN_SELCHANGED
2) TVN_SELCHANGING
Vitali
|
|
|
|
|
|
Hi All,
I have developed an application and I want to load it at startup..I have done that..but it takes some time to load..I want the process to be fast and user is not able to access the desktop in the meantime before seeing my application..is there anyone who can help me out..any help or pointers are highly appreciated..Thanks a lot in advance..
himanshu
|
|
|
|
|
OK, Open your front door and take a right, walk 100 yards down the road then take a left, jog for 15 minutes until you see a shop called 'Computers for Dummies', using the door handle, gently twist and push the door at the same time. Walk in through the empty space and go to isle three. Purchase the casio calculator and install your program, perhaps that will speed things up for you . Seriously, though either re-install windows or get a faster machine. I doubt its your program, but if it is then optimise its construction and startup code.
Once I was but the learner, now I am the master
|
|
|
|
|
hi Johnny,
that was really marvellous..actually my question was that I am adding my application to windows startup..but it loads after few things..and i want it to load first..is there any priority sort of set such that the order in which the programs will load..if so i wanted to know how can i increase priority so that my application loads first and hence..user is not able to access desktop..is there any other way to do it..if so..i am loooking forward to it..i only know a single way to add it to windows registry at
HKEY_CURRENT_USER\Software\Microsoft\windows\current version\run ..if u can help..Looking forward to ur reply..
himanshu
|
|
|
|
|
Sarcasm is the lowest form of wit...but the highest form of intelligence . Sorry for the sarcastic tone, just having a giggle. Anyway, I had a look in MSDN and found the Win32_StartupCommand class which may be of some use, though MSDN is very unclear about what it does and how it works. There are a whole host of other things relating to Win32_LoadOrder_blah which may be of some help, I think its a way of accessing services but I am not sure, you may have to look these things up on-line at msdn to get some examples cos there aint any with MSDN 6.0 I may be barking up the wrong tree, but its something you can look at that may be of some help, I hope. Good luck, if I find anything else, or you does, or anybody else does, post it up!
|
|
|
|
|
Does anyone know something about that?
xinhua xia
|
|
|
|
|
Hi
This Ocx control must be control container i.e. one must have certain interfaces such as IOleInPlaceFrame, IOleInPlaceUIWindow and any other.If this control not supported this interfaces you cant place button on this control.If all of thats interface for container supported you can place button into control with Dialog editor if one are used or create this button by Create function calling.
|
|
|
|
|
Hello,
Look to the www.logicsoftware.net portfolio
and find there ATL Button. This is my old project.
Ask my friend for more details about it via "contact us".
Vitali
|
|
|
|
|
Hello everyone. I am writing a program which is going to create a new folder inside the current user's My Document folder. How do I find the path to the current user's My Document folder? ie. "c:\my documents" on Win98 or "C:\Documents and Settings\SomeUserName\My Documents" in win2000? And what should my application default to when it goes to create datafiles if run on Win95, since there is no "My Documents" folder in Win95? Default to the application's path? I was told by other developers that an application should default to the My Documents folder when creating a new datafile for the first time (like Word does).
|
|
|
|
|
Use SHGetSpecialFolderPath() with CSIDL_PERSONAL as the nFolder parameter.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Does anyone know where i can get my hands on a good winsock tutorial? I've read a few so far, but I'm looking for something that gives me a list of functions and explains them to me really. I am trying to write a basic client/server application that will be used in conjunction with a game, so I'd like it to be UDP based please. Thanks in advance for any help!
-Brian
-untwisted
www.uber-ware.com
brian@uber-ware.com
|
|
|
|
|
I have seen some good ones on this site in the past, especially for TCP. Browse around.
Maybe some specific questions will do.
Good luck
Louis
|
|
|
|
|
|
Much thanks. Anyone know where I can find more info about UDP or Raw sockets?
-Brian
-untwisted
www.uber-ware.com
brian@uber-ware.com
|
|
|
|
|
Hello, I am trying to improve the speed of a function which heavily using these functions.
template<class T><br />
T min(const valarray<T>& x);
and
INT abs( int n ); in math.h
and
int memcmp( const void *buf1, const void *buf2, size_t count );
Any better functions to be used other than these.
Thank you.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Try using memmove instead of memcpy.
As for abs(), try replacing it with this inline function:
inline int myAbs(int n) {
if (n < 0)
return -n;
else
return n;
}
That would be a lot quicker than a function call. There maybe more to the abs function than that, but I don't know the details.
As for min(), I've never seen that particular version of it before. If you are doing something thats computationally heavy on prepared data, you could sort the data ahead of time and then just pull out the first element, that'd be your min.
|
|
|
|
|
<br />
void *p = 0;<br />
DWORD allocadd = 0x500000;<br />
<br />
p = VirtualAlloc((void *)allocadd, 0x1000, MEM_COMMIT , PAGE_READWRITE);<br />
<br />
if (p == 0)<br />
{<br />
DWORD err = GetLastError();<br />
}<br />
This code works fine under Windows XP, but on 2K I get an "ERROR_INVALID_ADDRESS" error. The memory page in question is free, I checked, but I can't allocate it! If I change the desired address to something like 0x502000, it will work. But I need to be able to choose the base address.
Please help!
|
|
|
|
|
Hi,
The following example demonstrates how to commit a specific page of reserved addresses from the previous example to a page of memory.
/* Commit memory for 3rd page of addresses. */
lpPage3 = VirtualAlloc (lpBase + (2 * 4096),
4096,
MEM_COMMIT,
PAGE_READWRITE);
Notice that instead of specifying NULL for lpAddress, a specific address is given to indicate exactly which page of reserved addresses becomes committed to memory. Also, this page of memory is initially given PAGE_READWRITE protection instead of PAGE_NOACCESS as in the previous example. The return address from the function is the virtual address of the first pages of
committed addresses.
MSDN
|
|
|
|