|
Hi,
I use this custom function and it work :
/**=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=\
| ShowErrorMessage : Affiche le message d'erreur correpondant au numéro d'erreur
| que retourne la fonction GestLastError() |
| --------------------------------------------------------------------------------------
|Arguments : dwMessageId -> Numéro d'erreur retourné par GetLastError()|
| Titre -> Titre de la boîte de message (facultatif)
|
|Si le numéro d'erreur est 0 ( i.e ERROR_SUCCESS ), la fonction n'affiche pas le message
|-----------------------------------------------------------------------------------------|
|EXEMPLES D'UTILISATION :
|------------------------
| 1) ShowErrorMessage(GetLastError());
|
| 2) DWORD NumErreur;
| NumErreur=GetLastError();
| ShowErrorMessage(NumErreur);
=**=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=**/
void ShowErrorMessage(DWORD dwMessageId, char* Titre)
{
if (dwMessageId==ERROR_SUCCESS) return;
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
dwMessageId,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf,
0,
NULL
);
// Affiche la chaîne.
MessageBox( NULL, (LPCTSTR)lpMsgBuf,Titre, MB_OK | MB_ICONINFORMATION );
// Libère le buffer.
LocalFree( lpMsgBuf );
}
|
|
|
|
|
Hi!
Thanks for the help!
I made more tests with Windows NT and it works (shows messages above 3006). But, it still does not work on Win95/98.
Anyway, thank you.
|
|
|
|
|
Hi,
I want to get programmaticaly the default domain name. instead to use API function, i retrive this information from windows registry
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"CachePrimaryDomain"="SRV_DEV"
If this method is'nt correct, anybody can help me how to get this name using API Function?
I work with Visual C++ 6.0 Windows NT4
Thanks in advance
|
|
|
|
|
I have have been asked to display some data within Excel and display a chart within Excel. Using knowledge base articles I have managed this. BUT.... to display everything, Excel is executed as a separate app. Anyone know how I can insert Excel into a dialog based app, as if it were a control like CWebBrowser2??
I know I can display Excel files inside a CWebBrowser control, however I would rather not have to load Excel, write to it, save the data to an .XLS file, close Excel, and then display the .XLS file....
Any help will be greatly appreciated.
|
|
|
|
|
I am trying to put together a set of classes where I can include my main class ( CGPlayer ) and then through it add sound tracks to play through DirectSound. It all works great for waves, but I used the mp3 playing code in the skinnable app project on this site, and because it uses global functions and variables, when I go to play a second mp3, the whole thing barfs. It looks to me like a lot of work to change it, probably resulting in a design that is flawed due to the diffences between the original design intention, and what I want.
Basically I need to be able to create multiple instances of the mp3 playing class, which all have their own buffer, all attached to my main direct sound interface. As always, any help/suggestions guarenteed to result in good karma for all concerned...
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
I believe Windows Media Player will do that via COM.
|
|
|
|
|
I know I can use it to play files ( in fact I have done so ), but I want to be able to play multiple files at once, modify properties of the playback, and attach the files to points in 3D space, all of which is easy to achieve using DirectSound, and I doubt that Media Player will give me that level of control. Am I wrong ?
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Well, then, you need only decompress the .mp3's into WAV format. There are lots of Open Source MP3 players, i'm sure they have code that does this.
|
|
|
|
|
Hello,
I am trying to incorporate the use of shortcut keys, such as F2, F3 etc
into my application.
I would like these shortcuts to apply to the parent window (ie, View or
"main" dialog - ie "popup" style, not child) which currently has focus.
I realise that to do so might require having each "Main Window" (the
level at which I want to distinguish for shortcuts) in a seperate thread.
I have tried using RegisterHotKey in a FormView which works OK,
except even if I create a child dialog in a seperate thread,
registering another hot key with the same VK_ gets ignored
(when the dialog has focus) and the View hotkey processed?
I would have hoped being in a seperate thread would render
the hotkey "different" from the other registered in the FormView?
If anyone could tell me where I am going wrong, or can provide any
alternative suggestions, it would be greatly appreciated.
Thanks,
Tanya
|
|
|
|
|
As a former (and current) UNIX programmer, I am finding myself in a state of confusion when it comes to DB programming in windows. Maybe you have to, that's why I'm asking this here. In UNIX I get the libraries I need to talk to the database and use SQL statements to do it all. I connect, query, then parse the results. I'm looking for something as simple to do under Windows. If it helps, I'm looking for something very php (www.php.net) like in syntax: connect(params), execute(sql statement), fetch_array(results), disconnect(). Most important no note that the fetch_array returns tabel data as record=fetch_array(query_result); record[field]="some val". Alternative to that is fetch_row which you can use the index (column number) of the field to get that value. Is there anything like that in Microsoft? Do I have to use classes of CDatabase and CRecordset? It looks like I have to jump through a lot of hoops to get something simple working.
Secondly, what are the installation requirements for the particular methods? Must I always require Microsoft Access be installed? Under UNIX I can make such a requirement because there always is a UNIX admin handy to install it. But on a PC I cannot make that assumption. I have to assume that any inexperianced user can handle it. Which also raises the question, how do I initialize a database under windows? Could I use hard coded SQL statements?
Thanks in advance
|
|
|
|
|
I'm having a nasty time with AnimateWindow(), on Win2K SP1, using VC++ 6 and ATL/WTL.
The function always fails, and GetLast Error() returns 8 (Not enough storage space to execute the command). I am handling WM_PRINT and WM_PRINTCLIENT; my breakpoints in those handlers are never hit. The dialog that I am painting is bitmap-based, but again, my paint handlers are not called, so I can't see how that would influence things.
I jusy tried the same thing with a simple dialog, and no luck - I get an error code 6 (invalid handle) which is ridiculous, since th ehandle is valied (as demonstrated by a call to ShowWindow()).
HELP!
Jim Johnson
jimj@emu.com
|
|
|
|
|
Send me example please...
|
|
|
|
|
Can someone please tell me how do I simulate pressing the ECS key in MFC??
thanks
|
|
|
|
|
Does any one know how can i find if a word or excel has a macro in it from a vc (mfc) program .
|
|
|
|
|
After Creating the dialog with Create(IDD_DIALOG_NAME,NULL) the function does not return (deadlock).
I have created a dialog with the same resource once before and everything works fine.
But the second time I try to create it the function does not come back.
It is important that I create a new thread in both cases.
The dialog I want to load uses an Avi.
Thank you
I am happy about every small hint.
|
|
|
|
|
could someone pls save me some time and show me how to read a csv file into a recordset?
bart
bart
|
|
|
|
|
hi i would like to update an resource inside a dll pragmatically. It has to be done for win9x .
any suggestion would be appreciated
tia
|
|
|
|
|
Hello all,
I need to write a security program for Win9X. Can I use CBT Hooks to gain control over most everything? I know about policies and they are not sufficient for what I need. I want to disable kb and mouse input and control what applications can be run. Links to some example cbt hooks would also be greatly appreciated.
--Tale
|
|
|
|
|
Good Evening,
I have a contact manager project to start in Feb/Mar and am considering the look of MS Money 2001. It seems a lot different from a Doc/View architecture. Can anyone give advice on how MS Money 2001's gui was designed? The only thing that looks "Visual C++ wizard" generated is the menu at the top. I have only used the Visual C++ MFC.exe wizards and modified things from there as necessary, but very limited. I figure I've got a few weeks to learn the desired gui structure before the project begins.
Thanks!
Scott!
Still learning, but getting better!
|
|
|
|
|
Hi Everybody:
I wanted to open an image(prefferably in TIFF form, but not necessarily) in a window, and draw some lines on the image?(Using VC++ MFC Application)
I 'd really appriciate any help.
thank-you.
Sadegh.
|
|
|
|
|
You basically want to download paintlib ( www.paintlib.de ) to read the tiff, then select the image into a DC and use MoveTo and LineTo to draw your lines.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
how to access to button "zoom on" on a view?(vc++6).
|
|
|
|
|
Hi all,
Im trying to incorperate a chat sort of thing into my program. It has a list control on the side listing the people who are connected to the room, a edit box where people enter their text and a list box which displays the text that people enter.
Okay, now I want to be able to do all that stuff, cept I got no idea how.
If you think you can help, or have a sample application that does that, please respond to this message or email me at pajen007@bigfoot.com
Thanks
Id appreciate it alot!
Ashman
|
|
|
|
|
Your query,
Creates many questions,
There are many different means of creating a chat app,
1. IRC
2. Web Based
3. Messaging,
4. Peer to Peer !
All of them have benefits and problems,
I found Friendly Talk useful resource.
Many people don't like it as it contains proprietry information to tenebril !
But Hey I got it working in less than an hour !
Regardz
Colin Davies
|
|
|
|
|
If anyone knows where I can get info, code or DLL for reading Kodak KDC and PCD format files, I would dearly like to know about it.
Thanking you in advance.
Happy programming!!
|
|
|
|