|
May be you can add a wrapper/container class to your control which you can derive from CView and add printing support to it.
Regards,
Sandip.
|
|
|
|
|
Do you want to print your datas ?
|
|
|
|
|
Hello dear friends,
I ve an application in which I use the VC6.0.
In the application i have used a C# dll's .tlb file.For creating the
setup for this application what should be done.I am asking about what
should I do to distribute the .tlb file.
Thanks in Advance to all of you.
ritz1234
|
|
|
|
|
Hi all,
I have a DWORD variable like this,
DWORD value = 0;
After checking a condition, I want to set all bits to 1. If I do this,
DWORD value = 0xffffffff;
is that ok?
I appreciate your help all the time...
CodingLover
modified on Monday, June 2, 2008 12:29 AM
|
|
|
|
|
CodingLover wrote: After checking a condition, I want to set all bits to 1. If I do this,
DWORD value = 1;
Since DWORD is unsigned long , assigning -1 will do the trick.
DWORD value = -1;
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Actually I put DWORD = 1 by my mistake.
Can you see my edited post.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
There is nothing wrong, but instead of hardcoding, you can use constants such as MAXDWORD which is defined in winnt.h or ULONG_MAX which is defined in limits.h . That will be more safe.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Thanks a lot. Now I got the point.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
hello, everyone:
i am now in trouble with the code below:
char temp[256];
LONG cbData=80;
RegOpenKeyEx(...&hKey);
RegQueryValue(hKey,NULL,(LPTSTR)temp,&cbData);
strcat(temp,"\\abc");
with the last line above , i could only retrieve the first charactor in temp,and the result is just *\abc. I am confused....is there anyone could help me?Thanks in advance~
modified on Monday, June 2, 2008 12:32 AM
|
|
|
|
|
steven_wong wrote: strcat(tem,"\\abc");
tem or temp ? Just a typo while framing the question or some other temporary variable?
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
temp,i am sorry
|
|
|
|
|
MSDN says: RegQueryValue is provided only for compatibility with 16-bit versions of Windows. Applications should use the RegQueryValueEx function.
Besides that, what do you mean by:
LONG cbData = 80 ? How do you know that this would be enough? RegQueryValueEx returns ERROR_SUCCESS if successful. Did you check the return value of the function?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
thank u for ur replying, Rajesh
i c that,however, now i need to read the default value of a registry key, which means i could only use RegQueryValue.
and i have checked if RegQueryValue returns ERROR_SUCCESS in my own codes.the codes i paste here is just for simple.anyway, thank u for ur reminding
|
|
|
|
|
There is a list box in dialog resource.
While running, it is having two arrows on right side vertically.
I want to make it only one arrow towards down and when clicking it I want to show all the items in the list.
How to do it?
Thanks & Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
rp_suman wrote: I want to make it only one arrow towards down and when clicking it I want to show all the items in the list.
I think you need a Combobox instead of listbox.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hi,
Thanks for the help!!
Now I have to use keyboard's down/up arrows to select different items.
But I want to see all the items when I click the combobox arrow.
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
I hope you just picked the combo and placed it to dialog. If you did so, by default the dropdown list size will be small to occupy only one item. So do the following
1) After placing the combo to the dialog in resource editor, click on the drop down arrow and dropdown size change rect will appear.
2) Drag the dropdown size selection so that you can see bigger list.
If you want to do it via code, send CB_SETMINVISIBLE to the combobox by specifying the minimum number of items visible in the combo.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hi Jijo,
Thanks for the help!!
Design time sizing of control is working well.
To do it in code, sending message only is enough or do we need to something else like creating manifest file..
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Just send the message. That will be enough. I'm sure that the combo will hear your message.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hi,
I added a new form and associated to the CView Class, and i wannted to add The OnCreateClient usinf the wizard but i didn't find it.
Is that a stupid question or what? how can i add that Function. Thx
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Hi,
Do you want override it?
Refer this page: CFrameWnd::OnCreateClient[^]
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Blood_HaZaRd wrote: and associated to the CView Class, and i wannted to add The OnCreateClient usinf the wizard but i didn't find it.
That's because OnCreateClient() is a CFrameWnd method, not a CView method.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Using Visual C++ 6.0 MFC in SDI application
I created a dialog window. After the user enters data, he can select OK or CANCEL and the window automatically closes. I wanted to add a button called "TEST" to this same dialog. When the user clicks on the "TEST" button, I want to automatically close this dialog window just as it happens when he clicks OK or CANCEL. But I don't know how to set things up to do that.
Thanks!
|
|
|
|
|
In your test button handler call
CDialog::OnOK();
Then your dialog will be closed automatically. Actually the CDialog::OnOK() calls UpdateData() to update data from controls to member variables and calls EndDialog() to close the dialog.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Thanks a lot. That was incredibly simple! Thanks again!
|
|
|
|