|
See SetCursor():
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
You can use of Add Resource for insert or import your cursor and use of LoadImage or LoadCursor for load it or also you can use of CreateCursor to create a cursor and in the end use of SetCursor
|
|
|
|
|
I am a relative newbie to Visual Studio and C++. I have a C++/MFC/SDI application that is about 1/2 finished and so far so good. Ultimately I wish to statically link any required DLL's and distribute a single stand-alone application (without also distributing separate DLL files). I am having trouble with that.
In fact, I can't create a new project (C++/MFC/SDI) skeleton with static linking using the App Wizard that will compile without also setting the /MDd (debug version) option in the Properties/C++/CodeGeneration section. When I do that, it will compile fine, but the resulting executable requires the DLL's. It doesn't seem to make any difference whether the configuration is for a Debug or a Release build, the DLL's are still required.
Is this simply not possible?
I feel that I must be missing something, because I believe that I did something similar several years ago and it worked fine.
Thanks, Stan
|
|
|
|
|
Which version of visual C++?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Visual Studio 2005
Version 8.0.50727.42
(RTM.050727-4200)
I'm assuming that this is Release To Manufacturing 07/27/05 ?
Could a re-install solve the problem?
Stan
|
|
|
|
|
Is it VS2005 Express, Standard, or Pro?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
It is the Professional Edition of VS2005.
Stan
|
|
|
|
|
I am making an ActiveX application, in that i need to identify when a user presses enter button. I am doing something like--->
char ch;//the current character being pressed....
/*Some Code*/
if(ch==0x0A || ch==0x0D)
{
///Some Code
}
now the if condition is not being met(0x0A-->Ascii code for Line Feed, 0x0D-->Carriage Return). If i give the value in decimal also, its not working. Any suggestions in this regard...Thanks in advance...
|
|
|
|
|
ch will be 0D, assuming that this code is catching all key presses. Where are you handling the event ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
i am doing something like--->
BOOL CHTSL_ScintillaCtrl::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
char ch;
SCNotification *scn_notify; //stores notification message...
switch (scn_notify->nmhdr.code)//The event which happened.
{
case SCN_CHARADDED: //if a new character is added.
//Some code which extracts the currently typed character. Working fine..
//value stored in ch.
if(ch==0x0A || ch==0x0D)
{
///Some operations
}
The above if condition is not working for Enter key. All other characters i am able to identify. Is there any other value assigned to NewLine?
|
|
|
|
|
I believe you need to set up a text box to accept the enter key, it generally doesn't.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I am developing an editor using Scintilla. If i am doing the same thing in VB, by comparing the character with vbCr, it is working fine. Another thing...
If i am doing, (ch== -52), it is detecting the Enter key with that code..I dont understand the logic.
|
|
|
|
|
You can do something like:
BOOL CYourCtrl::PreTranslateMessage(MSG* pMsg)
{
switch (pMsg->message)
{
case WM_KEYDOWN:
switch (pMsg->wParam)
{
case VK_RETURN:
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
cast all values to int and use ( (ch==0x0A) || (ch==0x0D) ) ..it sometimes helps.
Greetings from Germany
|
|
|
|
|
vikram.vit wrote: if(ch==0x0A || ch==0x0D)
Have you put a breakpoint on this line to check the value of ch when the Enter key is pressed? Knowing why the condition is failing will go a long way towards solving the problem.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi All,
I am working with CFileFind MFC. Here I have a dialog based application that shows list of files in a directory.
I need to show the staus information on the STATIC control of that dialog while processing.
How do i this? Is threading concept useful? if yes can you show me some links about it.
Thanks.
|
|
|
|
|
U should use Thread here.
Come online at:-
jubinc@skype
|
|
|
|
|
Sakthiu wrote: I need to show the staus information...
Of what? The file-find progress, or of the files themselves? Be more specific about what you are after.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Sakthiu wrote: I need to show the staus information on the STATIC control of that dialog while processing.
Do you want that static control should show the current accessed file or directory?
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Do you wan to set a progress bar for files 1,2,...1000 ?
|
|
|
|
|
Why WM_ERASEBKGND, since all the paintings can be done with the WM_PAINT itself?
- NS -
|
|
|
|
|
In general the WM_PAINT handler will not "touch" every pixel: it might just write some text in the corner for example. Still the entire client area need to be updated if its dirty. Thus the two stage painting.
Steve
|
|
|
|
|
OK... that i know.
But my doubt is, since WM_PAINT will update enough area in the window, is WM_ERASEBKGND necessary? And i could find out that if a WM_ERASEBKGND message is sent, WM_PAINT will be surely sent after that to update the whole area. So i think there is no need to process WM_ERASEBKGND to draw anything.
- NS -
|
|
|
|
|
NS17 wrote: But my doubt is, since WM_PAINT will update enough area in the window, is WM_ERASEBKGND necessary
It depends. If your WM_PAINT handler paints every dirty pixel then you don't need WM_ERASEBKGND . If, as is generally the case, the WM_PAINT handler only touches a subset of the dirty pixels then without the WM_ERASEBKGND handler the dirty pixels not painted will still be dirty. It depends on your application.
You can handle the WM_ERASEBKGND message and return 0 to stop the erasing if you want to.
Steve
|
|
|
|