|
If you want the window to be created hidden then how about not creating it with the WS_VISIBLE
style?
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
Hi!
Old laptop died so I took it as a sign to upgrade Laptop, W2k->Xp, VC6 to VS2005, Crystal Reports 8.5 ->9 , InstallShield 5->11 etc..
Can anyone recommend any good resources (books, links) to get up to speed in VS2005? I have no identions to develop for .NET or switch to C# or anything. Windows executables, written in C++ is what I do...
|
|
|
|
|
|
Excellent! Any other resources?
|
|
|
|
|
There's not much to learn, except that the IDE itself is very different. The compiler is significantly more C++ compliant, so if your old code is not standards compliant, you could have some issues at first, until you fix it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi there,
I have a problem in conversion of char.
If i have a char with the decimal value of -42, how do i convert this to char of '1' and '0'. It must be only characters and not int of '1' and '0'.
For example, a char with the decimal value of -42 is equal to a string of char 11010110. Anyone can help me? i've tried various method, but can't seem to find the solutions.
Thanks for any help or guidance.
-- modified at 11:12 Sunday 25th February, 2007
|
|
|
|
|
/*
On Visual C++ 6.0, this works (Disclaimer: but be careful with char/int conversions in the general sense)
*/
char ch = -42;
char szBuffer[33]={0}; // 32-bit
itoa(ch,szBuffer,2);
TRACE("Binary of %d : %s\n",ch,szBuffer+24); // 8-bit
|
|
|
|
|
spy++ track message
P WM_LBUTTONDOWN fwKeys:MK_LBUTTON xPos:39 yPos:11
S WM_GETDLGCODE
R WM_GETDLGCODE fuDlgCode:DLGC_UNDEFPUSHBUTTON | DLGC_BUTTON
S WM_GETDLGCODE
R WM_GETDLGCODE fuDlgCode:DLGC_UNDEFPUSHBUTTON | DLGC_BUTTON
S BM_SETSTYLE dwStyle:BS_DEFPUSHBUTTON fRedraw:True
p WM_LBUTTONUP fwKeys:00000 xPos:20 yPos:84
S WM_CAPTURECHANGED hwndNewCapture:00000000
R WM_CAPTURECHANGED
P WM_MOUSELEAVE
P WM_PAINT hdc:00000000
S WM_GETDLGCODE
R WM_GETDLGCODE fuDlgCode:DLGC_DEFPUSHBUTTON | DLGC_BUTTON
S BM_SETSTYLE dwStyle:BS_PUSHBUTTON fRedraw:True
thanks.
|
|
|
|
|
That's how the button control works, the button that has the focus also becomes the default button, so you can click it by hitting Enter.
|
|
|
|
|
Hi experts,
I build one page of document which is a result of some calculation.
What control can I use to display one of document or HTML document?
How can I print it?
I want to use dialog box.
Thanks,
|
|
|
|
|
Hi,
I am trying to catch a message when a dead character is pressed:
I created a single document project and tried the following:
1. Add ON_WM_DEADCHAR() and a corresponding OnDeadChar() method
2. Implemented WindowProc() and search for WM_DEADCHAR message.
To make sure that keyboard message are catched, I catch WM_KEYDOWN as well and it is works fine.
Does someone have a clue how to get a message when a dead key is pressed?
Thanks, Udi Raz
|
|
|
|
|
udiraz wrote: a dead character
udiraz wrote: a dead key
what on earth is that ??
|
|
|
|
|
Maybe it's not on earth but on the Mars ??
|
|
|
|
|
toxcct wrote: what on earth is that
CWnd::OnDeadChar[^]
MSDN: The framework calls this member function when the OnKeyUp member function and the OnKeyDown member functions are called
Looks like its called when there are contradictory calls in the queue.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
oh, I never heard of this one... thanks for the link !
|
|
|
|
|
toxcct wrote: I never heard of this one
Yea, ditto, I had to look it up. Not to sure why the OP is worried about it, but whatever, learn something new every day.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
udiraz wrote: Does someone have a clue how to get a message when a dead key is pressed?
I wouldn't worry about it to much.
CWnd::OnDeadChar[^]
MSDN: The framework calls this member function when the OnKeyUp member function and the OnKeyDown member functions are called
Looks like its called when there are contradictory calls in the queue.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Hello everyone,
I'm trying to write some code that reads two bytes from a location in a file, and checks to see if those bytes are empty before writing something to that space. My problem is that the bytes being read seem to contain a lot of junk from somewhere else. I'd like to write nothingness to bytes (itemsize * itemnumber) + (itemsize * itemnumber) ... etc. This seems like a relatively easy fix, anyone have any ideas?
Thanks,
Sean
P.S. this is an fstream we're talking about here
|
|
|
|
|
I write a program to split a big file(several GBs) to very small files.
It takes hours for one run. I got "Insufficient System Reource" or "abnormal program termination" error when the program is close to end(when the splitting is close to finish), on Windows XP. all running programs on my system seem in unstable state, i cannot send mail("out of memory"), or access local network resouce, but the task manager doesn't show any number that is anormaly high. the only thing i can do is to reboot.
|
|
|
|
|
Good day ppl,
I need to set a checkbox(IDC_CHECK_1A) to be checked when the form is first loaded.
At OnInitDialog(); ,
how to go about in implementing this with a member variable and SetCheck();?
Need help urgently. Thanks!
Missmelty
|
|
|
|
|
Without a control member variable you could do it like this:
SendDlgItemMessage(IDC_CHECK_1A, BM_SETCHECK, BST_CHECKED);
To add a control you can right click on the control in the resource editor and coose Add Variable.
Add a control variable, type CButton, and give it a name. The variable will be added to the class
associated with the dialog resource.
Once you have a control (e.g. CButton m_Checkbox1A):
m_Checkbox1A.SetCheck(BST_CHECKED);
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
CheckDlgButton (IDC_CHECK_1A, BST_CHECKED); /ravi
|
|
|
|
|
Good one! I've been doing it the long way with SendDlgItemMessage()
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
why not using CWnd::SetCheck(BST_CHECKED) also ?
|
|
|
|
|
Yeah I do use that when I have a control object. I meant for the non-control ones
Thanks!
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|