|
Thanks ^^
but i should use MFC too, as it is using some classes in a DLL dependent in MFC. I got that from MSDN too.
|
|
|
|
|
Hello,
I am reading a file in my program that resides in the same directory as my program EXE file. When I execute the file by double clicking the file .. it works fine .. but when I execute it through the start menu icon that was created using installshield, using the follwing installshield code,
svPath = TARGETDIR ^ "TDMS2000.exe";
LongPathToQuote ( svPath , TRUE );
AddFolderIcon (FOLDER_PROGRAMS^SHELL_OBJECT_FOLDER , "TDMS2000" , svPath , "" , "" , 0 , "" , REPLACE );
It says that it could not find the text file. Please tell me what I need for it to see the file.
Thanks!
sincerely,
Anjum.
|
|
|
|
|
Can someone give me some clues on how I can do the following things, eg what sort of messages I need to be overriding.
- I have an MDI app. When the MDI frame is loaded, I load a modeless dialog box acting as a toolbox. Id like to be able to drag things from this toolbox onto the view.
- Once things are dragged onto the (CView derived) view, id like to be able to drag them around, and possibly be able to link them up, eg when i ricght click on one of the nodes a line is extended, and when this is released on top of another node, things happen in the document.
Ive never been able to get much use out of Spyy++.
|
|
|
|
|
I am trying to retrive a some data from a database,
filling a dataset,
modyfieng the data,
updating the database.
I have the gotdotnet guide on how to make this, in Managed C++:
{
// Database connection string
SqlConnection* myConnection = new SqlConnection (S" User ID=;Password=;Initial Catalog=catalog;Data Source=(local)");
// Open connection
myConnection->Open();
// SQL Query
// Create the SQL statements inserting the Username and the Password received as parameters.
String* szQuery = String::Concat("SELECT * FROM Users WHERE UserID = '", szUsername);
szQuery = String::Concat(szQuery, "' AND Password = '");
szQuery = String::Concat(szQuery, szPassword);
szQuery = String::Concat(szQuery, "'");
SqlDataAdapter* mySqlDataAdapter = new SqlDataAdapter(szQuery, myConnection);
DataSet* myDataSet = new DataSet();
mySqlDataAdapter->MissingSchemaAction = MissingSchemaAction::AddWithKey;
mySqlDataAdapter->Fill(myDataSet, "Locals");
DataRow* myDataRow = myDataSet->Tables->Item["Locals"]->Rows->Item[0]["ContactName"]="Peach"; //this line gives error C2107
SqlCommandBuilder* mySqlCommandBuilder = new SqlCommandBuilder(mySqlDataAdapter);
mySqlDataAdapter->Update(myDataSet,"Locals");
}
but the line where i try to modify the data in the DataRow gives the error: error C2107: illegal index, indirection not allowed
How I fix it please?
P.S.
I cannot access it through the Find method, because I am not able to know the value of the primary key to research.
"Nelle cose del mondo non e' il sapere ma il volere che puo'."
|
|
|
|
|
Is there any differece between OnDraw or OnPaint functions?
Where should custom drawing should be implemented?
|
|
|
|
|
Rules
CView based classes use OnDraw,
General CWnd based classes use OnPaint
Custom OwnerDraw should use OnDrawItem
Normski. - the next bit of code is self modifying ... jmp 0xCODE
|
|
|
|
|
|
Customdraw an ownerdraw is 2 different things.
Customdraw is handled in response to WM_CUSTOMDRAW
/M
- Don't sweat the petty things, and don't pet the sweaty things.
|
|
|
|
|
Hi,
I am looking at rewritting a routine, where each line reference an object.
pObj->method1
pObj->method2
pObj->method3
pObj->method4
Is there any way of eliminating the need to specify the object, bit like that Pascal and VB with statement.
Cheers
Rich
|
|
|
|
|
You can return 'this' pointer from each method and then you will get:
pObj->method1()
->method2()
->method3()
->method4();
|
|
|
|
|
How to handle notepad or wordpad (along with their menus as to disable or enable them) through coding with visual c++ 6.0. Please submit me sample coding(source & exe) on this topic in detail. I need very very much.Thanking you...
amit prakash srivastava
|
|
|
|
|
Amit Prakash Srivastava wrote:
Please submit me sample coding(source & exe) on this topic in detail
Do I get punished if I don't provide enough detail ?
There is either an article on CP or in an old MSDN or MSJ mag on this topic. It hooked into notepad and added an extra item to the menu, a word count from memory.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
I've some toolbars in the same frame; if I try to dock all of them in the same border (i.e. TOP), i would like that they appear on the same line (as when you open Word) instead that having one line for any Toolbar.... the user can drag and move them in the same line, so I think that it should be possible....
|
|
|
|
|
|
I think that it should be possible even without a CRebar (it doesn't allow floating ControlBars)...
I tryed also using the CBRS_FLOAT_MULTI style but it seems not to work...
When it starts bars are positioned in this way:
[BAR1]
[BAR2]
[BAR3]
What I want is thatm the first time the program is run, the bars appear in this order:
[BAR1][BAR2][BAR3]
If the user move them and I save the status, the next time they will appear correct...
|
|
|
|
|
Ok, here's another one about game programming. Should I stick with Visual C++ 6.0 for game design or upgrade to Visual C++ on Visual Studio .NET? Is there something new to Visual Studio .NET that would help in game programming or everything's fine with Visual Studio 6.0 and .NET is just for, well, .NET programming? Thx!
|
|
|
|
|
I'd imagine you'll probably want to stick with Visual C++ and avoid the additional overhead of using managed code via. the .NET framework, or calling unmanaged code from managed.
If it isn't broken, why try and fix it
I see .NET primarily for rapid development of enterprise distributed systems, not really a games thing
|
|
|
|
|
I would use Use Intel's compiler. It's supposed to be quite a bit better than MSVC++ when it comes to compiling floating point code. Plus, it drops right into MSVC++ 6/.NET. It's object code compatible with MSVC++ and it supports partial template specialization.
|
|
|
|
|
VS.NET doesn't really provide any advantages over VS6 for writing games, apart from improved standards compliance. Nothing new has been added to support game development.
Michael
Look, try and use your intelligence, man, even if you are a politician. - The Doctor
|
|
|
|
|
Hello,
I am using MS Flex Grid, an ActiveX control in one of my dialog boxes in my dialog based application. The OCX file for the ActiveX control is MSFLXGRD.OCX. The program works fine on my computer but doesn't work on other computers and terminates right before it gets to the dialog box with flex grid on it.
Please guide me as to how I should include the OCX file in the program so that it would work on any machine.
From the earlier posts it was mentioned that I could update the registry manually .. or include it in the setup file for the .ocx file. Unfortunately I don't have much experience with win registry. Could anyone please tell me how do I register the OCX file manually in registry ... and how do I go about including it in my setup program. I am making a setup program using Installshield for VC++ 6.0.
If you know I will also appreciate if you could direct me to some website where I can find info about adding OCX files into the registry manually and using the setup program and doing it automatically.
Thanks!
Sincerely,
Anjum.
|
|
|
|
|
Ok First I ll explain how it can be done Manually.
Just copy the Ocx file in the system or any directory.Then go to that directory via Command prompt.Then type the command
c:>Regsvr32 MSFlxgrid.OCX
Then ur ocx file will get registerd in the system...Its simple..
If ur using Visula install shield then Put this Ocx file and make them selfRegisted in option. Thats all
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
Thanks for all the wonderful responses .. This is all the information I needed!
|
|
|
|
|
Hi!,
I need to implement a drag and drop feature to the application I'm working on, but my employer wants it to be non OLE as OLE would... blah blah... I explored the way of receiving files using WM_DROPFILES, but how about sending them without OLE? Yes, I have RTFM and the Clipboard section of CodeProject.com
Thanks in advance
|
|
|
|
|
There used to be an old "trick" before OLE was
widespread to achieve this..you basically need to fake
the WM_DROPFILES message yourself, using the following method:
(sorry, but any code I might have had to do this would
have been lost a long time ago
In your WM_MOUSEMOVE handler (or however you are doing
the dragging bit), make a routine that checks to see if
the window underneath the mouse has the WS_EX_ACCEPTFILES extended style set.
i.e.
<br />
POINT pt;<br />
HWND hwnd, hwndTop;<br />
<br />
pt.x = screen_mouse_x<br />
pt.y = screen_mouse_y<br />
<br />
hwnd = WindowFromPoint(pt);<br />
<br />
<br />
if(GetWindowLong(hwndTop, GWL_EXSTYLE) & WS_EX_ACCEPTFILES))<br />
return TRUE;<br />
else<br />
return FALSE;<br />
get the idea..? It's a good idea to only do this when the current window under the mouse has changed - no need to keep doing this same logic over-and-over..
Now you know if the window under the mouse accepts files - so, you can change your mouse-cursor to reflect this. When your release the mouse, reset the cursor, and send a fake
WM_DROPFILES to the top-level window:
You need to use two undocumented APIs to do this. These
APIs are called DragInitBlock and DragAppendFile, which you
use to create a structure used to pass to the WM_DROPFILES
call. I did a quick search on the net, and came up with this:
http://www.tec.puv.fi/~kimmos/News/031
Seems to be a pretty good example for how to do it, so I'd
take a look there..
James
http://www.catch22.uk.net
|
|
|
|
|
I added a new indicator panel to the status bar. I wanted to update it with the UI Update handler so I put the stuff in the message map and the afx_msg in the .h file of the mainframe. This created the panel but didnt update it with the SetText I did in the UI handler. I then put the exact same stuff into the view class instead and viola, the new panel gets updated etc.
Why does it work when handled in the view but not in the frame? I used pCmdUI_>SetText("new") in both handlers and it only worked when handled in the view.
Thanks,
ns
(I also found out about SetPaneText but thats not at issue here)
|
|
|
|