|
The reason that changes to resource.h do not always result in a recompilation is that VC++ insists on putting a line that says NO_DEPENDENCY at the top of it. I find this incredibly annoying. Why couldn't they make it a selectable option ?
|
|
|
|
|
You are exactly right and that is why it annoys me so much. I have figured out how to play their game though and remove the NO_DEPENDENCY line with a minimum of headache. I do this in nearly every project I work on. With the speed of computers these days I can think of no good reason to have anything NOT dependent on resource.h that uses it. It only causes problems and does provide no benefit.
|
|
|
|
|
Finally I found out the solution. I didn't associate the Menu to Main Frame. Instead I did to one of the views. Surprisingly it let me pick a view.
|
|
|
|
|
Hi.
One of the applications I've coded refuse to work correctly on WinXP (but was working fine for months under Windows 2000). I wonder if someone else notice this kind of problem.
More specificaly, I'm using anonymous pipes to make the two parts of my application communicate, but unfortunately the created process never get the handle of the pipes the main process creates. It results in the fact the the child process get the standard STDIN/OUT/ERR handles when it does GetStdHandle().
[Note: I'm not using CreateProcess, but CreateProcessWithLogonW. I can send a part of the code if it helps.]
|
|
|
|
|
Any body here Know where I can find some documentation about that?
Best Reagrds....
Tomorrow is Friday!!!
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
The foundational paper by Charles Simonyi.
It is my impression that Hungarian notation has fallen into some discredit during the last years, mainly because it promotes a very loose way of type checking. Languages more modern than C (like C++) have stricter type checking systems that render this kind of nmenomics redundant in the best case (or false in the worst, if you changed the type of a variable and forgot to rename it).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Gracias Joaquin,
Muy util, tu información....
Best Regards!!!!
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
|
Thanks, it's very funny!!!
Estaba interesado en esa notación porque un compañero de trabajo no la conoce.
I was interested in that notation because a co-worker don't know it...
Joaquín,
Thanks again
Muchas Gracias....
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
I've created an ActiveX control with VC++ 6.0, and i try to call CoInitializeEx() at the beginning of a worker thread, but it doesnt recognize the API, and all I get is an undeclared identifier error for that
and COINIT_MULTITHREADED;
I linked to "ole32.lib" and i threw in in for kicks at the top of the .cpp and in a separate case, the .h
I AM LIKE ----------------| |-------------------
THIS CLOSE
to getting this crap... i dont have a clue... i've running the project on a different machine as well and i get the same errors. i've tried to throw in just about every other library as well... am i missing a library? Could someone show me what libraries they link to in a project that works? Any suggestions would be so helpful...
Thanks,
~Tim
SHABBA!!
|
|
|
|
|
Add this before the standard headers are included in your stdafx.h file
#define _WIN32_WINNT 0x0400
Chen Venkataraman
|
|
|
|
|
Let's all say it together kids:
"Chen Venkataraman is THE MAN"
thanks a whole whole whole whole whole bunch.
*BIG SIGH OF RELIEF*
~Tim
SHABBA!!
|
|
|
|
|
BTW, you could also do the same with Project Settings -> C/C++ -> Preprocessor & add this _WIN32_WINNT=0x0400 to the defines
Chen Venkataraman
|
|
|
|
|
Have anyone come across any function that can format a number with thousand seperators?
Thanks
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
|
Hi,
I saw that the code below didn't work in order to get a HBITMAP in an extension DLL:
// Set a bitmap for a button
m_pbSample.SetBitmap(LoadBitmap(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_SAMPLE)));
I found another method for that and it works:
CBitmap bmSample;
VERIFY(bmSample.LoadBitmap(IDB_SAMPLE));
// Set a bitmap for a button
m_pbSample.SetBitmap((HBITMAP)bmSample.Detach());
Now, I would like to do the same for an icon in extension DLL. Assume that I have an icon in the DLL resource named IDC_SAMPLE.
How can I get an HICON for that? I need this to change the icon in the title bar of a dialog.
HICON hiconSample;
// ???
SetIcon(hiconSample, FALSE);
SetIcon(hiconSample, TRUE);
Thanks....
|
|
|
|
|
Does anyone know how to change the screensaver to another one.
I know I can change the HKCU\control panel\desktop\scrnsave.exe value, but then the user have to reboot.
Is there an API to do it?
I can set some properties on the screensaver with SystemParametersInfo(), but I cant find a way to tell the system that I have changed the scrnsave.exe registry value...
Any ideas?
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
When running my VC++5/MFC app under XP, most dialog fonts look bad. Fonts in property pages & common dialogs look great (except for added controls in FileOpen). Fonts in menus and messageboxes look great, too. Adding a manifest file makes no difference to the fonts, but verything else turns cool<g>.
From scouring MSDN/KB it seems the trick is to specify dialog resources to have style DS_SHELLFONT and use the "MS Shell Dlg" font (rather than "MS Sans Serif").
However ... in VC++5, DS_SHELLFONT isn't defined and I can't specify "MS Shell Dlg" (because its not availalable on my development system?)
Is my understanding of the issues / solution correct ?
Is there a way to achieve what I need with VC++5, or must I upgrade to VC++6, or what ?
Many thanks
Steve Kearon
|
|
|
|
|
You need to do three things:- Change the DIALOG resource to DIALOGEX (just add the "EX" in a text editor).
- Change "MS Sans Serif" to "MS Shell Dlg". (MS Shell Dlg isn't a physical font, you won't find it on any system. It's a special name the OS recognizes.)
- Add DS_SHELLFONT, which is equal to DS_SETFONT | DS_FIXEDSYS
--Mike--
http://home.inreach.com/mdunn/
"Not our fault we are intellectually superior to the rest of the office." -- Paul Watson in the Lounge, 12/12/2001
Sonork - 100.10414 AcidHelm
|
|
|
|
|
i'd like to convert between a char and int!
from CString.GetAt(int) i get a char ( or unsigned short) how do i change this to an integer (to get the ASCI code)???????
Please help
|
|
|
|
|
int iInt = 127;
char cChar = 99;
char cCast = static_cast<char>(iInt);
int iCast = static_cast<int>(cChar);
Normski. - Professional Windows Programmer
|
|
|
|
|
HTML parser ate some stuff:
int iInt = 127;
char cChar = 99;
char cCast = static_cast <char>(iInt);
int iCast = static_cast <int>(cChar);
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Cheers Tim,
I don't much web stuff.
Normski. - Professional Windows Programmer
|
|
|
|
|
Cheers Tim,
I don't do much web stuff.
Normski. - Professional Windows Programmer
|
|
|
|
|
Does anyone know how to get the system idle time???
Thanx in advance
Bin
|
|
|
|