|
Your label control does not exist at the point you are trying to hide it.
You need to call CDialog::OnInitDialog in your OnInitDialog method before the control exists.
BOOL CExampleDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CLabelControl* lTest;
lTest=(CLabelControl*)GetDlgItem(IDC_LABEL_TEST);
lTest->ShowWindow(SW_HIDE);
return true;
}
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Dear all,
can any one provide me the "C source code for A* algorithm"
|
|
|
|
|
|
Dear Friend,
From my PC, I have to read the text file from another PC(server PC).
After that i have to invoke one "EXE" (application) present in that same PC(Server PC).
Then i have to send the information what i have read from that file to this application.
Kindly help me.
|
|
|
|
|
Are both PCs on the same network and able to share disks? If so you can just read the file and execute the program from the server's shared disk.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
hi all,
can anybody help me to extract plain text from html file?
thanks.
|
|
|
|
|
A very simple parser would:
- Get the used character set from the header
- Locate the next < char, locate the next > char behind, and delete all in between.
- Replace the HTML entities &, <, >, and " by the corresponding chars &, < >, and ".
- Optional replace other entities by the corresponding characters according to the used character set.
- Optional replace Unicode code points (&#[x]cp;) by the corresponding characters according to the used character set.
- Optional convert the resulting text to the required output character set
|
|
|
|
|
I need to convert my programs from c++ 6 to Visual stutio professional 2010.
Please advise how to proceed and what I need to fix typically ? What is the best way to do this ?
Thanks
Ruilin
|
|
|
|
|
This link will help you[^]
Every new day is another chance to change your life.
|
|
|
|
|
thanks a lot. Do I have to install visual studio 2008 for converting my visual c++ 6 (2003) ?
Please give me some guidances.
hanks again
|
|
|
|
|
I dont have much idea on that. Like you i am also new to this. The only difference is i searched the net first and i send you the link which really suited your query. There are other sites which gives you a very good insight on how the migration has to be done.
See this link [^]
Every new day is another chance to change your life.
|
|
|
|
|
mrby123 wrote: Please advise how to proceed
Create a project in VS2010, add the source code from C++ 6 and build the project. Fix all warnings and errors.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
You just need to jump right in and convert it. There's no magical way to do it and the number of warnings and errors you get depend on what your source code has in it and how well you coded according to standard (old compiler used to let you get away with using non-standard C++, new one is better about that but still, MS refuses to follow standards strictly, they implement things they want regardless of current standards).
...oh, and don't forget to save a copy of your unchanged code for reference or if you need to fall back to your original code. If you have source control, create a tag to save the location.
modified 19-Mar-12 13:39pm.
|
|
|
|
|
Like others have stated. Just open the project or solution in vs2010 and let it convert and backup. Then start walking down the list of errors one at a time. If it's just vc++ and no extensions it should be easy.
|
|
|
|
|
|
Gurus,
Please help on this warnning message when I built:
1>d:\test\blast_vib_proc_new\blast_vib_procdlg.cpp(211): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdio.h(234) : see declaration of 'fopen'
1>d:\test\blast_vib_proc_new\blast_vib_procdlg.cpp(223): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdio.h(234) : see declaration of 'fopen'
|
|
|
|
|
|
thanks, that is useful to me.
|
|
|
|
|
Dear Developers,
Todays I found a surprsing fact on the scenario of functiona overlaoding in C++.
The code segment is here
#include <iostream>
using namespace std;
void display( char* );
void display( const char* );
void main()
{
char *ch1 = "Hello";
const char *ch2 = "Bye";
display(ch1);
display(ch2);
}
void display( char* p )
{
cout << p;
}
void display( const char* p )
{
cout << p;
}
As I know, In function overloading, the arguments must be differ in either in type or count. But its working. and one more surpring fact is that if I am remving pointers on that program. It says.. that function already have a body.
How is it possible????
Please guide me.
Thnaks.
Amrit Agrawal
Software Developer, Mumbai
|
|
|
|
|
Use code tags when you post code.
What do you mean by "removing pointers"?
Amrit Agr wrote: the arguments must be differ in either in type or count. But its working.
The arguments to the methods have different types.
And do you have warnings turned on to the highest level in your C++ compiler?
|
|
|
|
|
Hi, Amrit,
It's working because it's legal to overload functions based on whether the argument refers to a const or non-const type.
So,
void display(const char*) is overloading
void display(char*)
And you're correct. The following couldn't be overloaded. It won't compile because of const conversion used by compiler. It can't figure out which one is the best match.
void display(char);
void display(const char);
void display(char const);
(Technically, the above are redeclaration. It's fine to just define the third one by adding function body. But it won't compile if all of these three functions have function bodies or definitions.)
By the way, to be clearer, the following won't compiler neither because of the same reason.
void display(char*){...} void display(char* const){...}
|
|
|
|
|
I've created an application that paints on the window using GDI functions. It works fine. But because it is still under development it sometimes craches. It seems that if there are certain craches Windows Vista suddenly decides to treat my application in a new way: while drawing on the window it decides it must redraw that was on the screen when i started my application. The effect is that some drawing is lost. Windows continues with this behavour till i reboot my pc. After i booted the same piece of code draws the window correctly. I used Spy++ to find out what's happening. When the window is correctly displayed i see the following:
<00037> 00340626 P WM_LBUTTONDOWN fwKeys:MK_LBUTTON xPos:1215 yPos:640
<00038> 00340626 P WM_LBUTTONUP fwKeys:0000 xPos:1215 yPos:640
<00039> 00340626 P WM_LBUTTONDOWN fwKeys:MK_LBUTTON xPos:1249 yPos:711
<00040> 00340626 P WM_LBUTTONUP fwKeys:0000 xPos:1249 yPos:711
(I press the mousebutton to start drawing, it draws the window, i press the mousebutton again to close the window)
When things go wrong Spy++ reports the following:
<00037> 00340626 P WM_LBUTTONDOWN fwKeys:MK_LBUTTON xPos:1219 yPos:643
<00038> 00340626 P WM_LBUTTONUP fwKeys:0000 xPos:1219 yPos:643
<00039> 004904B2 S WM_WINDOWPOSCHANGING lpwp:0012FE20
<00040> 004904B2 R WM_WINDOWPOSCHANGING
<00041> 004F0646 S WM_WINDOWPOSCHANGING lpwp:0012FE20
<00042> 004F0646 R WM_WINDOWPOSCHANGING
<00043> 00340626 S WM_WINDOWPOSCHANGING lpwp:0012FE20
<00044> 00340626 R WM_WINDOWPOSCHANGING
<00045> 004904B2 S WM_WINDOWPOSCHANGED lpwp:0012FE20
<00046> 004904B2 R WM_WINDOWPOSCHANGED
<00047> 004F0646 S WM_WINDOWPOSCHANGED lpwp:0012FE20
<00048> 004F0646 R WM_WINDOWPOSCHANGED
<00049> 00340626 S WM_WINDOWPOSCHANGED lpwp:0012FE20
<00050> 00340626 S .WM_SIZE fwSizeType:SIZE_RESTORED nWidth:1280 nHeight:770
<00051> 00340626 R .WM_SIZE
<00052> 00340626 R WM_WINDOWPOSCHANGED
<00053> 004904B2 S WM_WINDOWPOSCHANGING lpwp:0012FE20
<00054> 004904B2 R WM_WINDOWPOSCHANGING
<00055> 004F0646 S WM_WINDOWPOSCHANGING lpwp:0012FE20
<00056> 004F0646 R WM_WINDOWPOSCHANGING
<00057> 00340626 S WM_WINDOWPOSCHANGING lpwp:0012FE20
<00058> 00340626 R WM_WINDOWPOSCHANGING
<00059> 00340626 P WM_PAINT hdc:00000000
<00060> 00340626 S WM_ERASEBKGND hdc:D1011D9A
<00061> 00340626 R WM_ERASEBKGND fErased:False
<00062> 00340626 S WM_GETICON fType:True
<00063> 00340626 R WM_GETICON hicon:1CA203B1
<00064> 00340626 S WM_GETICON fType:False
<00065> 00340626 R WM_GETICON hicon:00000000
<00066> 00340626 S WM_GETICON fType:True
<00067> 00340626 R WM_GETICON hicon:089A0417
<00068> 00340626 P WM_LBUTTONDOWN fwKeys:MK_LBUTTON xPos:1252 yPos:726
<00069> 00340626 P WM_LBUTTONUP fwKeys:0000 xPos:1252 yPos:726
The big difference is lines numbered 39-67. Does anyone understand what's happening here? And what is a correct solution for this problem? What causes it? It seems that i have to intercept the paint message to tell Windows to shut up. But what worries me is that the hdc is 0.
Any help will be appreciated..
|
|
|
|
|
That just looks like the window position is getting changed. Hard to say what may be wrong from just looking at the messages that Windows is sending your applications window. You probably need to post some of the applicable code.
|
|
|
|
|
I read about Secure erase command that has been implemented in HDD firmware after 2006, under T13 commitee authority. Can this command be invoked from a MFC program?
|
|
|
|
|
C/C++ programs can call any API exposed either via the OS or other applications.
They can also invoke assembly. Even if the MS compilers do not support embedded assembly (I didn't look) one can still invoke assembly via a function pointer cast.
So basically if your equipment supports it then it can be called in C/C++. Doesn't mean it is easy though.
|
|
|
|