Click here to Skip to main content
15,917,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Display non modal dialog Pin
Stefan Stefanov29-Mar-02 5:49
Stefan Stefanov29-Mar-02 5:49 
GeneralRe: Display non modal dialog Pin
Ravi Bhavnani29-Mar-02 6:22
professionalRavi Bhavnani29-Mar-02 6:22 
GeneralRe: Display non modal dialog Pin
Joaquín M López Muñoz31-Mar-02 11:22
Joaquín M López Muñoz31-Mar-02 11:22 
GeneralRe: Display non modal dialog Pin
Nish Nishant27-Mar-02 2:19
sitebuilderNish Nishant27-Mar-02 2:19 
GeneralRe: Display non modal dialog Pin
Rickard Andersson2027-Mar-02 3:19
Rickard Andersson2027-Mar-02 3:19 
GeneralRebars/Toolbars w/ Dialog app Pin
Hyien27-Mar-02 1:34
Hyien27-Mar-02 1:34 
GeneralRe: Rebars/Toolbars w/ Dialog app Pin
Tomasz Sowinski27-Mar-02 1:42
Tomasz Sowinski27-Mar-02 1:42 
GeneralSet Default Printer Pin
jerry0davis27-Mar-02 1:19
jerry0davis27-Mar-02 1:19 
My app creates html fire reports when it surprisingly enough detects a fire. Wink | ;) I need the enum all the printers and print this html fire report inside a CWebBrowser2 controls on all the connected printers. I do this by setting the default printer, and printing, and then setting the default printer again etc.

I use the SetDefaultPrinter command. This worksd fine. The problem is though that it only works in Win2000+. MSDN says that I should use the following code on < Win2000

C++
// read PrinterPorts section from win.ini
        // returned string should be of the form "driver,port,timeout,timeout", i.e. "winspool,LPT1:,15,45".
GetProfileString(TEXT("Windows"),TEXT("Device"),_T(",,,"),m_szName, COUNTOF(m_szName));
WriteProfileString(TEXT("Windows"),TEXT("Device"),pszPrinterName ));
        // Notify all open applications of the change. Note, only applications that handle the message will recognize the change.
#if WM_WININICHANGE != WM_SETTINGCHANGE
        // Old message type; for windows 95
SendNotifyMessage(HWND_BROADCAST,WM_WININICHANGE,0,(LPARAM)szWindows);
#endif
        // New message type
SendNotifyMessage(HWND_BROADCAST,WM_SETTINGCHANGE,0,(LPARAM)szWindows);


I can't seem to get this to work Cry | :(( I'm not quite sure what I should set szWindows to....

Can anyone help please? Thanks Smile | :)

Jeremy Davis
http://www.astad.org
GeneralReal time Programming with vc Pin
Eran27-Mar-02 0:56
Eran27-Mar-02 0:56 
GeneralRe: Real time Programming with vc Pin
Joaquín M López Muñoz27-Mar-02 2:17
Joaquín M López Muñoz27-Mar-02 2:17 
GeneralMultithread (Client Server) Problem (Repost) Pin
hkl27-Mar-02 0:41
hkl27-Mar-02 0:41 
GeneralRe: Multithread (Client Server) Problem (Repost) Pin
Tim Smith27-Mar-02 2:11
Tim Smith27-Mar-02 2:11 
GeneralRe: Multithread (Client Server) Problem (Repost) Pin
Jon Hulatt27-Mar-02 3:53
Jon Hulatt27-Mar-02 3:53 
GeneralRe: Multithread (Client Server) Problem (Repost) Pin
Le centriste27-Mar-02 6:22
Le centriste27-Mar-02 6:22 
Questionis there any way to pass a double's array like a paramenter by reference to a function? Pin
27-Mar-02 0:43
suss27-Mar-02 0:43 
AnswerRe: is there any way to pass a double's array like a paramenter by reference to a function? Pin
Tomasz Sowinski27-Mar-02 1:28
Tomasz Sowinski27-Mar-02 1:28 
GeneralRe: is there any way to pass a double's array like a paramenter by reference to a function? Pin
1-Apr-02 0:16
suss1-Apr-02 0:16 
GeneralHGLOBAL IStream IPicture... AAAAAH ! Pin
Braulio Dez27-Mar-02 0:04
Braulio Dez27-Mar-02 0:04 
GeneralRe: HGLOBAL IStream IPicture... AAAAAH ! Pin
Paul M Watt27-Mar-02 4:00
mentorPaul M Watt27-Mar-02 4:00 
GeneralRe: HGLOBAL IStream IPicture... AAAAAH ! Pin
Braulio Dez27-Mar-02 4:05
Braulio Dez27-Mar-02 4:05 
GeneralRe: HGLOBAL IStream IPicture... AAAAAH ! Pin
Paul M Watt27-Mar-02 4:48
mentorPaul M Watt27-Mar-02 4:48 
GeneralControl Toolbars with Owner Drawn Combo Boxes Pin
John Clump26-Mar-02 23:40
John Clump26-Mar-02 23:40 
GeneralRe: Control Toolbars with Owner Drawn Combo Boxes Pin
wangyiming27-Mar-02 19:39
wangyiming27-Mar-02 19:39 
GeneralRe: Control Toolbars with Owner Drawn Combo Boxes Pin
John Clump27-Mar-02 21:13
John Clump27-Mar-02 21:13 
GeneralRe: Control Toolbars with Owner Drawn Combo Boxes Pin
wangyiming28-Mar-02 17:17
wangyiming28-Mar-02 17:17 

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.