|
Hi,
I would like to design a Visual application that can display external input information from the sound card.
I only really have experience of C and was wondering if there are any tutorials to help design a sound application?
Could someone also recommend a good, free C++ compiler / programming software.
|
|
|
|
|
|
I am sending a file through a WLAN card and from one pc to another. How can I save a file that have been received in the receiver PC? I don't know actually how to use VC++ to save a file in a computer either...
semnanian
|
|
|
|
|
wrong group
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
One solution is CreateFile().
Kuphryn
|
|
|
|
|
Hello,
I assume that the client pc has to do the saving by itself. When you are using MFC try CFile.
If you(host) have to save the file on the client pc, try some ftp.
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
This is really disturbing as I only have this problem with some themes (including the standard themes).
When I draw text using DrawThemeText and theme data for "Button , then the font is mismatched sometimes. Using the theme "Watercolor", the font is just like it should be. But with standard XP themes for instance, the font is System. You know.. the butt ugly font.
What am I missing here!?
I am using the WTL theme classes, and I did try using the raw API. In both cases I get the same result. If I do this:
hTheme = OpenThemeData(m_hWnd, L"Button");
DrawThemeText(hTheme, hdc, BP_PUSHBUTTON, BPS_NORMAL, CT2CW(szText), -1,
DT_VCENTER | DT_CENTER | DT_SINGLELINE | DT_WORD_ELLIPSIS, 0, &rcClient); I end up with an ugly text drawn with the System font.
Help. Please?
--
"We shall crush you down to the point,
where there is no coming back,
things will happen to you from
which you could not recover if you
lived a thousand years, a thousand years."
|
|
|
|
|
|
|
hello,
how can i get the total no of pages printed in one print job in vc++ /win32 appln.
please give some code ...
|
|
|
|
|
Search for Q196805 in MSDN there is a Article about print monitors and some sample code
if you want to Download the sample code
Click ME[^]
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
The GetJob API call will give you number of pages and copies - although for truely rteliable page counts you will need to dissect the spool file.
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
hello ,
how to get the full path of the printed file in vc++ ?/?
please give the explaination with code example
panda
|
|
|
|
|
Search for Q196805 in MSDN there is a Article about print monitors and some sample code
if you want to Download the sample code
Click ME[^]
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
hello all,
how to gerister a dll in vc++ editor ,in command prompt and in run dialog ?
panda
|
|
|
|
|
use RegSvr32 file.dll
if you have the Code then open it in VC and goto Tools and Register Control
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
thanks monty sir,,,,
skpanda
|
|
|
|
|
MailMonty wrote:
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
R u in liging process or learning process?
I was born intelligent Education ruined me!.
|
|
|
|
|
I'm trying to create a SDI MFC application with two CViews for a game(level editor).
One main view where you can see the level map and a secondary view to the right where you can select tiles to place in the level map.
I was wondering what's the best way of creating these two views.
The view that's created by the framework takes up the whole window, is there any way to have it be a certain size?
I don't want to use splitter windows(unless you can have a splitter that can't be moved, I want fixed sizes for the windows).
|
|
|
|
|
Use the Splitter Window
and to stop the Resizing of the Splitter window
Derive a class from CSplitterWnd
and Override HitTest and return 0 from it
<
class CExSplitterWnd : public CSplitterWnd
{
.....
virtual int HitTest(CPoint pt) const;
....
};
int CExSplitterWnd::HitTest(CPoint pt) const
{
return 0;
}
>
this will freeze the frames
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
Tryed it, doesn't work. Does anyone know how to prevent a splitter from resizing?
|
|
|
|
|
It works like a Charm everytime i do it you must be doing something wrong
check the MSDN Online for article no 105150
or
click me[^]
if you want ur application's resizing stopped try to handle mainframe's onsize or mouse click events(NC)
if you don't want to use Splitter window at all then create a CView and in the CView create two child windows side by side (handle all the sizing in OnSize event)
u'll get the desiered results
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
I overrode the onsize event, that seemed to do the trick, thanks.
|
|
|
|
|
Why not have the selectable tiles as a toolbar? (unless you have thousands of different tiles...)
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
Hello to anyone who is willing to put a little thought in this.
I am in a quite hopless position right now.
The problem is this:
Suppose that there is a program that is running under Windows 95, 98 or ME, and this program malfunctions and freezes at some point. An external process (another program), learns this (
via means of a common bit in the LPT1, or a memory location being written periodically with '1' or '0' , so that the 'external watchdog program' gets the changes and knows if the program is still alive or not).
This, under Microsoft C++, would naturally involve CreateProcess or ShellExecute API calls to spawn the process and TerminateProcess to kill it. The problem is that under testing, when I terminate and re-spawn the process at regular 20s. intervals, after a while (it may be a few minutes up to half an hour, i.e. from 10 - 200 re-spawns), I get the Pop-Up Window
"Windows cannot find xxx.xxx. Please make sure the file exists e.t.c."
The weird thing is that CreateProcess API returns succesfully
and the GetLastError function is equal to 0, i.e. no error!
This happens when I run my code under Windows 95, 98 or ME.
Under Windows XP and for 12 hours consecutivelly the program runs fine. What could be the issue here?
**Note that both processes are console applications.**
I also tried putting a significantly long wait between the kill and the re-spawning (e.g. 13 seconds) but to no avail.
Something gets corrupted at some point but I have not been able to trace what. I do not think memory leaks is an issue in this case as the program is fairly simplistic and I close all handles normally.
I post some sample code below:
#include "stdafx.h"
#include "GetProcessID.h"
#include <tlhelp32.h>
#include <conio.h>
#define Debug true
unsigned char bit;
void killTheOther();
void RebootTheOther();
PROCESS_INFORMATION ProcessInfo;
STARTUPINFO StartupInfo = {0};
HANDLE theHandle;
int main(int argc, char* argv[])
{
UINT nactual = 0;
unsigned char temp = '0';
int SetWaiting = 0;
SetConsoleTitle("Stupid");
HANDLE Done = CreateEvent(0, FALSE, FALSE, 0);
// ensure window title has been updated
// look for newWindowTitle
Sleep(40);
HWND hwndFound = FindWindow(NULL, "Stupid");
// If found, hide it
if ( hwndFound != NULL){
//ShowWindow( hwndFound, SW_HIDE);
}
CloseHandle(hwndFound);
StartupInfo.dwFlags = STARTF_USESHOWWINDOW;
StartupInfo.wShowWindow = SW_SHOW;
if (!(CreateProcess("C:\\2.exe", NULL, NULL, NULL, FALSE,
CREATE_SUSPENDED | CREATE_NEW_CONSOLE, NULL, NULL,
&StartupInfo, &ProcessInfo))){
printf("Could not start process..., beacause:%d \n",
GetLastError());
theHandle =NULL;
}
else {
ResumeThread(ProcessInfo.hThread);
if (Debug)
printf("Process is started...\n");
theHandle = ProcessInfo.hProcess;
}
while(true){
bit = '0';
temp = bit;
if (Debug)
printf("Checking status...\n");
if (temp == bit){
SetWaiting++;
}
else{
SetWaiting = 0;
}
if (SetWaiting > 2){
printf("Here...\n");
if(theHandle != NULL){
killTheOther();
Sleep(10000);
RebootTheOther();
}
else{
printf("The han is NULL\n");
}
SetWaiting = 0;
}
WaitForSingleObject(Done, 10000);
}
return 0;
}
void killTheOther(){
TerminateProcess(theHandle, 0);
CloseHandle(theHandle);
theHandle = NULL;
}
void RebootTheOther(){
CloseHandle(ProcessInfo.hProcess);
CloseHandle(ProcessInfo.hThread);
if (!(CreateProcess("C:\\2.exe", NULL, NULL, NULL,
FALSE, CREATE_SUSPENDED |
CREATE_NEW_CONSOLE, NULL, NULL, &StartupInfo,
&ProcessInfo))){
if (Debug)
printf("Could not start process...\n");
theHandle = NULL;
}
else {
ResumeThread(ProcessInfo.hThread);
if (Debug)
printf("Process is started...\n");
theHandle = ProcessInfo.hProcess;
}
}
Sorry about my English
|
|
|
|