|
Check out Marc Richarme's article A flat splitter window; it illustrates how to alter the way the normal MFC CSplitterWnd draws.
--------
Higher education helps your earning capacity. Ask any college professor. --Shog9 --
|
|
|
|
|
I have a Image stored in a VARIANT variable, How can I send it using CSocket, if I can I prefer to use UDP protocol
Thank you
|
|
|
|
|
how you want to send this image? you want to send its file name or you want to send its image data?
|
|
|
|
|
You'll have to send it byte by byte I guess.
No easier way as far as I know.
Nish
The posting stats are now in PDF:-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
Updated - May 04th, Saturday
|
|
|
|
|
Now I have finished my application how do I make an executable of it?
|
|
|
|
|
what do you mean? In VC++ 6.0, you press F7, it will build the *.exe for you. Is that what you want?
|
|
|
|
|
No.
I want to create an .exe Icon that I can put on my desktop that when I double click it runs my application. Can I do this?
|
|
|
|
|
Do you mean programatically, or just in general?
If in general, all you need to do is create a shortcut on the desktop. Right click, new, shortcut, and that should get you started.
If you mean programatically, you'll probably want to do that in some sort of install program, not in the executable itself.
No generalization is 100% true.
Not even this one.
|
|
|
|
|
If you have Installshield you can make a Setup program for your app. It will create Desktop and Start Menu icons for you.
Nish
The posting stats are now in PDF:-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
Updated - May 04th, Saturday
|
|
|
|
|
I’m getting an odd behavior in the Classview tab of the Workspace.
When I create a new MFC dialog based app the first thing that appears after the AppWizard creates a new project is the blank dialog with the OK and Cancel buttons.
So far so good.
Then I drop a new button onto the dailog, double click it, click OK to the Add Member Function prompt and the CXDlg.cpp window appears with the cursor in the OnButton1 handler.
When I look over the ClassView CXDlg has been removed from the list.
Is there a way to correct this problem? (I’m using Visual Studio 6)
|
|
|
|
|
wild guess, I think your *.clw might be corrupted.
|
|
|
|
|
Hi:
How can I determine what column on the header was left-clicked in a list control?
Thank you
|
|
|
|
|
Handle the LVN_COLUMNCLICK message. For details seee MSDN.
Best regards,
Alexandru Savescu
|
|
|
|
|
Just wondering what data is used for prompting in the IDE. For example, today I was doing some coding and I was typing a line as follows;
bool bFileExist = DoesFileE
and as I was typing I lifted up to see that Intellisense was prompting me that a method/function existed already called 'DoesFileExist'. So I hit Enter and that code got automagically added. When I next typed an open brace character, intellisense informed me of the two parameters that are needed. The first being an LPCSTR for the filename and the second being a UINT for the mode. I thought this was great so I went and hit F1 to bring up MSDN help to show all about this wonderful function that I wasn't going to have to code. Unfortunately, there was nothing in MSDN about DoesFileExist. That didn't really surprise me since, the library installed on my desktop is a pretty old one. So I went online to search the real one. Lo and behold all that I found was stuff all about VB and .NET and all pertaining to the new version 7. But I'm still using version 6? So what gives. Anyways I did a search through all of the VC source on my harddrive and I came up with a header file 'msdetect.h', a lib file 'msdetstf.lib' and a DLL called 'msdetstf.dll' all residing in the VC98 lib and include directories and they do not exist anywhere else. The redistribute file only lists them as sample code, but not as redistributable. So I'm left wondering what the heck are these files for and why did the intellisense system seem to know about them, but nothing else.
Thanks for reading.
Chris
|
|
|
|
|
Intellisense picks up some whacky things sometimes. It lists a function called IsDaytona() which not only doesn't exist, it doesn't make any sense unless you remember that Daytona was the codename for NT 3.51.
--Mike--
Buy me stuff! (Link fixed now)
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Big fan of Alyson Hannigan and Jamie Salé.
Sonork - 100.10414 AcidHelm
|
|
|
|
|
I have a CTreeCtrl on my program
I want CTreeCtrl display data from database
I use ItemData to store id(key) from database, use item’s text to store text from database and then I need something to store the type of node
Please, anyone have any ideas how to solve this stupid problem.
sorry for bad english
Thanx
mvorobiov
|
|
|
|
|
You can cram a pointer into the item data. The pointer can point to an arbitrary structure which, in your case, might be the database id and the node type.
Of course, if you plan on ever compiling this app on a 64 bit machine, you'll have to be careful how you do this becuase pointer sizes will change.
No generalization is 100% true.
Not even this one.
|
|
|
|
|
Bingo!
Thanks i'll try it.
|
|
|
|
|
your data are like this...?
key text
--- ----
1 item1
2 item2
if i might probably just insert in this way like, item1 as a label of ctreectrl item and 1 (key) as item data.
the function might look like
<br />
TV_INSERTSTRUCT treeStruct<br />
memset (&treeStruct,0,sizeof(treeStruct));<br />
<br />
HTREEITEM parent = NULL;<br />
parent = AddToTree(key,text,treeStruct,parent);<br />
<br />
AddToTree(key,text,treeStruct,parent);<br />
<br />
HTREEITEM AddToTree(int key,char text[_MAX_FNAME], TV_INSERTSTRUCT treeStruct, HTREEITEM Parent)<br />
{<br />
<br />
treeStruct.hParent = Parent;<br />
treeStruct.hInsertAfter = TVI_SORT;<br />
treeStruct.item.mask = TVIF_TEXT | TVIF_PARAM;<br />
treeStruct.item.cchTextMax = 500;<br />
treeStruct.item.pszText = text;
treeStruct.item.lParam = (DWORD)key;<br />
Parent= m_TreeCtrl.InsertItem(&treeStruct);
return Parent;<br />
}<br />
<br />
hope it will help
|
|
|
|
|
No my data like this
node type 1 = Buildings
node type 2 = Employees
node type 3 = Department
I need to store in TreeItem, for example
BuildingID, BuildingName, NodeType1
EmployeeID, EmployeeName, NadeType2
NodeType need to resolve what type of node cliked by user
and what type of child node insert to current node
i have few collection of this objects(Buildings, Employees)
couse node type use to resolve in what collection search appropriate
object
|
|
|
|
|
I've used the item image for this kind of thing before. Have a different image for different node types (one for Buildings, one for Employees, etc). Then you do a check for the image of the selected node, which gives you the node type
Derek Lakin.
I wish I was what I thought I was when I wished I was what I am.
Salamander Software Ltd.
|
|
|
|
|
yes i think about this too
that's my back up
but may by some ideas of using cChildren in TV_ITEM structure
thank you for your answer
|
|
|
|
|
hmm.. i can't help i . i'm having my own trouble with sorting my file tree .
dont' mind if i ask you?? or any of you since you guys knows more about treectrl than me.
|
|
|
|
|
how can i use CArray.
i have class called FileInfo
<br />
class FileInfo<br />
{<br />
public : <br />
int status;<br />
CString path;<br />
CString name;<br />
CString size;<br />
CString createdTime;<br />
CString lastWrite;<br />
CString lastAccess;<br />
CString type;<br />
};<br />
and i want to put FileInfo into CArray. so I declear like this
<br />
CArray <' FileInfo*,FileInfo* '> *fileArray;
<br />
FileInfo *fileinfo = new FileInfo();<br />
fileinfo->name = "hi hi";<br />
fileArray->Add(fileinfo);<br />
<br />
i got run time error. no error for compile time
how can i fix that?
|
|
|
|
|
CArray <FileInfo, FileInfo &> fileArray;
|
|
|
|