Click here to Skip to main content
15,888,286 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Show struct contents in Notepad Pin
RajiRaghu4-Jun-06 20:00
RajiRaghu4-Jun-06 20:00 
GeneralRe: Show struct contents in Notepad Pin
ThatsAlok4-Jun-06 20:38
ThatsAlok4-Jun-06 20:38 
GeneralRe: Show struct contents in Notepad Pin
FarPointer4-Jun-06 20:59
FarPointer4-Jun-06 20:59 
GeneralRe: Show struct contents in Notepad Pin
RajiRaghu4-Jun-06 21:47
RajiRaghu4-Jun-06 21:47 
GeneralRe: Show struct contents in Notepad Pin
ThatsAlok4-Jun-06 22:11
ThatsAlok4-Jun-06 22:11 
GeneralRe: Show struct contents in Notepad Pin
Hamid_RT4-Jun-06 22:17
Hamid_RT4-Jun-06 22:17 
GeneralRe: Show struct contents in Notepad Pin
RajiRaghu4-Jun-06 22:56
RajiRaghu4-Jun-06 22:56 
AnswerRe: Show struct contents in Notepad Pin
_AnsHUMAN_ 4-Jun-06 20:38
_AnsHUMAN_ 4-Jun-06 20:38 
// Let us suppose the structure is :
struct abc{<br />
char name[255];<br />
};

//now in the function OnXYZClicked() //or whatever you have

abc q;<br />
      strcpy(q.name,"abc");<br />
  ShellExecute(NULL,"open","notepad",q.name,"",1);<br />
  Sleep(500);// Necessary to give the time for window to show itself optimize this<br />
  HWND hwnd=::FindWindow(NULL,"abc.txt - notepad");<br />
  POINT pt={100,100};<br />
  HWND edit=::ChildWindowFromPoint (hwnd,pt);<br />
  ::SendMessage (edit,WM_SETTEXT,(WPARAM)"hello",(LPARAM)q.name);<br />

// Now when you run this for the first time no text is seen instead you are prompted to create a new file?
//The next time you run your application the file pops up with the text.
This is only a crude way of doing what you want to . You can find a better method but this is what clicked me right now.
Does this fit your needs?

Somethings seem HARD to do, until we know how to do them.
Wink | ;-)
_AnShUmAn_
QuestionEvent Viewer Pin
ashokvishnu4-Jun-06 19:26
ashokvishnu4-Jun-06 19:26 
AnswerRe: Event Viewer Pin
Anilkumar K V5-Jun-06 0:40
Anilkumar K V5-Jun-06 0:40 
GeneralRe: Event Viewer Pin
ashokvishnu5-Jun-06 1:09
ashokvishnu5-Jun-06 1:09 
AnswerRe: Event Viewer Pin
Blake Miller6-Jun-06 5:16
Blake Miller6-Jun-06 5:16 
QuestionSignificance of MFC/.NET Pin
Nattack4-Jun-06 18:18
Nattack4-Jun-06 18:18 
AnswerRe: Significance of MFC/.NET [modified] Pin
_AnsHUMAN_ 4-Jun-06 19:28
_AnsHUMAN_ 4-Jun-06 19:28 
GeneralRe: Significance of MFC/.NET [modified] Pin
Tara144-Jun-06 22:05
Tara144-Jun-06 22:05 
GeneralRe: Significance of MFC/.NET [modified] Pin
_AnsHUMAN_ 4-Jun-06 22:12
_AnsHUMAN_ 4-Jun-06 22:12 
GeneralRe: Significance of MFC/.NET [modified] Pin
Tara144-Jun-06 22:16
Tara144-Jun-06 22:16 
QuestionHelp Needed! Pin
fury 844-Jun-06 17:00
fury 844-Jun-06 17:00 
AnswerRe: Help Needed! [modified] Pin
bob169724-Jun-06 17:21
bob169724-Jun-06 17:21 
AnswerRe: Help Needed! Pin
Christian Graus4-Jun-06 18:05
protectorChristian Graus4-Jun-06 18:05 
AnswerRe: Help Needed! Pin
ThatsAlok4-Jun-06 18:48
ThatsAlok4-Jun-06 18:48 
GeneralRe: Help Needed! Pin
Tara145-Jun-06 1:44
Tara145-Jun-06 1:44 
GeneralRe: Help Needed! Pin
ThatsAlok5-Jun-06 1:48
ThatsAlok5-Jun-06 1:48 
GeneralRe: Help Needed! Pin
Tara145-Jun-06 1:55
Tara145-Jun-06 1:55 
GeneralRe: Help Needed! Pin
ThatsAlok5-Jun-06 1:58
ThatsAlok5-Jun-06 1:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.