|
Remember the cool control in MS Word for inserting a table? The user can select the table size by simply moving the mouse over the control.
I would like to know if it is available as a separate control so that i could use it in my application.
Or does anyone know where i could find a similar control.
Your help would be greatly appreciated.
|
|
|
|
|
Where is defined the macro ListView_SetCheckState because it's not defined in the COMMCTRL.H but it's define ListView_GetCheckState??? I don't understand that??
How Set a chek into a ListCtrl whitout ListView_SetCheckState for a other solution?
Thanks
|
|
|
|
|
I never heard about this function but you might include windowsx.h
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
debutant wrote:
Where is defined the macro ListView_SetCheckState because it's not defined in the COMMCTRL.H
It is #define d in COMMCTRL.H... You just have to have the correct version of COMMCTRL.H on your system, and in the correct #include path order.
Install the Platform SDK (search for it on http://msdn.microsoft.com), and/or fix the #include path order, and then try building again.
Peace!
-=- James.
|
|
|
|
|
Hey,
I am trying to use TAPI. However, CLSID_TAPI and IID_TAPI are undefined. I have tried #importing the dll, and tried importing the classes with classwizard. The DLL is on my system, and I have tried using RegSvr32 on this - it says the dll has been succesuflly registered.
I cant find any references to CLSID's in the registry. Presumably only the components i create get registered there. Are there a list of CLSID's anywhere on my system....? I have grep'd the whole of my hard disk and found nothing!
Please could someone give us a clue with this!! Im stressed!
Thankyou!
Benj2002
|
|
|
|
|
Remember the cool control in MS Word for inserting a table? The user can select the table size by simply moving the mouse over the control.
I would like to know if it is available as a separate control so that i could use it in my application.
Or does anyone know where i could find a similar control.
Your help would be greatly appreciated.
|
|
|
|
|
Hi,
Has anyone out there have a routine that converts a Hexidecmal String to a DWORD?
Paul Jahans
|
|
|
|
|
Try stroul. You can specify a base parameter of 16 or if the strings will have "0x" at the beginning then you can use a base of 0 and the function will sort it out.
If you prefer, it is a fairly simple matter to write your own.
|
|
|
|
|
unsigned long strtoul( const char *nptr, char **endptr, int base
|
|
|
|
|
Here's one way to do it. You should add error checking.
DWORD hexStringToDword
(char* szHexString)
{
DWORD dwValue = 0;
sscanf (szHexString, "%X", &dwValue);
return (dwValue);
}
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Wondering how or if you can change the font type/size and color in a regular c++ console window.
If so please include appropiate header(s).
using VC6
|
|
|
|
|
I don't know about fonts, but you can change color by using WriteConsoleOutputAttribute and WriteConsoleOutputCharacter .
/moliate
|
|
|
|
|
I have an MDI application. How can I change the default sizes for the child and parent windows when the application starts up?
|
|
|
|
|
In PreCreateWindow() of these two class:
cs.x=yoursize; or cs.cx=yoursize;
cs.y=yoursize; or cs.cy=yoursize;
I forgot which one is the one you want,test both of them.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
The solution which initially springs to mind is what you can do with the PreCreateWindow function. As the name suggest, this function is called right before the window is created. The only parameter is a reference to a CREATESTRUCT. Create structs have these parameters...
LPVOID lpCreateParams;
HINSTANCE hInstance;
HMENU hMenu;
HWND hwndParent;
int cy;
int cx;
int y;
int x;
LONG style;
LPCTSTR lpszName;
LPCTSTR lpszClass;
DWORD dwExStyle;
All of these variables are a goldmine of useful settings. Whats interesting about CREATESTRUCT in the context of MDI is that lpCreateParams is a pointer to a MDICREATESTRUCT. This has these members...
LPCTSTR szClass;
LPCTSTR szTitle;
HANDLE hOwner;
int x;
int y;
int cx;
int cy;
DWORD style;
LPARAM lParam;
with this you can do all sorts of stuff like setting the windows size, and by changing the style parameter you can get the window maximized...
e.g. ((MDICREATESTRUCT*)cs.lpCreateParams)->style |= WS_MAXIMIZE;
Hope that lots of use!
With time we live, with money we spend!
Joel Holdsworth
|
|
|
|
|
Ok... don't comment on the logical side of this code, I just have a small question that needs to be answered...;P
This code will give me a "user breakpoint" before exiting if I keep "for(i=6;i<8; i++)". BUT, change that to "for(i=6;i<7; i++)", which will obviously go through the loop only once, will work and exit properly.
So I guess that I don't even know how to use chars anymore (thanks to MFC and CString!!!) And I need to know why it won't work and what is the proper way to achieve what I want to do. Here's the code:
int main(int argc, char* argv[])
{
int i = 6;
char *pBody = new char;
char sz[4] = "test";
strcpy( pBody, "\0" );
for(i=6;i<8; i++)
{
strcat( pBody, sz );
strcat( pBody, ": " );
strcat( pBody, sz );
strcat( pBody, "\n" );
}
strcat( pBody, "\0" );
return 0;
delete [] pBody;
pBody = NULL;
}
Also, I guess it would be a nice thing for me to re-learn C/C++... I feel like a hobbyist...
Thanks!
---------------
Ok, we suck at C/C++, but we're good at website design and MFC apps!!!
http://www.edovia.com
|
|
|
|
|
Ok, I guess I should use:
char *pBody = new char[somevalue];
instead of:
char *pBody = new char;
silly me... But the thing is that I don't know how many loops I'll have. Can I resize the char on the fly? Or, I could use:
char *pBody = new char[nbOfFields-6];
Is that correct?
Another question I end up answering myself!
---------------
Nah, we're cool!
http://www.edovia.com
|
|
|
|
|
if you want to make memory leaks the second thing works perfectly.. but you can't resize arrays on the heap..
so if oyu wanna resize it.. use sthing like:
char *pBody = 0;
pBody = new char [14];
delete pBody;
pBody = new char [16];
hope this helps..
(i just can recommend that you try to give std::string a try.. cause i think c-arrays suck royal.. i shot myself in the foot with this too often )
Sometimes I think the surest sign for intelligent life elsewhere in
the universe is that none of them ever tried to contact us.
|
|
|
|
|
I wanted to use std::string but a function I use requires a const char[] as a parameter and string.c_str is no good. Unless there's a way to convert the string to a char when I'm done...
any ideas?
[edit] I guess string.c_str didn't work because I thought it was a variable, not a function. string.c_str() should work. Speaking of work, I think I work too much
---------------
http://www.edovia.com
|
|
|
|
|
hemm?
std::string s;
char an_old_array [16] = "";
s = "hy luke";
a_old_function (s.c_str());
strcpy (an_old_array, s.c_str());
do you have got any other questions ?
or what do you need exactly ?
Sometimes I think the surest sign for intelligent life elsewhere in
the universe is that none of them ever tried to contact us.
|
|
|
|
|
No, you answered it perfectly! It's me that was confused... I should take a nap
Thanks Bernard!
---------------
http://www.edovia.com
|
|
|
|
|
no problem...
bernhard
Sometimes I think the surest sign for intelligent life elsewhere in
the universe is that none of them ever tried to contact us.
|
|
|
|
|
perhaps you can use
YourConstChar=YourCstring.GetBuffer(0);
|
|
|
|
|
Shouldn't it be
<br />
delete [] pBody;<br />
instead of
<br />
delete pBody;<br />
?
|
|
|
|
|
of course..
sorry.. but i have to say that i hardly (say never) use c-arrays.. so.. that may be the reason why i didn't notice that..
yeah..
have a nice time..
bernhard
Sometimes I think the surest sign for intelligent life elsewhere in
the universe is that none of them ever tried to contact us.
|
|
|
|