|
hey there...i m really embarraced here ,,,i really m new in programming...i m trying to write a simple c++code for a simple calander......so if any 1 of u can help me...i will b very greatfull....
thank u all
|
|
|
|
|
if you need a month calender use the control month calendar, theres also a control datepicker. or do you need something special ?
|
|
|
|
|
Can somebody help ?
Requirement :
1) A simple dialog based MFC proj which hides itself when a hot key is pressed. For EG : Ctrl + Alt + F8. and unhides itself when the same hot key is pressed again. [the same hotkey is used to HIDE / UNHIDE itself.]
2) Must be a single process, no service or other threads is running to listen to the keystroke except this application ]
Assumption :
1) The hot key is unique in the system. [ no conflicts with any running application or services ]
I am able to hide the window, but I am not able to unhide it as this application is no longer the active application.
Thanks,
JSM
|
|
|
|
|
I think you need to install a keyboard hook for this. I've not tried it but I think it will still intercept keystrokes even while the application's window is hidden.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Register that keypress as a hotkey with RegisterHotKey() , and the system will send your window a WM_HOTKEY message when it is pressed.
--
I'm Michael Dunn and I approve this post.
Vote Trogdor in oh-four!
|
|
|
|
|
Thanks for the tip. I was not aware of this function.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Thanks for this wonderful tip !!
|
|
|
|
|
I wanna tab control with buttom,image in mdi.
What I use class?
|
|
|
|
|
Need suggestions for the problem preferrably in VC6:
There are two machines A and B. A telnet(or SSH) to B.On logged in to B, B should give it's own window in Machine A. That is, B should be the owner of window in A.
If it is something to do with XWindows or Xterm, I am not clear how exactly to hit the problem.
I hate that lazy Java
|
|
|
|
|
Hi All,
I wanted to know the difference in creation of the list box which drops down from a
combo box and the list box control which we can embed on a dialog by drag and drop from the control menu. The list box that drops down from the combobox can overlap on other controls and still the focus is on the list box when the mouse is moved over the overlapping area of this list box and other controls.
But if we manually overlap listbox and some other control,the focus cannot remain on the list box in this overlapped area,but focus goes to other control.
Can someone tell me how to make the focus remain on the list box though the list box and some other controls get overlapped.
Thanks in advance
Raghu
|
|
|
|
|
The list box portion of a combo box is handled specially. It's actually a child of the desktop, not the combobox itself or the dialog. That way, the list can extend outside of the parent dialog (look at the Start->Run dialog for an example).
--
I'm Michael Dunn and I approve this post.
Vote Trogdor in oh-four!
|
|
|
|
|
thankyou. the answer was helpful
Raghu
|
|
|
|
|
How to interpret the content of the key "HKEY_LOCAL_MACHINE\SYSTEM\DISK\Information"? I want it to locate all volumes under Windows NT 4.0. If the content of this key was not documented, what is the other way to locate a specific volume under WinNT 4.0? Thanks.
Best regards.
|
|
|
|
|
Are either of these what you are looking for:
GetLogicalDriveStrings()
GetLogicalDrives()
GetVolumeInformation()
FindFirstVolume()
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Thanks for your reply,
However, what I need is the location of each volume. For example, what is the starting offset and length of the volumn C: and, of course, which physical disk this volume belongs to. In other words, I want a similar function (works in WinNT 4.0) with IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS, which does not work under Windows NT 4.0
I think the approach to key HKEY_LOCAL_MACHINE\SYSTEM\DISK\Information is correct. But the content of this REG_BIN value is still unknown.
Best regards.
|
|
|
|
|
Tuan Dang wrote:
I think the approach to key HKEY_LOCAL_MACHINE\SYSTEM\DISK\Information is correct.
Except that that key does not always exist. The two machines on my desk do not have that key.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Dear all,
I cannot quite understand the logic behind the notion of operator overloading.
I understand that creating a class, is like creating a new type, therefore we can overload some operators to work with that new type. For example:
Ratio& Ratio::operator=(const Ratio& r)
{
num = r.num;
den = r.den;
return *this;
} This example is absolutely comprehensible but I cannot understand how I have to think, visualize the things in order to implement operator overloading in the *, *= operator, or in the == for instance.
Consider the Ratio class as the following:
class Ratio
{
friend Ratio& operator*(const Ratio& x, const Ratio y);
public:
Ratio(int =0, int =1);
Ratio& operator=(const Ratio&);
Ratio& operator*=(const Ratio&);
private:
int num, den;
};
Here is the understanding problem:
Ratio operator*(const Ratio& x, const Ratio& y)
{
Ratio z(x.num*y.num, x.den*y.den);
return z;
}
Is this the only way to overload that operator in this example? How one has to think in order to writew the above code? What are the steps involved in order to write the above two lines of code? And secondly in the first example (operator=) the return type is a reference to the Ratio but in the second is not a reference. Why is not a reference. When should we use a reference and when not?
Please bare in mind that I understand the use of friend functions.
Thanks in advance for the help,
grscot
|
|
|
|
|
Compilation of file1.cpp and file2.cpp - success.
Linking causes error LNK2001.
What are possible reesons?
//file1.h
void dosmth();
//file1.cpp
#include "file1.h"
void dosmth()
{
//dosmth
}
//file2.cpp
include "file1.h"
void main()
{
dosmth();
}
XPIS
|
|
|
|
|
Hi,
I couldnt find anything wrong in your code except missing of # in the #include statement @ file2.cpp. It is working 4 me. @ what env. r u working @
Sujan
|
|
|
|
|
I have about 50 int variables in my form to initialize. The variables are different only in the last 2 numbers. How can I concat the strings to hold int data types so that I wouldn't have to write out all 50 variables. I'm able to do this in ASP but not sure how to do it in C++.
CString str1 = "m_var";
CString str2;
for (int i=1; i <= 50; i++)
{
char num[10];
itoa(i,num,10);
str2 = str1 + num;
//need str2 to hold an int value
}
|
|
|
|
|
CString str;
str.Format("%i", int_nr);
//str will now be equal to int_nr even if str had another value
good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
If I understand your question correctly, I can only offer this:
struct
{
int m_var1;
int m_var2;
int m_var3;
int m_var4;
int m_var5;
int m_var6;
int m_var7;
int m_var8;
int m_var9;
int m_var10;
} m_vars;
int *pVar = &m_vars.m_var1;
for (int x = 0; x < sizeof(m_vars) / sizeof(int); x++)
{
*pVar = 1;
pVar++;
}
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
|
I'd like to customize the CFileDialog to add some extra controls to the bottom of it. When the dialog first opens, I'd only like one of the extra controls to be displayed. When the user selects this control (a check box), then I'd like the dialog to expand to show the rest of the controls.
I am using the explorer style CFileDialog with a custom template. If I place all of the extra controls on the custom template, the size of the CFileDialog is extended to include all of these controls (even if they are not visible). So I get the CFileDialog w/ a bunch of extra gray space at the bottom of it.
I thought that I could make the invisible controls very small in the custom template to minimize this extra gray space. Then when they need to be seen, I'd resize the CFileDialog and the controls and set the controls visible. The problem is that whenever I change the size of the CFileDialog by calling SetWindowPos(), the original CFileDialog controls resize to fill up the extra space, leaving no extra room for my new controls.
Does anyone know how to customize the CFileDialog to allow for collapse/expand at the bottom of the dialog? If so, I could really use some suggestions. Thanks!
|
|
|
|
|
Hi,
I needed help with resizing a CStatic box to fit exactly the size of the text inside. The thing is once I increase the font size, I cant get the exact dimensions from GetTextExtent(). I've tried to multiply it with a ration, but no luck. It doesnt fit on it. Is there any function out there that can do this for me or any help on what would be a good way to do it. Help Needed ASAP.
A
|
|
|
|