Click here to Skip to main content
15,900,818 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Export Image into PDF Pin
Code-o-mat29-Sep-09 20:43
Code-o-mat29-Sep-09 20:43 
AnswerRe: Export Image into PDF Pin
«_Superman_»29-Sep-09 20:48
professional«_Superman_»29-Sep-09 20:48 
AnswerRe: Export Image into PDF Pin
Rajesh R Subramanian29-Sep-09 22:13
professionalRajesh R Subramanian29-Sep-09 22:13 
Questionerror in use edit control and EndDialog() !!! Pin
hadi kazemi29-Sep-09 20:24
hadi kazemi29-Sep-09 20:24 
AnswerRe: error in use edit control and EndDialog() !!! Pin
Code-o-mat29-Sep-09 20:37
Code-o-mat29-Sep-09 20:37 
GeneralRe: error in use edit control and EndDialog() !!! Pin
hadi kazemi29-Sep-09 21:06
hadi kazemi29-Sep-09 21:06 
GeneralRe: error in use edit control and EndDialog() !!! Pin
Richard MacCutchan29-Sep-09 21:45
mveRichard MacCutchan29-Sep-09 21:45 
GeneralRe: error in use edit control and EndDialog() !!! Pin
Code-o-mat29-Sep-09 21:58
Code-o-mat29-Sep-09 21:58 
And what does it point at? You will have to feed GetWindowTextA with a pointer at a buffer that can hold the characters, if you do something like this:
LPSTR editString;
GetWindowTextA(hedit, editString, 10);

GetWindowText will copy the characters somewhere in memory and who knows what it overwrites -> problems. Or it crashes vith Access Violation (better case since then you know what is wrong, however if it does not crash immediately just overwrites something in the memory area of your process then it can die on anthing anywhere later and you might have no idea why...)

You could either try this:
char editString[11];
GetWindowTextA(hedit, editString, 10);


or maybe something like this:
LPSTR editString;
int len = GetWindowTextLength(hedit);
editString = new char[len + 1]; //+1 just to be sure...
GetWindowTextA(hedit, editString, len);
...
delete []editString;


> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <

GeneralRe: error in use edit control and EndDialog() !!! Pin
KarstenK30-Sep-09 1:17
mveKarstenK30-Sep-09 1:17 
Question_variant_t vItem = pRange-&gt;Item[ iRow ][ iCol ]; [modified] Pin
MsmVc29-Sep-09 20:19
MsmVc29-Sep-09 20:19 
AnswerRe: _variant_t vItem = pRange-&gt;Item[ iRow ][ iCol ]; Pin
Franck Paquier29-Sep-09 23:12
Franck Paquier29-Sep-09 23:12 
GeneralRe: _variant_t vItem = pRange-&gt;Item[ iRow ][ iCol ]; Pin
MsmVc29-Sep-09 23:14
MsmVc29-Sep-09 23:14 
GeneralRe: _variant_t vItem = pRange-&gt;Item[ iRow ][ iCol ]; Pin
Richard MacCutchan29-Sep-09 23:56
mveRichard MacCutchan29-Sep-09 23:56 
GeneralRe: _variant_t vItem = pRange-&gt;Item[ iRow ][ iCol ]; Pin
MsmVc30-Sep-09 0:17
MsmVc30-Sep-09 0:17 
GeneralRe: _variant_t vItem = pRange-&gt;Item[ iRow ][ iCol ]; Pin
Richard MacCutchan30-Sep-09 1:12
mveRichard MacCutchan30-Sep-09 1:12 
GeneralRe: _variant_t vItem = pRange-&gt;Item[ iRow ][ iCol ]; Pin
MsmVc30-Sep-09 1:34
MsmVc30-Sep-09 1:34 
GeneralRe: _variant_t vItem = pRange-&gt;Item[ iRow ][ iCol ]; Pin
MsmVc30-Sep-09 2:07
MsmVc30-Sep-09 2:07 
GeneralRe: _variant_t vItem = pRange-&gt;Item[ iRow ][ iCol ]; Pin
Richard MacCutchan30-Sep-09 3:34
mveRichard MacCutchan30-Sep-09 3:34 
GeneralRe: _variant_t vItem = pRange-&gt;Item[ iRow ][ iCol ]; Pin
MsmVc30-Sep-09 18:43
MsmVc30-Sep-09 18:43 
GeneralRe: _variant_t vItem = pRange-&gt;Item[ iRow ][ iCol ]; Pin
Franck Paquier30-Sep-09 19:10
Franck Paquier30-Sep-09 19:10 
GeneralRe: _variant_t vItem = pRange-&gt;Item[ iRow ][ iCol ]; Pin
MsmVc30-Sep-09 19:33
MsmVc30-Sep-09 19:33 
GeneralRe: _variant_t vItem = pRange-&gt;Item[ iRow ][ iCol ]; Pin
Franck Paquier30-Sep-09 20:00
Franck Paquier30-Sep-09 20:00 
GeneralRe: _variant_t vItem = pRange-&gt;Item[ iRow ][ iCol ]; Pin
MsmVc30-Sep-09 20:08
MsmVc30-Sep-09 20:08 
GeneralRe: _variant_t vItem = pRange-&gt;Item[ iRow ][ iCol ]; Pin
Franck Paquier30-Sep-09 20:37
Franck Paquier30-Sep-09 20:37 
GeneralRe: _variant_t vItem = pRange-&gt;Item[ iRow ][ iCol ]; Pin
MsmVc30-Sep-09 20:42
MsmVc30-Sep-09 20:42 

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.