Click here to Skip to main content
15,894,180 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionChanging Printer Settings to ensure Landscape print [modified] Pin
maycockt13-Apr-10 23:27
maycockt13-Apr-10 23:27 
QuestionRe: Changing Printer Settings to ensure Landscape print Pin
David Crow14-Apr-10 3:13
David Crow14-Apr-10 3:13 
AnswerRe: Changing Printer Settings to ensure Landscape print Pin
@Intersect☺™14-Apr-10 4:22
professional@Intersect☺™14-Apr-10 4:22 
Questionexcel Pin
trioum13-Apr-10 23:18
trioum13-Apr-10 23:18 
QuestionRe: excel Pin
enhzflep13-Apr-10 23:46
enhzflep13-Apr-10 23:46 
AnswerRe: excel Pin
@Intersect☺™14-Apr-10 4:24
professional@Intersect☺™14-Apr-10 4:24 
AnswerRe: excel Pin
ThatsAlok14-Apr-10 19:31
ThatsAlok14-Apr-10 19:31 
Questioncolumn width of ListView Pin
arun_pk13-Apr-10 22:18
arun_pk13-Apr-10 22:18 
AnswerRe: column width of ListView Pin
CPallini13-Apr-10 22:24
mveCPallini13-Apr-10 22:24 
AnswerRe: column width of ListView Pin
KarstenK13-Apr-10 22:54
mveKarstenK13-Apr-10 22:54 
QuestionOpening File that is already exclusively opened Pin
Harsh Shankar13-Apr-10 21:30
Harsh Shankar13-Apr-10 21:30 
AnswerRe: Opening File that is already exclusively opened Pin
Code-o-mat13-Apr-10 21:54
Code-o-mat13-Apr-10 21:54 
QuestionMessage Removed Pin
13-Apr-10 21:23
aks.13-Apr-10 21:23 
AnswerRe: MPEG-4 PinPopular
CPallini13-Apr-10 21:37
mveCPallini13-Apr-10 21:37 
GeneralRe: MPEG-4 Pin
ThatsAlok14-Apr-10 19:31
ThatsAlok14-Apr-10 19:31 
QuestionNeed information how to do screen scraping in windows using VC++/C++ Pin
John50213-Apr-10 20:55
John50213-Apr-10 20:55 
AnswerRe: Need information how to do screen scraping in windows using VC++/C++ Pin
Hadi Dayvary14-Apr-10 3:20
professionalHadi Dayvary14-Apr-10 3:20 
AnswerRe: Need information how to do screen scraping in windows using VC++/C++ Pin
ThatsAlok14-Apr-10 19:32
ThatsAlok14-Apr-10 19:32 
GeneralRe: Need information how to do screen scraping in windows using VC++/C++ Pin
John50220-Apr-10 3:41
John50220-Apr-10 3:41 
QuestionMoving controls within the dialog. Pin
shiv@nand13-Apr-10 19:41
shiv@nand13-Apr-10 19:41 
AnswerRe: Moving controls within the dialog. Pin
Emilio Garavaglia13-Apr-10 20:43
Emilio Garavaglia13-Apr-10 20:43 
First, commas, full-stops and semicolons has a meaning also in natural langage:
Your question can be:
"hi, I want to move A button control on mouse LButton down, with no Resize; position must be saved within the dialog.
How it can be done?
"
or
"hi I want to move button controls on mouse LButton down with no Resize and position. Must be saved within the dialog.
How it can be done?
"
And they are quite different questions.

Assuming the first, since a control is a window, just use MoveWindow (note: mouse coordinates are obtained in screen coordinates, while move window requires parent client coordinates, so do the proper translation with ScreenToClient).

I don't understand what you mean with "saved within the dialog": if you mean "saved within the dialog RESOURCE", then give a look to http://msdn.microsoft.com/en-us/library/ms648004(v=VS.85).aspx[^].
Consider also that, unless you are writing a "resource management tool", modifying the resource result in modifying the "exe", and this is not, in general, a good idea: what does it happen if multiple users attempt to to modify your "exe" if it is shared across a network?
It is better to save the control positions in a file stored in a user specific directory (you can get the path with SHGetFolderPath, giving CSIDL_APPDATA as a CSIDL) and, when loading the dialog, change the controls positions (again, with MoveWindow) accordingly to such file (if existent) before showing the dialog.

2 bugs found.
> recompile ...
65534 bugs found.
D'Oh! | :doh:


AnswerRe: Moving controls within the dialog. Pin
CPallini13-Apr-10 20:45
mveCPallini13-Apr-10 20:45 
AnswerRe: Moving controls within the dialog. Pin
Iain Clarke, Warrior Programmer13-Apr-10 20:55
Iain Clarke, Warrior Programmer13-Apr-10 20:55 
AnswerRe: Moving controls within the dialog. Pin
SandipG 13-Apr-10 21:00
SandipG 13-Apr-10 21:00 
QuestionHow do i change the column position of list view Pin
arun_pk13-Apr-10 19:23
arun_pk13-Apr-10 19:23 

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.