|
I want to write my data on CD in visual c++ code.How can I do it?
Agh
|
|
|
|
|
|
i am trying to create a class which have a pointer which points to one or more other class
but i cant find anyway to do it pleaes show me an example please
i am using #include<iostream>
using namespace std;
wat i am trying to do:
i am trying to make a class that some how have a pointer which links to item class which is shown below
these are my 2 item class:
class graphic_card
{
int core_clock,memory_clock,memory_size,pixel_pipe_line;
char model[20],vpu[20];
float direct_X;
bool Twin_view,video_in,D_sub;
public:
};
class mother_board
{
int hyper_transport,pci,audio_channel;
char model[20],cpu_socket[30],memory_slot[20];
bool lan,dual_bios,intergrated_VGA;
public:
};
|
|
|
|
|
I might not quite understand you. your requirement seems quite simple:
class NewClass
{
graphic_card *m_pGraphic_card;
mother_board *m_pMother_board;
public:
...
}
|
|
|
|
|
|
B.M.Sudhakar wrote: error C2065: 'IHTMLElement2' : undeclared identifier
Actually IHTMLElement2 is defined under namespace MSHTML , so u either declare variable as MSHTML::IHTMLElement2 or use statement using namespace MSHTML;
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
If you included the right headers, then you have an outdated Platform SDK. More bad news, the latest Platform SDK does not support VC6. Upgrade your Visual C++, or look for an old-but-newer-than-yours Platform SDK download somewhere.
My blogs:
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
http://bloglines.com/public/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
I would like to use Win API's SendMessage( wnd, WM_GETTEXTLENGTH, 0, 0 );, or PostMessage function to be able to get the text from the textbox of another program. Let's say, I would like to be able to get the text from Instant Messenger and show it in my App. Does anyone know how to do this!
I'm doing it in C#, but I'm posting here because those functions are not C# native and you are more familiar with them than C# programmers.
|
|
|
|
|
Hi peshkunta,
You want to retrieve the text from the text box of some Instant messenger?
What all you require are
1. HWND of -- IM
2. Class name for text box (most of cases it's "Edit")
The API's you would require are...
1. EnumWindows:
-Pass IM HWND as 1 param, and give your (own) callback function name as
second param to this API.
-Loop through the text boxes inside IM (if more text boxes exists).
-When ever you get the text box from where you want to retrive the text
return TRUE from callback to terminate the enumeration. (one possible
approach to compare the text boxes is compare class name)
-EnumWindows must return you the HWND to (desired) text box.
2. PostMessage
-Use PostMessage to get the text from the text box.
Pseudo code is done... now get in action to retrive the text !
all the very best !
Cheers,
Vishal
|
|
|
|
|
Thanks so much for the response! I'm not very familiar with C++ functions. I know that SendMessage or PostMessage have many versions (all accept different parameters), but I have no experience in using them.
I know how to get the handle of a window/dialog (HWND), and pass the message constant WM_CLOSE, etc., but I'm not sure how to get the class of a text box, hence don't know how to loop through them. Is EnumWindows a function? And how do I use it? That below is what I think I'm most iffy about:
******************************************************************
-Loop through the text boxes inside IM (if more text boxes exists).
-When ever you get the text box from where you want to retrive the text
return TRUE from callback to terminate the enumeration. (one possible
approach to compare the text boxes is compare class name)
-EnumWindows must return you the HWND to (desired) text box.
******************************************************************
Could you please write me an example on how I would do that? THANKS!!
|
|
|
|
|
I am using Window CE emulator as a CPU choice to debug my eVC++ program.Can i able to open my PC's com port thrugh this emulator option.I am running this emulator in Window XP environment.
birajendu
CyberG India
Delhi
India
|
|
|
|
|
there is an example in VC samples, you can have a look.
open com port is by function CreateFile(...)
includeh10
|
|
|
|
|
ya...
I had tried CreateFile() function.I had not find any problem wen i ran my eVC++ code in window CE.Net board.
But my problem is I am tring to open the com port of my pc by a program written in eVC++ by building that program through Window CE Emulator.My pc has windows XP as current OS.
thanx in advance
birajendu
CyberG India
Delhi
India
|
|
|
|
|
I'm using Windows API. Usually i use the GetKeyNameText function, but i found that i'm not satisfied with it since it returns all upper case ascii, it return special character such as the enter and space as ascii "Enter" and "Space". Do you have recommendation about more suitable function or maybe a way to solve this (if there isn't any function like that)
thank you very much =)
|
|
|
|
|
Did you try
int ToAscii(UINT uVirtKey,
UINT uScanCode,
PBYTE lpKeyState,
LPWORD lpChar,
UINT uFlags
);
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Have you tried --- "GetAsyncKeyState" ?
Cheers,
Vishal
|
|
|
|
|
The GetAsyncKeyState function determines whether a key is up or down at the time the function is called, and whether the key was pressed after a previous call to GetAsyncKeyState.
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
thank you, i tried the ToAscii function but got stuck: how can i supply the first and the second parameters? i only have access to wParam and lParam of the messages.
thank you.
|
|
|
|
|
There is method called CopyTo(src_start,dst,dst_start, length) in class String (VS ++ .Net 2003) . While dst is a Char or __wchar_t array. What will be the best way to Copy part of First String to another String? For example, String *Str=S"dirName/filename", I would like just take the file name so I start copy from 8 from Str to another Char dst[]. But dst is not String instance.
Any better ideal? Thanks
|
|
|
|
|
Hi,
How to make bi directional microcontroller program(keil,like c).
|
|
|
|
|
What do you want to be bidirectional?
-Prakash
|
|
|
|
|
Hi,
in my project i have to develop a GUI to control
configuration of a microcontroller. I developed GUI
using VC++6.0 and microcontroller programs in Keil.
These both programs will run on same pc, and now i
have to make communication beween these both programs.
If anyone have any idea kindly advice me .
Thanking you
with regards
sheshidar patnam
|
|
|
|
|
The application that you have developed and compiled in kiel, does it work in some emulator or a standalone application.
-Prakash
|
|
|
|
|
Hi there,
How can i make a Brush with default window color ?!
I just tried below code, but it doesn't work :
HBRUSH hBrush = ::GetSysColorBrush( COLOR_WINDOW );
When i use below code to make the brush (with XP default window color), it just works fine (as u see, the i passed the color HANDY (!!), i'm looking for code that make that automatically. ) :
HBRUSH hBrush = CreateSolidBrush( RGB( 236, 233, 210 ) );
I want to use the brush for painting a Static Control (Custom control) background ... (in CtlColor function, ON_WM_CTLCOLOR_REFLECT() msg)
Please help
Regards,
Hadi
|
|
|
|
|
YESSS !
The problem has been solved
ROCK ON !!!
Regards,
Hadi
|
|
|
|