|
LZL1010
I dont kown your code you write how to create scrollbar by the client rect
I insert a change to your code and if you need to left edge use rect.bottom=cy;rect.left=cx-15;rect.right=cx;
|
|
|
|
|
|
|
Hi Guys,
I'm creating one dll in MFC and compile by release mode. In my project I have used 3 global variables in stdafx.h file
global variables are
char *g_strename;
char *g_streid;
char *g_isalary;
Say file name: employee (DLL created using MFC appwizard DLL)when I compile my project it shows linker error messages & warning messages
StdAfx.obj : error LNK2005: "char * g_strename;(?g_strPassword@@3PADA) already defined in employee.obj
StdAfx.obj : error LNK2005: "char * g_streid@@3PADA) already defined in employee.obj
StdAfx.obj : error LNK2005: "int g_isalary;@@3HA) already defined in employee.obj
this is followed by LNK4006 warning message.
please help me out, to rectify this. Just quick will do be great.
Thanks
Vivek.S
You only have to do a very few things right in your life so long as you don't do too many things wrong.
|
|
|
|
|
vivek.s.vivek wrote: global variables are
char *g_strename;
char *g_streid;
char *g_isalary;
transfer these variable to a .cpp file and use
extern char *g_strename;
extern char *g_streid;
extern char *g_isalary;
in stdafx.h
|
|
|
|
|
there is another option too... declare it as
static char *g_strename;
static char *g_streid;
static char *g_isalary;
nave
|
|
|
|
|
Hey everyone:
Here's the scenario. I have a window that displays what I want the user to see the first time, but immediately they see it, I need to call a command that will send the window to all black. However, I want to keep painting the window with what the user saw the first time.
Is there a way of 'copying & pasting' contents from a window, so I can make it seem as though nothing has happend?
Thanks!
`Chase
(VC++ only, no MFC )
|
|
|
|
|
Hi all,
I'd like have the scrollbars for the main window of my MDI application corresponding to the Child windows' size and position. If anyone could suggest me something, it'd be more helpful.
Thanks in advance,
Sarvan AL
|
|
|
|
|
hi all,
i want to enable/disable menu items using SendMessage(...) Api. How can we achieve this using SendMessage(...) API. please tell me your solutions for this.
thanks,
uday.
uday kiran
|
|
|
|
|
|
|
I am doing some eval of debug tools, and so far I don't really like any of them.
I've tried:
* Rational Purify (IBM) (not too impressed)
* Insure++ ( jury is out )
* AQTime
What's the consensus out there?
What's the best tool for finding memory leaks in C++?
What do you think of these tools?
Would love a tool that can do some CPU usage profiling too.
Thanks!
Oh, I current run under dev studio 2003 C++
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
-- modified at 3:18 Wednesday 12th April, 2006
|
|
|
|
|
|
I want to disable my enter key. how to do that?
|
|
|
|
|
uhh -- in what context? where and how?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|
|
Aryan S wrote: I want to disable my enter key. how to do that?
If you yank it really hard using a chisel it usually just pops out of its socket. But it will be mighty hard to type properly without the Enter key.
*radio crackle*
The cucumber has left the salad
- I say again -
The cucumber has left the salad
David in soapbox
|
|
|
|
|
check for the PreTranslate Message and check for the EnterKey scan code if it is true then simply write return true.
cheers,
uday.
uday kiran
|
|
|
|
|
You can overwrite the PreTranslateMessage(...) method like this:
BOOL CYourDialog::PreTranslateMessage(MSG* pMsg)
{
if ((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_RETURN))
return TRUE;
return CDialog::PreTranslateMessage(pMsg);
}
|
|
|
|
|
I doubt that you may need to disable the enter key in a dialog application...
If so then you can override the void OnOK() in your dialog class and avoid the calling of CDialog::OnOK() inside it.
- NS -
|
|
|
|
|
What are the limit to putting an icon on the system tray?
what size?
how many colors?
Everytime I get new artwork from our designers, they look crappy on the system tray.
What parameters should I give them in order to make a decent icon?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|
|
size: 16x16
colors: I think in Win 2K you can use 256 colors; in previous OSes it was 16 colors max. XP probably supports 32-bit icons now, but I can't quite tell now since the shadows are hard to detect against the blue taskbar.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Hi All,
I read in one of the forums that an EnumPrinters() for Network printers when used in a service , does not work because the service is running under SYSTEM account.
This is the problem. can any of u give me some inputs on how to solve this.I need to use
EnumPrinters() from the service.
are there any access rights that need to be given to the SYSTEM Account ? If yes, how do we set them ?
Any solutions ?
Thanks for the help.
|
|
|
|
|
A SYSTEM account service typically does not have full access to the network.
You can run your service under a specific account that DOES have network access.
You can imersonate a specific account which has network access from within your service which is running under the SYSTEM account.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
Hi
I want to find the path of Recycle Bin Folder and original path of files and
folders that are in recycle bin.
or complete path of files and folders with recycle bin.
Please reply
Thanks
|
|
|
|
|