|
You may want to invest in a second monitor. You can then run the IDE on the second monitor and debug your DirectX application on the first monitor.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Mhh, yes that could be a solution but this project is just for spare time and so, I don't want to buy a second monitor just for that...
Isn't it possible to debug DirectX applications ????
|
|
|
|
|
cedric moonen wrote:
Isn't it possible to debug DirectX applications ????
I have had the same trouble debugging a fullscreen DX application with a single monitor. I don't think there is an easy way round this given a single monitor setup and the standard IDE.
There is a debugging tool called SoftIce. We use it at work to debug drivers and shared memory between applications. SoftIce has the advantage of freezing the applications and switching to its own debug screen (text driven screen). This would allow you to debug DX applications quite easily.
http://www.compuware.com/products/driverstudio/softice.htm[^]
Not sure on the cost of this though!
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Ok thanks, I will take a look at it
|
|
|
|
|
I have been working with directx for a long time (like 7 years) and the best way to debug an application is to use the remote debugging (debug via a second pc) feature of visual studio. Local debugging will only cause you problems as you can not flip the screen to the windows GUI to break your code.
John
|
|
|
|
|
hello..
is there an API function or something to enumerate remote computers names on a LAN??
|
|
|
|
|
I think you are looking for NetServerEnum() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello All,
I am trying to memory mappin technique to parse zone file. The program is running fine for small file of size around 350MB but the same program failes when the file size becomes 2.5GB
Here is a simple program which works fine for small files but fails for large files:
#include <windows.h><br />
#include<stdio.h><br />
<br />
<br />
<br />
int main(void)<br />
{<br />
<br />
char * p1stData;<br />
HANDLE hMap1stFile; <br />
HANDLE h1stFile; <br />
LPVOID lp1stMapAddress; <br />
h1stFile = CreateFile("biz.zone", GENERIC_READ | GENERIC_WRITE, 0, NULL,<br />
OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);<br />
if (h1stFile == INVALID_HANDLE_VALUE)<br />
{<br />
printf("h1stFile is NULL\n");<br />
printf("Target file is %s\n", "biz.zone");<br />
return 4;<br />
}<br />
hMap1stFile = CreateFileMapping( h1stFile,
NULL,
PAGE_READWRITE,
0,
0,
NULL);
<br />
if (hMap1stFile == NULL) <br />
{<br />
printf("hMap1stFile is NULL: last error: %d\n", GetLastError() );<br />
return (2);<br />
}<br />
lp1stMapAddress = MapViewOfFile(hMap1stFile,
FILE_MAP_ALL_ACCESS,
0,
0,
0);
if (lp1stMapAddress == NULL) <br />
{<br />
printf("lp1stMapAddress is NULL: last error: %d\n", GetLastError());<br />
return 3;<br />
}<br />
<br />
<br />
p1stData = (char *) lp1stMapAddress;
<br />
<br />
for(int i=0;i<1000;i++)<br />
{<br />
printf("%c",*p1stData);<br />
}<br />
return 0;<br />
}
The error that comes is:
hMap1stFile is NULL: last error: 1006
Is there any upper limit on the file size which can be memory mapped.
dotcom
|
|
|
|
|
krabhinav wrote:
Is there any upper limit on the file size which can be memory mapped.
I would think so, especially if memory allocation is involved. Remember that asking for 2.5GB of RAM means that 2.5GB of contiguous RAM must exist or the allocation fails. That aside, error 1006 says that the volume for a file has been externally altered so that the opened file is no longer valid.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi
Can I add a accelerator key to Button and Toolbar. When the user presses any Alt+Key, the button and toolbar button functions must be invoked just as in case of a menu.
Can any one please suggest any solution to this
Thanks
Madhavi
|
|
|
|
|
Hi,
I do hope that you'll be using sdi/mdi appln. so in the Accelerator resource named IDR_MAINFRAME, add a new entry with the name of the control say IDC_BUTTON_TEST and assign the key stroke to it. It will call the handler.
SUjan
|
|
|
|
|
Hi,
Yes I am able to add accelerator keys using Accelerator tabel to individual buttons. But I have one problem. I'm unable to display the underscore symbol beneath the letter in the caption for Buttons(Toolbar buttons) for the user to know that accelerator key is present.
Madhavi
|
|
|
|
|
Hai frens.. .
I have created a modeless dialog. . .I am creating the modeless dialog with their parent as desktop, in order to send dialog behind the parent window once the parent is clicked. Now i have a prblm that once the modeless dialog is closed the parent is not getting activated. . Only if i click on it its getting active.Could any one help me to over come this prblm. .
Tanx
bye
|
|
|
|
|
Hi,
you can use the function SetForegroundWindow() using the window address to make it active
Sujan
|
|
|
|
|
I tried using that fnction its not working. . .
my application is an form based SDI.
I tried to bring parent to fore ground on the close of child.
but its not working.
Do any boby have some other solution.
Tanx
bye
|
|
|
|
|
here is a code snippet I found on this site a few weeks ago. I think the title of the article is something like "Dialog box tips & tricks". I haven't tried it yet, but I thought it may come in handy, so I put it in my Code Librarian:
AttachThreadInput(
GetWindowThreadProcessId(
::GetForegroundWindow(),NULL),
GetCurrentThreadId(),TRUE);
SetForegroundWindow();
SetFocus();
AttachThreadInput(
GetWindowThreadProcessId(
::GetForegroundWindow(),NULL),
GetCurrentThreadId(),FALSE);
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
bdiamond
|
|
|
|
|
Hi!
I'm currently programming some tool that installs a process (automatically running at startup as admin), which accepts incoming network TCP connections, processes some data and returns something. Think of something like a FTP or web server. I'm using Windows 2000.
Now I got a problem: while I'm logged on, the tool works perfectly, everything runs fine. The server accepts all clients and returns the correct data. But when I log off, Win2k doesn't accept incoming connections any more...
It's not the process what isn't working, the process remains perfectly in the background and isn't killed or stopped. It's just that Windows 2000 seems to block incoming connections while nobody is logged on... As soon as somebody is logged on, the server gets the incoming connections again...
Any way to tell Win2k to accept incoming connections while nobody is logged on?? Maybe we can even define the port?? Or maybe I must call something from my program?
Thanks and best regards
|
|
|
|
|
Are you using the shell to do some work for you? Because there is no shell when no users are logged on...
If you havn't, you should develop your program as a service[^].
Hope this helps..
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
I made push-like box like button, and wanna to set colour for both caption and background frame. as we know, for button, we can choose its owner draw property, and then make whatever change as long as we implement its corresponding functions.
but for push-like box, it dun have such owner draw property, and then how can i do?
thx
|
|
|
|
|
Hello All,
I have requirement in a vc++ application, wherein i need to select a few tables from the database on remote sql server(in the same LAN ) and copy them to my local sql server database using VC++ with no direct user interaction with 'MS sql server Enterprise Manager'.
Ofcourse GUI is provided for user to select the tables in the remote sql server database, that i can do in vc++.
Please help me solve this problem.
Thanks & Regards,
Prax
|
|
|
|
|
u do not need any user assistance while u r copying data from table to another, just create two databases variables and open both ODBCs then connect to both sender record set and receiver record set, start copying from sender to receiver, easy....
u can use your own overloaded RecordSet classes or simply and more than enough MFC RecordSet class...
|
|
|
|
|
Hi Friend,
From what i understood after reading ur mail, i wrote the following code for my application....................
//NOTE: 'CCustomer' is CRecordset derived class of 'Customer' table in SQL Server; 'GetConnectionStr' is my function which returns the CString on the Connection String.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
CDatabase m_dbMaster;
CDatabase m_dbField;
m_dbMaster.OpenEx(_T(GetConnectionStr(MASTERDSN)),CDatabase::openReadOnly)
m_dbField.OpenEx(_T(GetConnectionStr(FIELDDSN)),CDatabase::noOdbcDialog)
m_dbField.BeginTrans();
CCustomer m_recFieldCustomer(&m_dbField);
CCustomer m_recMasterCustomer(&m_dbMaster);
m_recMasterCustomer.Open(CRecordset::snapshot,_T("SELECT * FROM Customer"),CRecordset::readOnly);
m_recFieldCustomer.Open(CRecordset::dynamic,"SELECT * FROM Customer",CRecordset::none);
m_recFieldCustomer=m_recMasterCustomer;//Copying the Master recordset to Field recordset
m_recMasterCustomer.Close();
m_recFieldCustomer.Close();
m_dbField.CommitTrans();//COMMIT TRANSACTION FOR THE FIELD DATABASE
m_dbMaster.Close();
m_dbField.Close();
>>>>>>>>>>>>>>>>>>>>>>
Result: When i try to Compile the above code it gives error :
" 'CCustomer' : 'operator=' function is unavailable"
If you think i need to change my code or u have any other issues , please let me know. i would clarify them.
waiting for ur reply..........
Regards,
Prax.
|
|
|
|
|
yes sure, it is obvious that operator = is not overloaded in CRecordSet, all what u have to do now, is to create one function where you assign the master recordset values to the receiver recordset
for example your master table A has CustomerRef ,customerName etc...
all what u have to do is
ReceiverRecordSet.CustomerRef = MasterRecordset.CustomerRef
make sure you are assigning the right fields... Voila...
do not forget while (!masterRecordSet.ISEOF()) etc...
|
|
|
|
|
OK, i got what u meant to say... OK , is there any other way to move the entire table to the remote sql server in just one command .... like 1) using BCP utility & 2)using BULKINSERT... BUT here i am facing some issues ..
1) while using BCP utility , i am not able to handle any exceptions, and also i cannot include it between BEGINTRANSACTION --- COMMITTRANSACTION of CDatabase Object.
it wil show up a console window when v use BCP. and if there is a network failure while tranfering data then the window wil remain constant , the user has to cancel it , then only next line of code will be executed.
2) when i am using BULKINSERT , which is meant to move DATA from a 'file' TO 'SQL SERVER', but i cannot use BULKINSERT to move data from 'SQL SERVER' to 'file'.
SO that is half done with BULK INSERT.
SO IF u have any idea for how to move data between two servers, similar to Import/Export wizard in SQL SERVER Enterprise manager , please help.
Regards,
Prax.
-so radih9999, whats ur real name, what u do & where u dwell?
|
|
|
|
|
in CDatabase class there is one ExecuteSQL(CString) command... In CString u can say
"Insert into targetTable (F1,F2,etc..)
Select Master.F1,Master.F2 from Master" soooooooo simple...
My Name is Rabih and I am lebanese with CCE grade and 4 years of C++,MFC,GDI+ etc... experience
|
|
|
|