|
VC_RYK wrote: I want to stop USB Bluetooth device...
Stop them from what? If you mean disabling, see here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
pls check CM_Request_Device_EjectW()
Ajay
|
|
|
|
|
hi,
u can disable the usb devices, while changing the registry values
the follwing location have the usb device service set to 3.by changing that value 3 to 4. u can desiable the usb device.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor and double click on "start" word it will show value 3 then u can edit.
this implementation can be done through regstry api which is provided by vc++
ram
Continues learner
|
|
|
|
|
Hello,
My MSDN files are affected when I downloaded new version of internet explorer.
When I press F1 I get the message saying "One or more ActiveX controls could not be displayed"
My MSDN files are now HTML files .
What Should I do to revert them back?
Thanks
Prithaa
|
|
|
|
|
try uninstalling your new internet explorer or reinstalling the msdn and see.
or better put this post in the OS and system admin forum.
gud luck.
|
|
|
|
|
Hi All,
I add tab control on the window area(Not on DialogBox). Which function of CFrameWnd class needs to be override to get the which tab is clicked by user. I want to do all this code in CMainFrame class which is derived from CFrameWnd class. If anybody any solution then please forward it to me.
Thanks in Advance
Atul
|
|
|
|
|
Hit the 'next' button on the forums a few times. This topic has come up 3 or 4 times in the last week. I'm guessing it's part of a homework assignment somewhere...
Waldermort
|
|
|
|
|
Hi,
In my application im displaying bitmap in my view. But now i want animated giff file to display.I searched in net but i get solution to display only in dialog. i want to display in view.Pls help me out.
Anu
|
|
|
|
|
Take thsame steps you used to display the bitmap, but for a GIF you will need to include extra code to load the .gif file and render each frame to a DC. In the case of animated GIF's you may also want to use a timer.
Search on CP, there are numerous articles concerning loading and displaying GIF files.
Waldermort
|
|
|
|
|
thanks for your post.
i would like to learn from you, how you could manage it in dialogs.
please respond, because, i will use in my dialog based applications for better representations.
thank you.![Rose | [Rose]](https://www.codeproject.com/script/Forums/Images/rose.gif)
|
|
|
|
|
|
|
|
|
Hello All,
I have problem with Accessing the HDC variable.
I am using MFC Application.(Dialog Based)
When i am going to use that variable like..........
/////////////////////////////////////
if (!m_hrootdc)
m_hrootdc = ::GetDC(NULL);
///////////////////////////////////////
Error shows at the line of If Condition like below.............
//////////////////////////////
TestRTMP.exe: 0xC0000005: Access violation reading location 0xccccccdc.
////////////////////////////////
I have declared this HDC variable in the class header file(RTMPDesk.h) and I have used it in the file (RTMPDesk.cpp) and CTestRTMP is the main Dialog Class.
so plz help me .
Thanks in Advanced.
Ashish Bhatt
|
|
|
|
|
I highly doubt the code you posted is the cause of your problem. Your code is trying to read a variable that has not been initialized 0xCCCCCCCC and because there is a 0xDC at the end of that hex, I am guessing that the instance of your class has not been initialized.
You can verify this by placing a breakpoint on the code and checking the value of the this pointer.
Waldermort
|
|
|
|
|
Thank you All
I have have got the Solution. I did not initialize the object of class.
|
|
|
|
|
Did you initialize m_hrootdc?m_hrootdc=NULL;
|
|
|
|
|
when i use this link to customize the title bar..........<b>http://www.codeproject.com/gdi/customcaption.asp</b>.Its demo was working fine but there is a bug,when first time click the minimize button it works fine but after that its not working and what we saw when i click the half left part of the maximize button,the window will minimize and when i click the right half part of the maximize button then the window will maximize.how to fix that bug.plz anybody fix the bug. i am a novice programmer.
Anurag Gupta
Sofware Engg.
NetStudio pvt. ltd.
|
|
|
|
|
Without looking at any code it's kinda hard to say. But to hazard a guess, I would say the NCHITTEST message is being handled incorrectly and that the rectangles of the buttons are improperly positioned.
Waldermort
|
|
|
|
|
sir i give the link in my problem statement.if possible plz check the link
|
|
|
|
|
anuragguptartm wrote: sir i give the link in my problem statement
but why didn't you asked directly the forum at the bottom of the article ?
the author should be a better replier to your problem...
|
|
|
|
|
int numPaths;
bool bVisited;
vector<int> adjacent; // Contains the adjacent nodes in the INVERSE graph
};
sNode * nodes;
vector<int> topological; // Contains the REVERSED topological ordering of the nodes
int numNodes, bottomNode, numEdges;
void dfs(int);
void countPaths();
void printResults();
FILE * file;
FILE * outFile = NULL;
int main(int argc, char ** argv) {
int n, a, b;
char buf[256];
file = stdin;
if (argc == 2) {
file = fopen(argv[1], "r");
printf("Opening %s\n", argv[1]);
if (isdigit(argv[1][1]))
sprintf(buf, "%c%c.out", argv[1][0], argv[1][1]);
else
sprintf(buf, "%c.out", argv[1][0]);
printf("Opening %s\n", buf);
outFile = fopen(buf, "w");
}
fscanf(file, "%d%d%d", &numNodes, &bottomNode, &numEdges);
printf("%d nodes, %d edges\n", numNodes, numEdges);
nodes = new sNode [numNodes];
for (n = 0; n < numNodes; ++ n) {
nodes[n].numPaths = 0;
nodes[n].bVisited = false;
nodes[n].adjacent.clear();
}
for (n = 0; n < numEdges; ++ n) {
fscanf(file, "%d%d", &a, &b);
nodes[b].adjacent.push_back(a);
}
dfs(bottomNode);
if (topological.size() != numNodes) {
printf("ERROR: Not all nodes are reachable from the bottom\n");
return 0;
}
countPaths();
printResults();
system("PAUSE");
return 0;
}
void dfs(int current) {
int n;
queue<int> q;
vector<int> v;
if (nodes[current].bVisited)
return;
nodes[current].bVisited = true;
for (n = 0; n < nodes[current].adjacent.size(); ++ n)
dfs(nodes[current].adjacent[n]);
topological.push_back(current);
}
void countPaths() {
int n, i;
sNode * currentNode;
nodes[topological[numNodes - 1]].numPaths = 1;
for (n = numNodes - 1; n >= 0; -- n) {
currentNode = &nodes[topological[n]];
for (i = 0; i < currentNode->adjacent.size(); ++ i) {
if (INT_MAX - currentNode->numPaths < nodes[currentNode->adjacent[i]].numPaths)
printf("ERROR: OVERFLOW!\n");
nodes[currentNode->adjacent[i]].numPaths += currentNode->numPaths;
}
}
}
void printResults() {
int max, n;
max = nodes[0].numPaths;
for (n = 1; n < numNodes; ++ n)
if (nodes[n].numPaths > max)
max = nodes[n].numPaths;
printf("Node list: ");
for (n = 0; n < numNodes; ++ n) {
if (nodes[n].numPaths == max) {
printf(" (%d)", n);
if (outFile)
fprintf(outFile, "%d\n", n);
}
}
printf("\nPath count: %d\n", max);
if (outFile) {
fprintf(outFile, "%d\n", max);
fclose(outFile);
}
}
|
|
|
|
|
what do you exactly want us to do here?
you have pasted your whole code here
no description?
no comments of the code?
no proper indentation?
and that too incomplete code.
where exactly your problem is?
please put some write up before your code
and keep the code as simple as possible.
and before posting, read the post "How to get an answer to your question" by chris maunder above your post.
|
|
|
|