|
Neville Franks wrote:
Why not keep a pointer to the selected node in your mydata struct/class. Then no lookups are needed. You do however need to ensure the tree and your mydata are kept in sync.
I tried this, it works when the tree gets updated when the selected state of data is modified external of thh tree, but I have problems when changing the select items from within the tree itself.
Will keep trying to find what wrong with this.
Thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Hi,
I have a fairly large application (maybe 100-200K LOC or so), and the resources have been divided up into several sections depending on their role in the project. Lately (after we switched to Visual Studio .NET 2003) we've been experiencing problems with a single part of the resources (defined in a separate .rc file). I.e. no resources defined in this single file will get compiled into the application in release mode. Everything works fine in debug mode. This includes all resources; menus, bitmaps, string tables etc.
Has anyone had any similar problems? Any hints?
Best regards,
Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
hello friends
plz tell me that how i can write in a text file from a buffer. and how i can search text file offset so that while writing in a file it shld not rewrite in the same position but it shld write in the position specified.
thanx
|
|
|
|
|
Add ur header:
<br />
#include "fstream.h"<br />
To write to File "Title.txt", at end of file.
<br />
ofstream a_file ( "Title.txt", ios::ate, ios::app);<br />
a_file<< "Data";<br />
a_file.close();<br />
To read from File "Title.txt"
<br />
char idata[256];<br />
ifstream b_file ( "Title.txt" );<br />
while (! b_file.eof() )
{<br />
b_file.getline(idata,256);<br />
cout<< idata <<endl;
}<br />
Hope it Helps... Replace the "Title.Txt" or "Data" with a variable and dont use the ""'s and you can have it set by user. Does this help?
/* Just a Human Trying to Live in a Computers World. */
|
|
|
|
|
do i have to encrypt files by hand then send them through a ftp connection, or is there a special protocol that deals with this? what i want is my program to have some type of protection during it's path to an FTP server (sniffer protection mainly i'm on a LAN )
thx in advance
|
|
|
|
|
Do some research on SSL type FTP connections.. I think I have seen articles here on CodeProject
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
I have a group of Buttons which I create at runtime. What I need to be able to do is add a ScrollBar to my form, which hides\shows the buttons that are in or out of my scrollable area. I have created a CScrollBar at runtime, but cannot generate a Message Handler to handle the scrolling. With the Buttons, I used ON_CONTROL_RANGE to specify the individual button ID, and do whatever I wanted with it. However I cant get a similar thing to work with my ScrollBar. Long winded description I know, just wondered if anybody had experienced anything similar.
|
|
|
|
|
Scroll bars send WM_HSCROLL or WM_VSCROLL messages to it's parent window.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Hi,
I want to calculate the used disk space for a particular folder or the given path. In my knowledge two API's avilable in VC++.
1. GetDiskFreeSpaceEx
2. using LPWIN32_FIND_DATA (FindFirstFile, FindNextFile)
if we use GetDiskFreeSpaceEx, it gives the root directory space only.
Suppose i want to calculate the used space in F:\xx\yy\zz means i have to use
recursive search for all the subfolders using FindFirstFile, FindNextFile and calculate the used space using LPWIN32_FIND_DATA structure. It takes more time.
Is there any other option avilable to get the directory space immediately.
Like Any Folder -> Right click -> Properties --- The windows give quick result. Windows also using some searching concept but they done quickly, I think they updated the information every time somewhere it may be registry or Shell.
Is anybody having any idea about ... plz write...........
Your valuable suggestions are always welcome ......
Regards,
inbha.
|
|
|
|
|
inbha wrote:
if we use GetDiskFreeSpaceEx, it gives the root directory space only.
Actually it reports the size of the volume.
inbha wrote:
Suppose i want to calculate the used space in F:\xx\yy\zz means i have to use
recursive search for all the subfolders using FindFirstFile, FindNextFile and calculate the used space using LPWIN32_FIND_DATA structure. It takes more time.
True.
inbha wrote:
Is there any other option avilable to get the directory space immediately.
None to my knowledge.
inbha wrote:
Like Any Folder -> Right click -> Properties --- The windows give quick result. Windows also using some searching concept but they done quickly,
Depending on the number of files and folders encountered, it can take several seconds and you can see the numbers incrementing as it goes.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I want to do something similar to Windows 2k's "Search for Files and Folders". Anybody know how it's done? Is it done with CScrollView with CEdit/CButton? How would I go about give CEdit box a 3d look? And get CButton to run?
|
|
|
|
|
If you are looking to get the exact types of controls used, use Spy++. Otherwise, you'll need to create and register your own search handler.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello,
I am trying to use CBitmapButton with four bitmaps but it is not working. The button shows up, but not the bitmaps. When I set the control's style to BS_OWNERDRAW as it has been suggested then the bitmaps still don't show..but also what used to be the button now becomes a flat grey area on the screen. I have also tried BS_OWNERDRAWN without and without BS_PUSHBUTTON and no luck.
CWnd* parent = CWnd::FromHandle(this->m_hWnd);<br />
BOOL success = m_BitmapButton.Create(("Play Section"), <br />
WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON|BS_OWNERDRAW,<br />
CRect(10,10,44,44), parent, 1);<br />
success = m_BitmapButton.LoadBitmaps(IDB_PLAYSECTIONU, IDB_PLAYSECTIOND, IDB_PLAYSECTIONF, IDB_PLAYSECTIONX);
Another even more important question is, why does CBitmapbutton need to be ownerdrawn? isn't the whole idea that I give the control four bitmaps and it takes care of applying the appropriate one according to wether the mouse moves over it, presses it etc?
Thanks
Aristotel
|
|
|
|
|
greekgoddj wrote:
Another even more important question is, why does CBitmapbutton need to be ownerdrawn? isn't the whole idea that I give the control four bitmaps and it takes care of applying the appropriate one according to wether the mouse moves over it, presses it etc?
The standard Windows button supports only one bitmap, which is displayed instead of the text on a regular button. To support four bitmaps, CBitmapButton uses owner-draw so it can display all four bitmaps and prevent Windows from drawing the standard button shape.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi Ryan...
I managed to track down CBitmapButton::DrawItem() and look at its code inside. So at least now I don't have to worry about taking care of the actual bitmap selection and drawing depending on the state.
I did however notice that that function never gets called. Setting breakpoints shows that it never gets called.
Thanks,
Aristotel
|
|
|
|
|
I'm trying to find out if it's possible, and if so, what's the best way of writing a C++ DLL to start a thread from a VB6 app? The VB6 app has a GetMail() routine that it does, but it hangs up the rest of the app while it's processing. I'd like to make a dll that I can send the GetMail() routine, then create some type of global variable in VB that the dll can access to let the VB app know when the thread is finished processing so that the user can't close the app before it's done processing. Any starts or links? Is this even possible?
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
Hi, I need help with programming simple console registry viewer in c++. Im trying to get all keys, but no all subkeys as RegOpenKeyEx KEY_ENUMERATE_SUB_KEYS can. I dont want get out as
Software
Microsoft
Current version
Security
etc
Sam
but i need to get just
Sofware
Security
Sam
+values
Can anybody help me make this function, which will fast read registry as DIR in cmd?
|
|
|
|
|
Have you tried RegEnumKey ?
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Yes it dont work, it enumerate subkeys still
|
|
|
|
|
Show your code, I may then be able to see where you went wrong.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
heh now its ok but i have problem with enumerate values, i get grrrr out
<br />
#include <windows.h><br />
#include <stdio.h><br />
<br />
void main()<br />
{<br />
char lszValue[100];<br />
<br />
<br />
LONG lRet, lEnumRet;<br />
HKEY hKey;<br />
DWORD dwLength=100;<br />
int i=0;<br />
<br />
lRet = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\ADOBE", 0, KEY_READ , &hKey);<br />
printf("HKEY_LOCAL_MACHINE\\SOFTWARE\\ADOBE\n\n");<br />
<br />
if(lRet == ERROR_SUCCESS)<br />
{<br />
lEnumRet = RegEnumKey(hKey, i,lszValue,dwLength);<br />
while(lEnumRet == ERROR_SUCCESS)<br />
{<br />
i++;<br />
printf ("[%s]\n",lszValue);<br />
lEnumRet = RegEnumKey(hKey, i,lszValue,dwLength);<br />
}<br />
}<br />
<br />
char lszValueRegsz[100];<br />
<br />
LONG lRetry, lEnumRetry;<br />
LPBYTE pbbinKeyData = NULL;<br />
DWORD dwValueDataLength, dwValueData, DataType, lenKeyValue;<br />
<br />
DWORD dwValue = REG_SZ;<br />
<br />
i=0;<br />
<br />
lRetry = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\ADOBE", 0, KEY_ALL_ACCESS, &hKey);<br />
if (lRetry == ERROR_SUCCESS)<br />
{<br />
while(TRUE)<br />
{<br />
<br />
lEnumRetry = RegEnumValue(hKey, i, lszValue, &dwValueData, NULL, &dwValue, pbbinKeyData, &dwValueDataLength);<br />
if(lEnumRetry == ERROR_NO_MORE_ITEMS)<br />
break;<br />
<br />
RegQueryValueEx(hKey, lszValue, 0, &DataType, (PBYTE)(LPTSTR)lszValueRegsz, &lenKeyValue);<br />
printf("\"%s\" = %s\n", lszValue, lszValueRegsz);<br />
<br />
ZeroMemory(lszValueRegsz, 100);<br />
ZeroMemory(lszValue, 100);<br />
<br />
i++;<br />
}<br />
}<br />
}
i dont understand why is dwValue ignored and dont output just RegSZ... It echo non exist values oO
|
|
|
|
|
Read the MSDN article on RegEnumValue[^] carefully. Pay attention to which parameters are labeled [in] as they have to have valid data before the call, and which are labeled [out] as the data in those will be changed by the function call. Also make sure your buffers are large enough to recieve the data. read the comments at the bottom of the article for information on how to get the required buffer sizes.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Hello, I have a MDI type app where one of my views was derived from CView and then converted into CRichEditView...
Anyway everything works fine except I want to turn horizontal scrolling on and I would like to disable word wrapping. I have tried to change the window styles in PreCreateWindow but this doesn't seem to have any effect on horizontal scrolling. Any ideas? Has anyone had similar experiences?
Thanks,
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Hi, I need help with programming simple console registry viewer in c++. Im trying to get all keys, but no all subkeys as RegOpenKeyEx KEY_ENUMERATE_SUB_KEYS can. I dont want get out as
Software
Microsoft
Current version
Security
etc
Sam
but i need to get just
Sofware
Security
Sam
+values
Can anybody help me make this function, which will fast read registry as DIR in cmd?
|
|
|
|
|
Hi,
Please give me a guide line or link to write a program for Add , modify and delete a contact from Outlook Express using API, VB 6.0 or VC 6.0.
regards
Ashish M Chauhan
|
|
|
|